 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Fri Mar 11, 2016 10:53 pm Post subject: Got code cave, do I need a better script? Game crashing |
|
|
I am not good with scripting. Anyway, so, I created a code cave, altered the assembly and it worked in game. So I created a simple script from other very simple scripts I have seen on here to replace the bytes. Here is the info:
| Code: |
[ENABLE]
fs2_open_3_7_2.exe+224133: <---Jump to code cave
db E9 73C1DDFF
fs2_open_3_7_2.exe+224138: <-- NOP leftover bytes
db 90 90 90
fs2_open_3_7_2.exe+2AB:
db C7 82 D8010000 0060EA46
fs2_open_3_7_2.exe+2B5:
db F3 0F10 8A D8010000
fs2_open_3_7_2.exe+2BD:
db E9 793E2200
[DISABLE]
fs2_open_3_7_2.exe+224133: <---replace JMP with original
db F3 0F10 8A D8010000
fs2_open_3_7_2.exe+2AB: <-- zero out the cave
db 00 00 00000000 00000000
fs2_open_3_7_2.exe+2B5:
db 00 0000 00 00000000
fs2_open_3_7_2.exe+2BD:
db 00 00000000
|
Anyway here is the assembly. Original:
| Code: |
fs2_open_3_7_2.exe+224133 - F3 0F10 8A D8010000 - movss xmm1,[edx+000001D8]
|
Replace with a jmp to go to code cave and NOP leftover bytes:
| Code: |
fs2_open_3_7_2.exe+224133 - E9 73C1DDFF 90 90 90 - jmp fs2_open_3_7_2.exe+2AB
|
Add my code cave:
| Code: |
fs2_open_3_7_2.exe+2AB - C7 82 D8010000 0060EA46 - mov [edx+000001D8],46EA6000 { 30000.00 }
fs2_open_3_7_2.exe+2B5 - F3 0F10 8A D8010000 - movss xmm1,[edx+000001D8]
|
Jump up to adress just after the jump to code cave:
| Code: |
fs2_open_3_7_2.exe+2BD - E9 793E2200 - jmp fs2_open_3_7_2.exe+22413B
|
Works great if i input the assembly in manually. I figured I could just tell it to replace the bytes with what i want and then set them back to the way they were. doing something else wrong? Game crashes when I activate the script. Can anyone help with a script solution or am I doing something else wrong? Thanks! |
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Mar 11, 2016 11:43 pm Post subject: |
|
|
I would strongly encourage you to make use of the auto assembly feature and let CE build your scripts for you. It is so much easier and it will help to mitigate potential pebcak errors.
I would also recommend pasting future scripts in their entirety, without any additional notes added to them, so that people can look at them to determine what might be causing any issues. |
|
| Back to top |
|
 |
gid2525 Expert Cheater
Reputation: 2
Joined: 21 Oct 2013 Posts: 103
|
Posted: Sat Mar 12, 2016 12:12 am Post subject: |
|
|
Ah, I did not even know how to use the auto assemble with its
Templates. WOW, it sets up the jmp, injection and the jump back! Wow, it worked. Thanks! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|