From d21e387815bb23a10c81a8369eea345eb176f5fe Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Sat, 21 Nov 2020 22:17:30 -0800 Subject: [PATCH] _KPROCESS::DirectoryTableBase is not a PTE! https://imgur.com/EDjhvUi.png --- PTM/mem_ctx/mem_ctx.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/PTM/mem_ctx/mem_ctx.cpp b/PTM/mem_ctx/mem_ctx.cpp index f8c9ca7..7482e49 100644 --- a/PTM/mem_ctx/mem_ctx.cpp +++ b/PTM/mem_ctx/mem_ctx.cpp @@ -150,12 +150,10 @@ namespace nasa void* mem_ctx::get_dirbase(vdm::vdm_ctx& v_ctx, DWORD pid) { const auto peproc = - reinterpret_cast(v_ctx.get_peprocess(pid)); + reinterpret_cast( + v_ctx.get_peprocess(pid)); - const auto dirbase = - v_ctx.rkm(peproc + 0x28); - - return reinterpret_cast(dirbase.pfn << 12); + return v_ctx.rkm(peproc + 0x28); } bool mem_ctx::hyperspace_entries(pt_entries& entries, void* addr)