| View previous topic :: View next topic |
| Author |
Message |
Megamandos How do I cheat?
Reputation: 0
Joined: 04 Aug 2009 Posts: 1
|
Posted: Mon Aug 10, 2009 8:59 pm Post subject: Replace with custom code instead of NOP OpCodes |
|
|
EDIT2: Figured it out. did the following:
Wrote this:
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
1A37C796:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov ecx,[esi+30]
nop
originalcode:
mov [edx+eax*4],ecx
mov ecx,[esi+30]
exit:
jmp returnhere
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
1A37C796:
mov [edx+eax*4],ecx
mov ecx,[esi+30] |
Then File>Assign to current cheat table.
ORIGINAL:
I am trying to make a cheat table or trainer for fear 2 v1.04. I found the codes that update ammo for weapons when they are fired, and I want to have it update the ammo to what that weapon currently is holding... I know this sounds weird but bare with me. I am trying not to have to go into explaining all the stuff I found out about how oddly they programmed fear 2.
Basically what I want to do is replace the code with something else instead of with "NOP" opcodes. And not have to open up assembler and edit the memory values every time I start up the game. And I don't want to have to patch any files to achieve this. So is there a way to have it replace code with my code instead of NOP opcodes?
EDIT: I guess a better way to ask is: will a cheat table/trainer (made by CE) be able to do assembler code injection?[/code]
|
|
| Back to top |
|
 |
Deltron Z Expert Cheater
Reputation: 1
Joined: 14 Jun 2009 Posts: 164
|
Posted: Tue Aug 11, 2009 7:01 am Post subject: |
|
|
You didn't have to create a code cave for this, you simply repalced the instructions order... a simpler way would be:
| Code: | [Enable]
Address:
mov ecx,[esi+30]
mov [edx+eax*4],ecx
[Disable]
Address:
mov [edx+eax*4],ecx
mov ecx,[esi+30] |
|
|
| Back to top |
|
 |
Megamandos How do I cheat?
Reputation: 0
Joined: 04 Aug 2009 Posts: 1
|
Posted: Tue Aug 11, 2009 7:27 pm Post subject: |
|
|
| What is the disadvantage of using code caves? I mean, the small amount of memory they use up doesn't matter that much, does it?
|
|
| Back to top |
|
 |
Deltron Z Expert Cheater
Reputation: 1
Joined: 14 Jun 2009 Posts: 164
|
Posted: Wed Aug 12, 2009 7:01 am Post subject: |
|
|
| It doesn't really matter in this case, I just thought you might want to know this since you're not using more than 5 bytes (size of far jmp/call) you could simply rewrite the original opcodes without a code cave and fill with NOPs if needed, shorter code.
|
|
| Back to top |
|
 |
Megamandos How do I cheat?
Reputation: 0
Joined: 04 Aug 2009 Posts: 1
|
Posted: Sat Aug 15, 2009 11:40 am Post subject: |
|
|
| Oh ic, I just started learning asm a feww days ago. Thanks.
|
|
| Back to top |
|
 |
|