void DLLInit() { game_mp = (int)GetModuleHandle("game_mp_x86.dll"); Com_Printf("[game_mp: %02x]\n", game_mp); cracking_hook_call(0x20031AD8, (int)GScr_LoadGameTypeScript); cracking_hook_call(0x2002747C, (int)myClientCommand); //cracking_hook_function(0x20038030, (int)Scr_LoadGameType); //_memset((void*)0x200198F0, NOP, 5); level = *(level_locals_t*)0x202CDB80; }
COD::COD() { /* Check for CoD 1.5 patch if(memcmp((void*)0x5A60D0, "1.5", 3) == 0) }*/ for(int i = 0; i < MAX_ENTITY_SIZE; i++) { this->entities[i].index = i; this->entities[i].base = g_entities + GENTITY_SIZE * i; this->entities[i].ptr = g_entities + GENTITY_SIZE * i; } version(); Cmd_AddCommand("codextended", version); Cmd_AddCommand("codversion", version); Cmd_AddCommand("help", version); Cmd_AddCommand("cracked", setCracked); InitScript(); initializeClient(); cracking_hook_call(0x465629, (int)Sys_LoadDll); if(GetModuleHandle("game_mp_x86.dll") != NULL) DLLInit(); }
void crackGSCFunctions() { cracking_hook_call(0x4686FA, (int)Sys_LoadDll); if (GetModuleHandle("uo_game_mp_x86.dll") != NULL) { ScriptInitiating(); } cracking_hook_function(0x2003AA50, (int)closer); }
DWORD WINAPI MyThread(LPVOID) { if (isStarted) { Com_Printf("Already started!\n"); return (int)NULL; } isStarted = 1; Com_Printf("[PLUGIN LOADED]\n"); #if COD_VERSION == COD2_1_0 int * addressToDownloadPointer = (int *)0x0591D74; #elif COD_VERSION == COD2_1_3 int * addressToDownloadPointer = (int *)0x05D43DC; #else #warning int *addressToDownloadPointer = NULL; int *addressToDownloadPointer = NULL; #endif #if COD_VERSION == COD2_1_0 || COD_VERSION == COD2_1_3 Com_Printf("> [INFO] value of download=%.8x\n", *addressToDownloadPointer); SV_BeginDownload_f = (SV_BeginDownload_f_t)*addressToDownloadPointer; *addressToDownloadPointer = (int)hook_SV_BeginDownload_f; #endif #if COD_VERSION == COD2_1_0 cracking_hook_call(0x46B83F, (int)Scr_GetCustomFunction); cracking_hook_call(0x46BA83, (int)Scr_GetCustomMethod); #elif COD_VERSION == COD2_1_3 cracking_hook_call(0x46E7BF, (int)Scr_GetCustomFunction); cracking_hook_call(0x46EA03, (int)Scr_GetCustomMethod); //cracking_hook_function((int)gametype_scripts, (int)hook_codscript_gametype_scripts); //cracking_hook_call(hook_ClientCommand_call, (int)hook_ClientCommand); #endif // just tested why the f**k nothing is printed in +dedicated 2 console... but it's printed ingame tho while(0) { Sleep(1000); Com_Printf("[PLUGIN LOADED]\n"); } return 0; }
void crackFunctions() { //cracking_hook_function(0x00458400, (int)hook_status); Cmd_AddCommand("help", version); cracking_hook_function(0x00458400, (int)hook_serverresponse); cracking_hook_call(0x004611B7, (int)hook_maxclients); }