Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
alloc(newmem1,2048)
label(returnhere1)
label(originalcode1)
label(exit1)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
cmp [ebp+18],ecx
je 0044F557
originalcode:
cmp dword ptr [ebp+10],07
mov [esp+20],ebx
jl ps_game.exe+4F246
exit:
jmp returnhere
"ps_game.exe"+4F239:
jmp newmem
nop
returnhere:
"ps_game.exe"+754E2:
nop
nop
nop
nop
nop
nop
nop
nop
newmem1: //this is allocated memory, you have read,write,execute access
//place your code here
mov eax,01
cmp [esi+10],eax
jle 0044EC8C
originalcode1:
xor eax,eax
cmp [esi+10],eax
exit1:
jmp returnhere1
"ps_game.exe"+4EC70:
jmp newmem1
returnhere1:
[DISABLE]
"ps_game.exe"+4F239:
mov [esp+20],ebx
jl ps_game.exe+4F246
"ps_game.exe"+754E2:
cmp ebx,[ebp+000000DC]
je ps_game.exe+75505
"ps_game.exe"+4EC70:
xor eax,eax
cmp [esi+10],eax
//code from here till the end of the code will be used to disable the cheat