iw4x-client/src/Components/Modules/AntiCheat.hpp

51 lines
1.2 KiB
C++
Raw Normal View History

2016-08-07 10:50:04 -04:00
// Uncomment that to see if we are preventing necessary libraries from being loaded
//#define DEBUG_LOAD_LIBRARY
namespace Components
{
class AntiCheat : public Component
{
public:
AntiCheat();
~AntiCheat();
const char* GetName() { return "Component"; }; // Wrong name :P
static void CrashClient();
static void EmptyHash();
static void InitLoadLibHook();
2016-08-07 15:46:30 -04:00
static void IntegrityCheck();
2016-08-07 10:50:04 -04:00
private:
static int LastCheck;
static std::string Hash;
static void Frame();
static void PerformCheck();
static void PatchWinAPI();
static void NullSub();
2016-08-07 19:57:00 -04:00
static void AssertCalleeModule(void* callee);
2016-08-07 15:46:30 -04:00
2016-08-07 10:50:04 -04:00
static void UninstallLibHook();
static void InstallLibHook();
#ifdef DEBUG_LOAD_LIBRARY
static HANDLE LoadLibary(std::wstring library, void* callee);
static HANDLE WINAPI LoadLibaryAStub(const char* library);
static HANDLE WINAPI LoadLibaryWStub(const wchar_t* library);
#endif
static void CinematicStub();
2016-08-07 15:46:30 -04:00
static void SoundInitStub(int a1, int a2, int a3);
static void SoundInitDriverStub();
2016-08-07 19:57:00 -04:00
static void DObjGetWorldTagPosStub();
2016-08-07 15:46:30 -04:00
static void AimTargetGetTagPosStub();
2016-08-07 10:50:04 -04:00
static Utils::Hook LoadLibHook[4];
};
}