From ae3998ff3968c7bb037730c2f10c2516dc4f871a Mon Sep 17 00:00:00 2001 From: Curve Date: Mon, 13 May 2024 17:21:41 +0200 Subject: [PATCH] Revert "refactor(page): load `kernel32` instead of `kernelbase`" This reverts commit 66f3d8fb1ec50f618bf95d5bdd1ccfce058b3fa5. --- src/page.win.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/page.win.cpp b/src/page.win.cpp index 3639a50..3621869 100644 --- a/src/page.win.cpp +++ b/src/page.win.cpp @@ -1,5 +1,4 @@ #include "page.hpp" -#include "module.hpp" #include "constants.hpp" #include @@ -251,8 +250,8 @@ namespace lime static const auto VirtualAlloc2 = []() { - auto kernel32 = module::load("kernel32.dll"); - return reinterpret_cast(kernel32->symbol("VirtualAlloc2")); + auto *kernel_base = LoadLibraryA("kernelbase.dll"); + return reinterpret_cast(GetProcAddress(kernel_base, "VirtualAlloc2")); }(); auto *alloc = VirtualAlloc2(GetCurrentProcess(), nullptr, size, MEM_COMMIT | MEM_RESERVE,