[AntiCheat] Correctly call startup time check so that it still runs if the AntiCheat is bypassed.

This commit is contained in:
TheApadayo 2019-01-06 14:02:17 -05:00
parent 69de8c3ac1
commit 13cfe567a3
2 changed files with 6 additions and 2 deletions

View File

@ -869,12 +869,10 @@ namespace Components
// crash client if they are using process suspension to inject dlls during startup (aka before we got to here)
// maybe tweak this value depending on what the above logging reveals during testing,
// but 5 seconds seems about right for now
#ifndef DISABLE_ANTICHEAT
int time = diffSt.wMilliseconds + (diffSt.wSecond * 1000) + (diffSt.wMinute * 1000 * 60);
if (time > 5000) {
Components::AntiCheat::CrashClient();
}
#endif
// use below for logging when using StartSuspended.exe
// FILE* f = fopen("times.txt", "a");

View File

@ -220,6 +220,12 @@ namespace Components
// Table lookup stuff
Utils::Hook(0x62DCC1, CardTitles::TableLookupByRowHookStub).install()->quick();
Utils::Hook::Nop(0x62DCC6, 1);
// This is placed here in case the anticheat has been disabled!
// This checks specifically for launching the process suspended to inject a dll
#if !defined(DISABLE_ANTICHEAT)
AntiCheat::CheckStartupTime();
#endif
}
CardTitles::~CardTitles()