
12-21-2008, 08:18 PM
|
 | Codemotion.net | | Join Date: Aug 2008 Location: Azeroth
Posts: 320
Thanks: 15
Thanked 110 Times in 30 Posts
Reputation: 1064
Rep Power: 7 | |
| [BF2] Nametag Delay Hack To quote myself: Quote:
Well this is pretty much a failed experiment. I tried to make a nametag hack that just edited delays in order to work. It does work, but there's a problem:
It also makes delays longer for stuff like ammunition and med packs so after a while when there's too much stuff on the screen the enemy tags start to disappear. It was undetected when I tested but consider it detected now as it's public.
Good news though, it's open-source!
To be more precise, I edited the fade delay, another fade delay, the time before the tag appears when you point your gun at the enemy (0.6 seconds to 0 seconds if I remember well) and the death nametag fade delay (pretty useless).
Two of the offsets in dissasembly were protected, had to use VirtualProtectEx(). Also, in order to figure out the addresses, I used ReadProcessMemory() for reading the 4 bytes of the addresses stored at other addresses. Each byte of the address written in little-endian is read and with some math, stored back into a real, usable address.
| Source: Source:SimpleBF2Hack - Codemotion Source Preview: Quote:
#include <windows.h>
#include <Tlhelp32.h>
#include <iostream>
#define WRITE(i,w,l) WriteProcessMemory(hProc,reinterpret_cast<LPVOID>( GameDLL + i),w,l,&dSize)
using namespace std;
DWORD GetPID (char* proc);
void EnableDebugPriv();
DWORD GetDLL (char* DllName, DWORD tPid);
int main(void)
{
SetConsoleTitle("TyranO's Nametag Hack);
if(GetPID("BF2.exe") == 0)
{
cout << "Please open BF2 1.41 before loading the hack." << endl << endl;
system("Pause");
return(0);
}
else
{
EnableDebugPriv();
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, false, GetPID("BF2.exe"));
if(hProc)
{
cout << "BF2 Hack by TyranO loaded!" << endl << endl;
DWORD GameDLL = GetDLL("RendDX9.dll",GetPID("BF2.exe"));
DWORD NullBase = GetDLL("BF2.dll",GetPID("BF2.exe"));
DWORD dSize = 0;
SIZE_T BytesRead = 0;
//Offset 1 (Fade out delay)
DWORD Address1 = 1227505;
DWORD Address2 = 1227506;
DWORD Address3 = 1227507;
DWORD Address4 = 1227508;
DWORD Buffer1 = 0;
DWORD Buffer2 = 0;
DWORD Buffer3 = 0;
DWORD Buffer4 = 0;
// Offset 2 (Fade out delay fix)
DWORD Address5 = 1235082;
DWORD Address6 = 1235083;
DWORD Address7 = 1235084;
DWORD Address8 = 1235085;
DWORD Buffer5 = 0;
DWORD Buffer6 = 0;
DWORD Buffer7 = 0;
DWORD Buffer8 = 0;
... Source:SimpleBF2Hack/bf2hack.cpp - Codemotion |
Last edited by TyranO; 02-23-2009 at 11:28 PM.
|