Results 1 to 1 of 1
  1. #1
    jdslashv2's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Bratislava
    Posts
    138
    Reputation
    10
    Thanks
    267
    My Mood
    Yeehaw

    Battlefield 3 Hack Snippets / Offsets Thread

    Post any snippets or offsets here
    Also try not to get off topic

    Masskill:
    Undetected (Depending on where you call it)
    Code:
    void FUCKIT(DWORD mem1, DWORD mem2)
    {
    	fb::ClientGameContext *pCtx = (fb::ClientGameContext*)(*(DWORD*)mem1);
    	if (pCtx && pCtx->m_clientPlayerManager)
    	{
    		eastl_vector<fb::ClientPlayer*> *playerVector = &pCtx->m_clientPlayerManager->m_players;
    		int maxPlayers = playerVector->size();
    		for (int i = 0; i < maxPlayers; i++)
    		{
    			if (playerVector->at(i) && (playerVector->at(i)->m_soldier.m_data))
    			{
    				fb::ClientSoldierEntity *pSoldier = (fb::ClientSoldierEntity*)(*(DWORD*)playerVector->at(i)->m_soldier.m_data - 0x4);
    				if (pSoldier)
    				{
    					if (pCtx->m_clientPlayerManager->m_localPlayer && pCtx->m_clientPlayerManager->m_localPlayer->m_soldier.m_data)
    					{
    						fb::ClientSoldierEntity *pMySoldier = (fb::ClientSoldierEntity*)(*(DWORD*)pCtx->m_clientPlayerManager->m_localPlayer->m_soldier.m_data - 0x4);
    						if (pMySoldier && pMySoldier->getCurrentWeapon() && pCtx->m_clientPlayerManager->m_localPlayer->m_teamId != playerVector->at(i)->m_teamId)
    						{
    							fb::ClientWeapon *weapon = pMySoldier->getCurrentWeapon()->m_weapon;
    							if (weapon)
    							{
    								DWORD dwCall = mem2;
    								for (int i = 0; i < 7; i++)
    								{
    									__asm
    									{
    										push ecx;
    										mov ecx, weapon;
    										push pSoldier;
    										call dwCall;
    										pop ecx;
    									}
    								}
    							}
    						}
    					}
    				}
    			}
    		}
    	}
    }
    
    namespace RE
    {
    	bool bDataCompare(const BYTE *pData, const BYTE *bMask, const TCHAR *szMask)
    	{
    		for(; *szMask; ++szMask, ++pData, ++bMask)
    			if (*szMask == 'x' && *pData != *bMask)
    				return false;
    		return (*szMask) == NULL;
    	}
    	DWORD dwFindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, TCHAR *szMask)
    	{
    		for (DWORD i = 0; i < dwLen; i++)
    			if (bDataCompare((BYTE*)(dwAddress + i), bMask, szMask))
    				return (DWORD)(dwAddress + i);
    		return NULL;
    	}
    }
    Code:
    HMODULE hInst_BF3;
    DWORD memCtx;
    DWORD memFuck;
    
    hInst_BF3 = GetModuleHandleA("bf3.exe");
    memCtx  = *(DWORD*)(RE::dwFindPattern((DWORD)hInst_BF3, 0x01aa0000, (BYTE*)"\x83\xc7\x04\x3b\xfb\x75\xf0\x8b\x0d", "xxxxxxxxx") + 0x09);
    memFuck = RE::dwFindPattern((DWORD)hInst_BF3, 0x01aa0000, (BYTE*)"\xC7\x44\x24\x00\x00\x00\x00\x00\x8B\xCE\xE8\x00\x00\x00\x00\x8b\x7d", "xxx?xxxxxxx????xx") - 0x2b;
    Code:
    	if (GetAsyncKeyState(VK_MENU) < 0)
    	{
    		if (!g_bKeyState)
    		{
    			g_bKeyState = true;
    			FUCKIT(memCtx, memFuck);
    		}
    	} else {
    		if (g_bKeyState)
    			g_bKeyState = false;
    	}
    Last edited by jdslashv2; 01-17-2012 at 07:13 PM.
    sig?

Similar Threads

  1. Hack/Guide compilation thread.
    By TheUser in forum Call of Duty 5 - World at War Hacks
    Replies: 10
    Last Post: 10-27-2010, 06:14 PM
  2. [Release] Battlefield Hacks (PICTURE + RIGHT VIRUSSCAN)
    By tambre in forum Battlefield Heroes Hacks
    Replies: 3
    Last Post: 06-15-2010, 10:29 PM
  3. A.V.A. Hacks Official Help Thread
    By Corndog in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 315
    Last Post: 11-29-2009, 05:34 PM
  4. Killzone's hack pack help thread.
    By Dextral in forum Combat Arms Hacks & Cheats
    Replies: 12
    Last Post: 08-18-2009, 02:07 PM
  5. [REQUEST]POST ANY CA HACKS IN THIS THREAD
    By bdougie221 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 10-07-2008, 09:50 PM