MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / ScanProcessSections

Method ScanProcessSections

Source/Client/NM_Engine/ISectionScanner.cpp:275–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275bool IScanner::ScanProcessSections(HANDLE hProcess)
276{
277 SCANNER_LOG(LL_SYS, "Section scanner has been started! Target process: %u(%p)", g_winapiApiTable->GetProcessId(hProcess), hProcess);
278
279 if (!IS_VALID_HANDLE(hProcess))
280 {
281 SCANNER_LOG(LL_ERR, "Target handle is NOT valid!");
282 return true;
283 }
284
285 if (!g_nmApp->DynamicWinapiInstance()->IsValidHandle(hProcess))
286 {
287 SCANNER_LOG(LL_ERR, "Target process is NOT active!");
288 return true;
289 }
290
291 auto szProcessName = CProcessFunctions::GetProcessName(hProcess);
292 if (szProcessName.empty())
293 {
294 SCANNER_LOG(LL_ERR, "Process name read fail! Target process: %p Error: %u", hProcess, g_winapiApiTable->GetLastError());
295 return false;
296 }
297 SCANNER_LOG(LL_SYS, "Process image name: %s", szProcessName.c_str());
298
299 // Check dig. sign informations, if signed pass it, it can be take so much time
300
301 return EnumerateSections(hProcess);
302}

Callers

nothing calls this directly

Calls 3

GetProcessIdMethod · 0.80
IsValidHandleMethod · 0.80
DynamicWinapiInstanceMethod · 0.80

Tested by

no test coverage detected