Don't unprotect the main process
This commit is contained in:
parent
5fb4ba3d29
commit
18b2944d2e
@ -56,11 +56,13 @@ BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*l
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
DWORD oldProtect;
|
||||
std::uint8_t* module = reinterpret_cast<std::uint8_t*>(GetModuleHandle(NULL));
|
||||
VirtualProtect(module, 0x6C73000, PAGE_EXECUTE_READWRITE, &oldProtect); // Unprotect the entire process
|
||||
//VirtualProtect(module, 0x6C73000, PAGE_EXECUTE_READWRITE, &oldProtect); // Unprotect the entire process
|
||||
VirtualProtect(module + 0x1000, 0x2D6000, PAGE_EXECUTE_READ, &oldProtect); // Protect the .text segment
|
||||
|
||||
|
||||
Main::EntryPointHook.Initialize(0x6BAC0F, [] ()
|
||||
{
|
||||
__asm
|
||||
|
Loading…
Reference in New Issue
Block a user