#include /* TODO: - Finish off security on client: - Add dump protection (closes csgo.exe if a handle is detected, probably explorer shellcode) - Add HWID generation [half-assed atm] - Switch Themida with VMP (Superior VM imho and I can fuck people over with my cool script (: ) - Finish off shellcode execution wrapper: - The shellcode can be executed via two ways - Either the code is mapped and called via CreateRemoteThread (allows custom param) - or the code is mapped and called via DX9 (does not allow custom param) - This will probably be the easiest thing to do. - Finish off injection wrapper: - Allocate a 4KB page for trampoline imports (4096/6) { E9 ? ? ? ? C3 } - Actually, allocate every memory page as a bunch of consecutive 4kb sections - Trampoline for imports - Everything is already laid out, tbh. - Have the loader inject a .DLL :^) TODO (Nave): - Make the UI look nice. - Adapt the server to work with your backend. */ #pragma optimize("", off) int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow) { /*WRAP_IF_DEBUG*/(Utils::OpenConsole()); /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// // Create a thread to handle UI. std::thread WindowThread([] { // Create a window, initialise DirectX context. if(!UserInterface->Start()) ERROR_ASSERT("[000F:00001C00] Failed to initialize. Please contact an administrator."); UserInterface->RunUiFrame(); }); WindowThread.detach(); while(!UserInterface->m_Data.m_Ready) { Sleep(1); } // Initialize the syscall manager. if(!Syscalls->Start()) ERROR_ASSERT("[000F:00001B00] Failed to initialize. Please contact an administrator."); // Initialize the runtime protection system. WRAP_IF_RELEASE( if(!Protection->Start()) ERROR_ASSERT("[000F:00001A00] Failed to initialize. Please contact an administrator."); ); // Wait for connection. UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_WAITING; // Attempt to connect to the remote server. Networking::TCPClientPtr Client = std::make_unique(); if(!Client->Start(LOCAL_IP, SERVER_PORT)) ERROR_ASSERT("[000F:0002A000] Server closed the connection unexpectedly."); // Allow the user to input their log-in data. UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_LOG_IN; while(UserInterface->m_Data.m_ExecutionState != UserExperience::EXECUTION_WAITING) { Sleep(1); } // TODO: Add game selection. while(1) { if(GetAsyncKeyState(VK_END) & 0x8000) break; Sleep(1); } /////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// } #pragma optimize("", on)