unsigned long __stdcall CheatMain(void* base)
{
#ifdef _SHOWLOG
Show();
WriteLine("Loading Infinite.tech Debug");
#endif
//static bool Debug = true;
static bool IPS = false;
if (!NOAUTH) {
while (!IPS) {
IPS = C_Check::main();
this_thread::sleep_for(2s);
}
}
#ifdef _SHOWLOG
if(NOAUTH)
WriteLine("Authentication Disabled");
else
WriteLine("Successfully Connected with Loader and Driver");
#endif
if (!NOAUTH) {
HWID::AuthenticateInjection();
}
#ifdef _SHOWLOG
if (!NOAUTH)
WriteLine("Successfully Authenticated Injection");
#endif
#ifdef _SHOWLOG
WriteLine("Localizing with Loader");
#endif
HMODULE InfiniteLoader;
while (!GetModuleHandleA("Infinite.Loader.dll")) {
this_thread::sleep_for(200ms);
}
#ifdef _SHOWLOG
WriteLine("Localizing with Loader");
#endif
InfiniteLoader = GetModuleHandleA("Infinite.Loader.dll");
#ifdef _SHOWLOG
WriteLine("Found Loader Handle");
WriteLine("Importing Loader");
#endif
auto LoaderGetHandle = (CLoaderGetHandle)GetProcAddress(InfiniteLoader, "GetLoaderHandle");
if (!LoaderGetHandle) {
#ifdef _SHOWLOG
WriteLine("Failed to Import Loader");
#endif
while (true) {
this_thread::sleep_for(200ms);
}
}
auto Loader = LoaderGetHandle();
while (!Loader->m_bInitialized) {
this_thread::sleep_for(200ms);
}
#ifdef _SHOWLOG
WriteLine("Imported Loader");
WriteLine("Localized with Loader");
#endif
if (Loader->m_iProcessID != FindProcessId("csgo.exe")) {
#ifdef _SHOWLOG
WriteLine("CS:GO Handle Invalid");
#endif
while (true) {
this_thread::sleep_for(200ms);
}
}
#ifdef _SHOWLOG
WriteLine("Getting Module Handles");
#endif
while (!(csgo->Init.Window = FindWindowA(hs::Valve001::s().c_str(), NULL)))
this_thread::sleep_for(200ms);
while (!GetModuleHandleA(hs::serverbrowser_dll::s().c_str()))
this_thread::sleep_for(200ms);
while (!GetModuleHandleA(hs::client_dll::s().c_str()))
this_thread::sleep_for(200ms);
while (!GetModuleHandleA(hs::engine_dll::s().c_str()))
this_thread::sleep_for(200ms);
//
#ifdef _SHOWLOG
WriteLine("Initializing Interfaces");
#endif
I::Setup();
#ifdef _SHOWLOG
WriteLine("Initializing Netvars");
#endif
InitializeNetvars();
#ifdef _SHOWLOG
WriteLine("Initializing Hooks");
#endif
H::Hook();
#ifdef _SHOWLOG
WriteLine("Loaded Infinite Debug");
while (true) {
csgo->ConnectedToInternet = HWID::ConnectedToInternet();
this_thread::sleep_for(17s);
}
#else
if (Debug) {
while (true) {
csgo->ConnectedToInternet = HWID::ConnectedToInternet();
this_thread::sleep_for(15s);
}
/*
while (true) {
this_thread::sleep_for(1s);
}
*/
}
else
{
while (true) {
csgo->ConnectedToInternet = HWID::ConnectedToInternet();
this_thread::sleep_for(17s);
}
Show();
this_thread::sleep_for(200ms);
auto sysc = std::chrono::system_clock::now();
time_t systime = time(0);
tm* ctime = localtime(&systime);
string c = ctime->tm_sec > 9 ? to_string(ctime->tm_sec) : "0" + to_string(ctime->tm_sec);
string m = ctime->tm_min > 9 ? to_string(ctime->tm_min) : "0" + to_string(ctime->tm_min);
string h = ctime->tm_hour > 9 ? to_string(ctime->tm_hour) : "0" + to_string(ctime->tm_hour);
string stime = h + ":" + m + ":" + c;
WriteLine(("[" + stime + "] - Detected Reverse Engineering").c_str());
this_thread::sleep_for(4s);
H::UnHook();
SetWindowLongPtr(csgo->Init.Window, GWL_WNDPROC, (LONG_PTR)csgo->Init.OldWindow);
FreeLibraryAndExitThread(csgo->Init.Dll, 0);
}
#endif
/*
if (csgo->DoUnload)
H::UnHook();
interfaces.engine->ClientCmd_Unrestricted(hs::clear::s().c_str(), 0);
interfaces.engine->ClientCmd_Unrestricted(hs::unload_message::s().c_str(), 0);
SetWindowLongPtr(csgo->Init.Window, GWL_WNDPROC, (LONG_PTR)csgo->Init.OldWindow);
//FreeLibraryAndExitThread(csgo->Init.Dll, 0);
*/
return 0;
}