Optimize stuff
This commit is contained in:
parent
f2cdd84416
commit
70ff5e23ab
@ -92,12 +92,6 @@ namespace Components
|
|||||||
AntiCheat::Hash.clear();
|
AntiCheat::Hash.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI TestTest(const char* test)
|
|
||||||
{
|
|
||||||
OutputDebugStringA(test);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AntiCheat::InitLoadLibHook()
|
void AntiCheat::InitLoadLibHook()
|
||||||
{
|
{
|
||||||
static uint8_t loadLibStub[] = { 0x33, 0xC0, 0xC2, 0x04, 0x00 }; // xor eax, eax; retn 04h
|
static uint8_t loadLibStub[] = { 0x33, 0xC0, 0xC2, 0x04, 0x00 }; // xor eax, eax; retn 04h
|
||||||
@ -138,35 +132,39 @@ namespace Components
|
|||||||
AntiCheat::PerformCheck();
|
AntiCheat::PerformCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AntiCheat::PatchWinAPI()
|
void AntiCheat::UninstallLibHook()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ARRAYSIZE(AntiCheat::LoadLibHook); ++i)
|
for (int i = 0; i < ARRAYSIZE(AntiCheat::LoadLibHook); ++i)
|
||||||
{
|
{
|
||||||
AntiCheat::LoadLibHook[i].Uninstall();
|
AntiCheat::LoadLibHook[i].Uninstall();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize directx :P
|
void AntiCheat::InstallLibHook()
|
||||||
Utils::Hook::Call<void()>(0x5078C0)();
|
{
|
||||||
|
|
||||||
AntiCheat::LoadLibHook[0].Install();
|
AntiCheat::LoadLibHook[0].Install();
|
||||||
AntiCheat::LoadLibHook[1].Install();
|
AntiCheat::LoadLibHook[1].Install();
|
||||||
//AntiCheat::LoadLibHook[2].Install();
|
//AntiCheat::LoadLibHook[2].Install();
|
||||||
//AntiCheat::LoadLibHook[3].Install();
|
//AntiCheat::LoadLibHook[3].Install();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AntiCheat::PatchWinAPI()
|
||||||
|
{
|
||||||
|
AntiCheat::UninstallLibHook();
|
||||||
|
|
||||||
|
// Initialize directx :P
|
||||||
|
Utils::Hook::Call<void()>(0x5078C0)();
|
||||||
|
|
||||||
|
AntiCheat::InstallLibHook();
|
||||||
|
}
|
||||||
|
|
||||||
void AntiCheat::SoundInitStub()
|
void AntiCheat::SoundInitStub()
|
||||||
{
|
{
|
||||||
AntiCheat::LoadLibHook[0].Uninstall();
|
AntiCheat::UninstallLibHook();
|
||||||
AntiCheat::LoadLibHook[1].Uninstall();
|
|
||||||
//AntiCheat::LoadLibHook[2].Uninstall();
|
|
||||||
//AntiCheat::LoadLibHook[3].Uninstall();
|
|
||||||
|
|
||||||
Game::SND_InitDriver();
|
Game::SND_InitDriver();
|
||||||
|
|
||||||
AntiCheat::LoadLibHook[0].Install();
|
AntiCheat::InstallLibHook();
|
||||||
AntiCheat::LoadLibHook[1].Install();
|
|
||||||
//AntiCheat::LoadLibHook[2].Install();
|
|
||||||
//AntiCheat::LoadLibHook[3].Install();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOOL WINAPI AntiCheat::VirtualProtectStub(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect)
|
// BOOL WINAPI AntiCheat::VirtualProtectStub(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect)
|
||||||
|
@ -22,6 +22,9 @@ namespace Components
|
|||||||
|
|
||||||
static void NullSub();
|
static void NullSub();
|
||||||
|
|
||||||
|
static void UninstallLibHook();
|
||||||
|
static void InstallLibHook();
|
||||||
|
|
||||||
static void SoundInitStub();
|
static void SoundInitStub();
|
||||||
static BOOL WINAPI VirtualProtectStub(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect);
|
static BOOL WINAPI VirtualProtectStub(LPVOID lpAddress, SIZE_T dwSize, DWORD flNewProtect, PDWORD lpflOldProtect);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user