diff --git a/README.md b/README.md index 1309c156..e13fbcc9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ | `--copy-pdb` | Copy debug information for binaries as well to the path given via --copy-to. | | `--force-unit-tests` | Always compile unit tests. | | `--force-exception-handler` | Install custom unhandled exception handler even for Debug builds. | -| `--force-minidump-upload` | Upload minidumps even for Debug builds. | +| `--disable-binary-check` | Do not perform integrity checks on the exe. | | `--iw4x-zones` | Zonebuilder generates iw4x zones that cannot be loaded without IW4x specific patches. | ## Command line arguments diff --git a/premake5.lua b/premake5.lua index 4a5fbe51..13c522be 100644 --- a/premake5.lua +++ b/premake5.lua @@ -82,8 +82,8 @@ newoption { } newoption { - trigger = "force-minidump-upload", - description = "Upload minidumps even for Debug builds." + trigger = "disable-binary-check", + description = "Do not perform integrity checks on the exe." } newoption { @@ -262,12 +262,12 @@ workspace "iw4x" if _OPTIONS["force-unit-tests"] then defines {"FORCE_UNIT_TESTS"} end - if _OPTIONS["force-minidump-upload"] then - defines {"FORCE_MINIDUMP_UPLOAD"} - end if _OPTIONS["force-exception-handler"] then defines {"FORCE_EXCEPTION_HANDLER"} end + if _OPTIONS["disable-binary-check"] then + defines {"DISABLE_BINARY_CHECK"} + end if _OPTIONS["iw4x-zones"] then defines {"GENERATE_IW4X_SPECIFIC_ZONES"} end diff --git a/src/Main.cpp b/src/Main.cpp index db9c14ad..38ae35a6 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -54,6 +54,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l Steam::Proxy::RunMod(); +#ifndef DISABLE_BINARY_CHECK // Ensure we're working with our desired binary auto* _module = reinterpret_cast(0x400000); auto hash1 = Utils::Cryptography::JenkinsOneAtATime::Compute(_module + 0x1000, 0x2D531F); // .text @@ -69,6 +70,7 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l DWORD oldProtect; VirtualProtect(_module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); // Protect the .text segment +#endif // Install entry point hook Utils::Hook(0x6BAC0F, Main::EntryPoint, HOOK_JUMP).install()->quick();