Skip to content

Instantly share code, notes, and snippets.

@rbmm
Created February 7, 2024 17:35
Show Gist options
  • Save rbmm/3dd38d1477e374e8b384731adfb99b18 to your computer and use it in GitHub Desktop.
Save rbmm/3dd38d1477e374e8b384731adfb99b18 to your computer and use it in GitHub Desktop.
void GetPebModules(PLDR_DATA_TABLE_ENTRY cursor)
{
while (cursor->DllBase)
{
//DbgPrint("%p %wZ\r\n", cursor->DllBase, &cursor->BaseDllName);
cursor = (PLDR_DATA_TABLE_ENTRY)cursor->InLoadOrderLinks.Flink;
}
DbgPrint("%p !!!\n", &cursor->DllBase);
}
void demo()
{
PPEB_LDR_DATA Ldr = NtCurrentTeb()->ProcessEnvironmentBlock->Ldr;
DbgPrint("%p !!!\n", &Ldr->EntryInProgress);
GetPebModules((PLDR_DATA_TABLE_ENTRY)Ldr->InLoadOrderModuleList.Flink);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment