diff --git a/src/Components/Modules/IW4MVM.cpp b/src/Components/Modules/IW4MVM.cpp index 63bef0fa..94fe685e 100644 --- a/src/Components/Modules/IW4MVM.cpp +++ b/src/Components/Modules/IW4MVM.cpp @@ -11,8 +11,8 @@ namespace Components if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled() || Monitor::IsEnabled() || Loader::IsPerformingUnitTests()) return; DWORD oldProtect; - std::uint8_t* module = reinterpret_cast(GetModuleHandle(nullptr)); - VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READWRITE, &oldProtect); + std::uint8_t* _module = reinterpret_cast(GetModuleHandle(nullptr)); + VirtualProtect(_module + 0x1000, 0x2D6000, PAGE_EXECUTE_READWRITE, &oldProtect); #ifdef COMPILE_IW4MVM client_main::Init(); @@ -26,7 +26,7 @@ namespace Components } }); - VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); + VirtualProtect(_module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); } IW4MVM::~IW4MVM() diff --git a/src/Main.cpp b/src/Main.cpp index 1531517e..0e78434b 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -55,9 +55,9 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l Steam::Proxy::RunMod(); // Ensure we're working with our desired binary - char* module = reinterpret_cast(0x400000); - auto hash1 = Utils::Cryptography::JenkinsOneAtATime::Compute(module + 0x1000, 0x2D531F); // .text - auto hash2 = Utils::Cryptography::JenkinsOneAtATime::Compute(module + 0x2D75FC, 0xBDA04); // .rdata + char* _module = reinterpret_cast(0x400000); + auto hash1 = Utils::Cryptography::JenkinsOneAtATime::Compute(_module + 0x1000, 0x2D531F); // .text + auto hash2 = Utils::Cryptography::JenkinsOneAtATime::Compute(_module + 0x2D75FC, 0xBDA04); // .rdata if ((hash1 != 0x54684DBE #ifdef DEBUG && hash1 != 0x8AADE716 @@ -79,7 +79,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l #endif DWORD oldProtect; - VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); // Protect the .text segment + VirtualProtect(_module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); // Protect the .text segment // Install entry point hook Utils::Hook(0x6BAC0F, Main::EntryPoint, HOOK_JUMP).install()->quick();