KevinD Cheater
Reputation: 0
Joined: 15 Apr 2020 Posts: 39
|
Posted: Sun Jun 14, 2020 4:08 pm Post subject: C ++ change value address 64 bit games |
|
|
Good evening, I would like to modify in c ++ the values of addresses of 64 bit games. The following code is 32-bit. What should I change ?
#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#ifdef __MINGW32__
#include <windows.h>
#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;
}
|
|