Handle api-ms DLLs

This commit is contained in:
momo5502
2024-08-31 08:45:12 +02:00
parent 48581ff048
commit 01bced1b53
4 changed files with 38 additions and 8 deletions

View File

@@ -447,14 +447,14 @@ namespace
auto context = setup_context(*emu);
context.executable = map_file(*emu, R"(C:\Users\mauri\Desktop\ConsoleApplication6.exe)");
context.executable = *map_file(*emu, R"(C:\Users\mauri\Desktop\ConsoleApplication6.exe)");
context.peb.access([&](PEB& peb)
{
peb.ImageBaseAddress = reinterpret_cast<void*>(context.executable.image_base);
});
context.ntdll = map_file(*emu, R"(C:\Windows\System32\ntdll.dll)");
context.ntdll = *map_file(*emu, R"(C:\Windows\System32\ntdll.dll)");
const auto entry1 = find_exported_function(context.ntdll.exports, "LdrInitializeThunk");
const auto entry2 = find_exported_function(context.ntdll.exports, "RtlUserThreadStart");