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

Method GetLdrModule

Source/Client/NM_Engine/DynamicWinapi.cpp:241–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239 return false;
240}
241LPVOID CDynamicWinapi::GetLdrModule(DWORD_PTR dwAddress)
242{
243 auto pPEB = GetCurrentPEB();
244 auto CurrentEntry = pPEB->LoaderData->InLoadOrderModuleList.Flink;
245 while (CurrentEntry != &pPEB->LoaderData->InLoadOrderModuleList && CurrentEntry != NULL)
246 {
247 auto Current = CONTAINING_RECORD(CurrentEntry, _LDR_MODULE, InLoadOrderModuleList);
248 if (dwAddress == reinterpret_cast<DWORD_PTR>(Current->BaseAddress))
249 {
250 return Current;
251 }
252
253 CurrentEntry = CurrentEntry->Flink;
254 }
255 return nullptr;
256}
257LPVOID CDynamicWinapi::FindModuleFromAddress(DWORD_PTR dwAddress)
258{
259 auto pPEB = GetCurrentPEB();

Callers 2

SetFakeImageBaseFunction · 0.80
SetFakeImageSizeFunction · 0.80

Calls 1

GetCurrentPEBFunction · 0.85

Tested by

no test coverage detected