| 506 | } |
| 507 | |
| 508 | void CProcessATHookTable::Refresh() { |
| 509 | m_Table.data.info.clear(); |
| 510 | m_ModuleTracker.EnumModules(); |
| 511 | m_Modules = m_ModuleTracker.GetModules(); |
| 512 | _libraries.clear(); |
| 513 | for (const auto& m : m_Modules) { |
| 514 | if (m->Path.length() == 0) |
| 515 | continue; |
| 516 | std::size_t pos = m->Path.find(L".fon"); |
| 517 | if (pos != std::wstring::npos) { |
| 518 | continue; |
| 519 | } |
| 520 | PEParser parser(m->Path.c_str()); |
| 521 | if (!parser.IsValid()) |
| 522 | continue; |
| 523 | Library lib; |
| 524 | lib.Name = m->Name; |
| 525 | lib.Base = m->Base; |
| 526 | lib.Symbols = parser.GetExports(); |
| 527 | lib.isPe64 = parser.IsPe64(); |
| 528 | _libraries.push_back(std::move(lib)); |
| 529 | } |
| 530 | for (const auto& m : m_Modules) { |
| 531 | std::size_t pos = m->Path.find(L".fon"); |
| 532 | if (pos != std::wstring::npos) { |
| 533 | continue; |
| 534 | } |
| 535 | CheckEATHook(m); |
| 536 | CheckIATHook(m); |
| 537 | } |
| 538 | |
| 539 | m_Table.data.n = m_Table.data.info.size(); |
| 540 | } |
| 541 | |
| 542 | |
| 543 |
nothing calls this directly
no test coverage detected