Extend LDR_DATA_TABLE_ENTRY to Windows 11

This commit is contained in:
Boring
2022-10-07 09:00:51 +08:00
parent fc4e272e55
commit 609d7e7d56
8 changed files with 98 additions and 120 deletions
+1 -5
View File
@@ -138,7 +138,7 @@ BOOL NTAPI LdrpCallInitializers(PMEMORYMODULE module, DWORD dwReason) {
if (headers->OptionalHeader.AddressOfEntryPoint) {
__try {
// notify library about attaching to process
if (((PDLL_STARTUP_ROUTINE)(module->codeBase + headers->OptionalHeader.AddressOfEntryPoint))((HINSTANCE)module->codeBase, dwReason, 0)) {
if (((PLDR_INIT_ROUTINE)(module->codeBase + headers->OptionalHeader.AddressOfEntryPoint))((HINSTANCE)module->codeBase, dwReason, 0)) {
module->initialized = TRUE;
return TRUE;
}
@@ -311,10 +311,6 @@ BOOLEAN NTAPI RtlIsValidImageBuffer(
return result;
}
FARPROC NTAPI RtlGetNtProcAddress(LPCSTR func_name) {
return GetProcAddress(GetModuleHandleA("ntdll.dll"), func_name);
}
BOOLEAN NTAPI VirtualAccessCheckNoException(LPCVOID pBuffer, size_t size, ACCESS_MASK protect) {
if (size) {
MEMORY_BASIC_INFORMATION mbi{};