Our Call of Duty: Modern Warfare 2 Trainer is now available and supports RETAIL.
Our Call of Duty: Modern Warfare 2 message board is available to provide feedback on our trainers or cheats.
HonestGamer posted on Dec 12, 2009 10:59:18 AM - Report post
Maybe there is an issue with shared routines, that oppcode might be used by the system functions.
What value type is your health? By the looks of it, I think it is 4 bytes...And I suspect it is not, must be float.
But however try this, I am believing the value indeed is in 4 bytes.
newmem: push eax //Push the value of eax register to the stack mov [esi+04],00000064 //Forces a 100 value to the oppcode writing to your health. pop eax //Pop the value of the eax register from the stack
originalcode: pop esi ret //Codes from which the bytes were taken by CE to initialize jump to newmem
Got to tell, I really don't think the value is in 4 bytes...Most of the newer games use float to store their "Real" health value. The value you may have found must be affecting the visual status...Which is used by system functions ATM.
And you must be wondering why I included "push eax" and "pop eax" in newmem. This is a healthy practice, as it does not let the values of registers get lost. To do this for all registers rather than just eax, use:-
pushad //Push the value of ALL registers to the stack popad //Pop the value of ALL registers from the stack
[Edited by HonestGamer, 12/12/2009 11:07:54 AM]
Life is best for those who enjoy it, difficult for those who analyze it and worst for those who criticize it.
ELITE
coder47 posted on Dec 12, 2009 4:49:59 PM - Report post
Thank you for your help again , [esi+04] is 2 bytes, and it's original value is 30000(DEC), I tried to inject 65535(DEC),but no luck.Game still crashes.But when I use CE to frose [esi+04]'s value with 65535 it is OK, BTW, it seems [esi+04] is a static address, cause I noticed it is always green in CE.
The codes below neither works. newmem: push eax mov [esi+04],FFFF pop eax
originalcode: pop esi ret
newmem: pushad mov [esi+04],FFFF popad
originalcode: pop esi ret
I was wondering how to calculate [esi+04]'s address?
----------------------------------------------------------------- Yeeep, I have to say I coun't calculate or find [esi+04]'s address, but I evaded that with my little trick. You can have a try.