Results 1 to 3 of 3
  1. #1
    J0nathan27's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    115
    Reputation
    10
    Thanks
    6
    My Mood
    Yeehaw

    Detected C++ Game Hacks/Memory Hacks

    If anyone could post some outdated/detected game hacks here that would be cool. I want to look at them and learn from them.

  2. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    There are coding sections for a bunch of games on mpgh.. you can find sources there

  3. #3
    InunoTaishou's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    The Internet
    Posts
    446
    Reputation
    20
    Thanks
    950
    My Mood
    Relaxed
    No Spread -- No Recoil For Combat Arms (I don't have the original Author saved, this is also in the .rar)
    Code:
    //===================
    #include <Windows.h>
    //===================
    
    //================================================================
    void* g_pOriginalGetRecoil = NULL;
    void* g_pOriginalGetDeviation = NULL;
    void** g_pGetRecoilVTableAddress = (void**)0x020A3ACC;  //adress
    void** g_pGetDeviationVTableAddress = (void**)0x020A3AC8; //adress
    //================================================================
    
    //================================================================
    void __declspec(naked) hkGetRecoil(void) //GetRecoil
    {
    	__asm
    	{
    		xor eax, eax
    			mov[ecx + 0x164], eax
    			mov[ecx + 0x16C], eax
    			jmp dword ptr[g_pOriginalGetRecoil]
    	}
    }
    
    
    void __declspec(naked) hkGetDeviation(void) //GetDeviation
    {
    	__asm
    	{
    		xor eax, eax
    			mov[ecx + 0x140], eax
    			mov[ecx + 0x13C], eax
    			jmp dword ptr[g_pOriginalGetDeviation]
    	}
    }
    
    unsigned long __stdcall HookThread(void* param) //Hooking
    {
    	unsigned long flOldProtection;
    	if ((int)param == 1)				//Enable Hook
    	{
    		if (!g_pOriginalGetDeviation)
    			g_pOriginalGetDeviation = *g_pGetDeviationVTableAddress;													//Backing up Original Functions
    		if (!g_pOriginalGetRecoil)
    			g_pOriginalGetRecoil = *g_pGetRecoilVTableAddress;
    
    		if (VirtualProtect(g_pGetDeviationVTableAddress, 8, PAGE_READWRITE, &flOldProtection))							//Removing memory protection
    		{
    			*g_pGetDeviationVTableAddress = hkGetDeviation;																//Swapping VTable Pointers
    			*g_pGetRecoilVTableAddress = hkGetRecoil;
    			return VirtualProtect(g_pGetDeviationVTableAddress, 8, flOldProtection, &flOldProtection);						//Readding normal memory protection
    		}
    		else
    		{
    			return 0;
    		}
    	}
    	else //Disable Hook
    	{
    		if (VirtualProtect(g_pGetDeviationVTableAddress, 8, PAGE_READWRITE, &flOldProtection))							//Removing memory protection
    		{
    			*g_pGetDeviationVTableAddress = g_pOriginalGetDeviation;													//Setting VTable pointers back to original ones
    			*g_pGetRecoilVTableAddress = g_pOriginalGetRecoil;
    			return VirtualProtect(g_pGetDeviationVTableAddress, 8, flOldProtection, &flOldProtection);						//Readding normal memory protection
    		}
    		else
    		{
    			return 0;
    		}
    	}
    	return 1;
    }
    
    
    unsigned long __stdcall DllMain(HMODULE hModule, unsigned long ulReason, void* param)
    {
    	if (ulReason == DLL_PROCESS_ATTACH)
    	{
    		CloseHandle(CreateThread(NULL, 0, &HookThread, (void*)1, 0, NULL)); //Enable hook
    	}
    	else if (ulReason == DLL_PROCESS_DETACH)
    	{
    		CloseHandle(CreateThread(NULL, 0, &HookThread, NULL, 0, NULL)); //Disable hook
    	}
    	return 1;
    }
    //==================================================================================================================

Similar Threads

  1. [Detected] Mamo`s Hack [ Memory Hack ]
    By mamo007 in forum CrossFire Hacks & Cheats
    Replies: 105
    Last Post: 02-05-2014, 12:20 PM
  2. [Discussion] Why this game section have no memory hacks =[
    By J in forum Piercing Blow Discussions
    Replies: 11
    Last Post: 11-13-2011, 04:42 AM
  3. [Tutorial] Basic C++ Game Hacking (Memory Editing)
    By Tukjedude in forum C++/C Programming
    Replies: 17
    Last Post: 06-05-2010, 08:23 AM
  4. [Hack D/C Fix] Exit when going into a game? / reference memory fix
    By shnarg in forum Combat Arms Hacks & Cheats
    Replies: 4
    Last Post: 08-09-2009, 12:52 AM
  5. Best way to not get hacks detected in game guard games
    By ass in forum General Game Hacking
    Replies: 5
    Last Post: 05-01-2009, 02:45 AM