C ++ change value address 64 bit games

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
KevinDA
Cheater
Cheater
Posts: 43
Joined: Thu Apr 16, 2020 12:28 pm
Reputation: 0

C ++ change value address 64 bit games

Post by KevinDA »

#include

#include

#include

#include

#ifdef __MINGW32__

#include

#endif



using namespace std;

int main(){









DWORD Target = 0x22ACBA164D0;

SIZE_T bytes = 0;

BYTE exampleBytes[5] = { 0x8B,0xFF,0x55,0x8B,0xEC };



HWND hWnd;

while( !( hWnd = FindWindow( NULL, "Calculatrice" ) ) )

Sleep( 100 );



DWORD PID;

while( !( GetWindowThreadProcessId( hWnd, &PID ) ) )

Sleep( 100 );



// as learn_more said, you need process handle.

HANDLE hProcess;

while( !( hProcess = OpenProcess( PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE, 0, PID ) ) )

Sleep( 100 );



WriteProcessMemory( hProcess, (PVOID)Target, exampleBytes, 5, &bytes );

system("pause");

return 0;

}

Post Reply

Who is online

Users browsing this forum: No registered users