i used the tutorial above and made a hack, my source code at the bottom. and when i enter the game my fps shows up, but after like 30 seconds combat arms, D/C, and then i try ed packing with the demo version of TheMida, and it still didn't work.And my second problem is when i open up kernal detactive to dump engine.exe, it says, that the program has stopped working and it forces me to close the program. then i have a file that is dumped, and i try to open it olly and it gets a error that says: "Unable to start File" then it cant open it whats wrong, while all this is happening i have been able to code 1 never before seen hack, that i will release soon, and if you can help me you will be in the credits.
Code:
#include <windows.h>
//*****************************************************************************
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
//*****************************************************************************
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
//*****************************************************************************
void main()
{
while (!IsGameReadyForHook()){
// Sleep(20);
}
bool espbox = false;
bool norecoil = false;
bool ireload = false;
bool gwalls = false;
while(true){
PushToConsole("ShowFps 1");
if(GetAsyncKeyState(VK_NUMPAD1)<0){
if(espbox){
PushToConsole("ModelDebug_DrawBoxes 0");
espbox = false;
} else {
PushToConsole("ModelDebug_DrawBoxes 1");
espbox = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD2)<0){
if(ireload){
memcpy((LPVOID)0x37466264, "\x0F\x84\xB1\x01\x00\x00", 6);
ireload = false;
} else {
memcpy((LPVOID)0x37466264, "\x90\x90\x90\x90\x90\x90", 6);
ireload = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD3)<0){
if(norecoil){
memcpy((LPVOID)0x3741A550, "\xD8\x66\x54", 3);
memcpy((LPVOID)0x3740AA99, "\xD9\x46\x54", 3);
memcpy((LPVOID)0x3741A564, "\xD9\x5E\x54", 3);
memcpy((LPVOID)0x3741A567, "\xD9\x46\x48", 3);
memcpy((LPVOID)0x3741A570, "\xD9\x5E\x48", 3);
norecoil = false;
} else {
memcpy((LPVOID)0x3741A550, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3740AA99, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A564, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A567, "\x90\x90\x90", 3);
memcpy((LPVOID)0x3741A570, "\x90\x90\x90", 3);
norecoil = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD4)<0){
if(gwalls){
memcpy((LPVOID)0x57207A, "\x6A\x01", 2);
gwalls = false;
} else {
memcpy((LPVOID)0x57207A, "\x6A\x00", 2);
gwalls = true;
}
}
//Sleep(20);
}
}
//*****************************************************************************
DWORD WINAPI dwHackThread(LPVOID)
{
while( !IsGameReadyForHook() )
Sleep(100);
main();
return 0;
}
//*****************************************************************************
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
hint: the secret hack is not in here yet