MCPcopy Create free account
hub / github.com/dobin/RedEdr / InitProcessQuery

Function InitProcessQuery

RedEdrShared/process_query.cpp:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56
57BOOL InitProcessQuery() {
58 HMODULE hNtDll;
59 hNtDll = GetModuleHandle(L"ntdll.dll");
60 if (hNtDll == NULL) {
61 LOG_A(LOG_ERROR, "ProcessQuery: could not find ntdll.dll");
62 return FALSE;
63 }
64 NtQueryVirtualMemory = (pNtQueryVirtualMemory)GetProcAddress(hNtDll, "NtQueryVirtualMemory");
65 if (NtQueryVirtualMemory == NULL) {
66 LOG_A(LOG_ERROR, "ProcessQuery: Could not get NtQueryVirtualMemory error: %d", GetLastError());
67 return FALSE;
68 }
69 return TRUE;
70}
71
72
73std::wstring GetProcessName(HANDLE hProcess) {

Callers 3

InitHooksThreadFunction · 0.85
mainFunction · 0.85
processinfoFunction · 0.85

Calls 1

LOG_AFunction · 0.50

Tested by 1

processinfoFunction · 0.68