Thank you for your reply Praxeus.
Sorry I meant to add a link in the original post for all the source codes.
The links I'm posting are all messed up by the forum. Can you PM me and I'll send you the link via your email or something? As I'm not allow to PM either.
Or I'll just copy and paste them in here. These are all from the working trainer for Crysis 2 standard edition.
The codes below are for version 1.1 and updated 1.9 codes are at the bottom of the page.
; ENERGY
0115CBF9 /75 07 JNZ SHORT Crysis2.0115CC02 <---
0115CBFB |E8 01FEFFFF CALL Crysis2.0115CA01
0115CC00 |EB 05 JMP SHORT Crysis2.0115CC07
0115CC02 \E8 20FFFFFF CALL Crysis2.0115CB27
; NAMETAGS
01317471 E8 E2F8FFFF CALL Crysis2.01316D58 <---
01317476 8AD8 MOV BL,AL
01317478 885D FC MOV BYTE PTR SS:[EBP-4],BL
0131747B FF75 FC PUSH DWORD PTR SS:[EBP-4]
0131747E 8BCE MOV ECX,ESI
01317480 889E 38010000 MOV BYTE PTR DS:[ESI+138],BL
; AMMO
01139BC6 /74 0A JE SHORT Crysis2.01139BD2 <---
01139BC8 |8B4D 10 MOV ECX,DWORD PTR SS:[EBP+10]
01139BCB |8948 04 MOV DWORD PTR DS:[EAX+4],ECX
01139BCE |B0 01 MOV AL,1
01139BD0 |EB 17 JMP SHORT Crysis2.01139BE9
01139BD2 \8B45 10 MOV EAX,DWORD PTR SS:[EBP+10]
source:
#include <windows.h>
#include <stdio.h>
bool writemem(unsigned int addr, const char* data, unsigned int size)
{
bool ret = false;
if (HWND hwnd = FindWindowA(NULL, "Crysis 2 (TM)"))
{
DWORD procid;
if (GetWindowThreadProcessId(hwnd, &procid))
{
if (HANDLE hproc = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_WRITE, FALSE, procid))
{
if (WriteProcessMemory(hproc, (void*)addr, data, size, NULL))
ret = true;
CloseHandle(hproc);
}
}
}
return ret;
}
void main(void)
{
bool ammo = false, energy = false, nametags = false;
SetConsoleTitleA("crysis 2 mp trainer 1.1");
printf("crysis 2 mp trainer 1.1\n\nby batfitch - www.*************.me\n\n");
printf("F1 - toggle unlimited ammo / no reload\nF2 - toggle unlimited energy\nF3 - toggle nametags\n\n");
while (true)
{
if (GetAsyncKeyState(VK_F1))
{
Beep(512, 100);
printf("%s", writemem(0x01139BC6, ammo ? "\x74" : "\xEB", 1) ? "ammo toggled\n" : "something went wrong. game running?\n");
ammo = !ammo;
}
else if(GetAsyncKeyState(VK_F2))
{
Beep(512, 100);
printf("%s", writemem(0x0115CBF9, energy ? "\x75" : "\xEB", 1) ? "energy toggled\n" : "something went wrong. game running?\n");
energy = !energy;
}
else if (GetAsyncKeyState(VK_F3))
{
Beep(512, 100);
printf("%s", writemem(0x01317476, nametags ? "\x8A\xD8" : "\xB3\x01", 2) ? "nametags toggled\n" : "something went wrong. game running?\n");
nametags = !nametags;
}
Sleep(100);
}
}
Updated 1.9
DWORD pInfAmmo = 0xFF1CB2;
DWORD pInfNRG = 0x101685B;
DWORD pNameTag = 0x11D3EB7;
pSSystemGlobalEnvironment = *(SSystemGlobalEnvironment**)0x1724340;
PHP Code:
If you could make this trainer will it work for both Origin & Steam version of MaxE?
Thx in advance.