MCPcopy Create free account
hub / github.com/NtQuery/Scylla / parseModuleWithMapping

Method parseModuleWithMapping

Scylla/ApiReader.cpp:78–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void ApiReader::parseModuleWithMapping(ModuleInfo *moduleInfo)
79{
80 LPVOID fileMapping = 0;
81 PIMAGE_NT_HEADERS pNtHeader = 0;
82 PIMAGE_DOS_HEADER pDosHeader = 0;
83
84 fileMapping = createFileMappingViewRead(moduleInfo->fullPath);
85
86 if (fileMapping == 0)
87 return;
88
89 pDosHeader = (PIMAGE_DOS_HEADER)fileMapping;
90 pNtHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)fileMapping + (DWORD_PTR)(pDosHeader->e_lfanew));
91
92 if (isPeAndExportTableValid(pNtHeader))
93 {
94 parseExportTable(moduleInfo, pNtHeader, (PIMAGE_EXPORT_DIRECTORY)((DWORD_PTR)fileMapping + pNtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress), (DWORD_PTR)fileMapping);
95 }
96
97
98 UnmapViewOfFile(fileMapping);
99
100}
101
102inline bool ApiReader::isApiForwarded(DWORD_PTR rva, PIMAGE_NT_HEADERS pNtHeader)
103{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected