 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
Posted: Sat Sep 05, 2015 6:34 am Post subject: [Solved]Code injection |
|
|
why did this script run just fine ?
| Code: |
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
push ebx
mov ebx,[eax+0C]
mov ebx,[ebx+14]
mov ebx,[ebx+E0]
mov [_cmp1],ebx
pop ebx
originalcode:
mov eax,[eax+0C]
pop ebp
ret
exit:
jmp returnhere
_inj5+2:
jmp newmem
returnhere:
|
when this script crash the game.
| Code: |
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
push ebx
mov ebx,[eax+0C]
mov ebx,[ebx+14]
mov ebx,[ebx+E0]
mov ebx,[ebx+08]
mov [_cmp1],ebx
pop ebx
originalcode:
mov eax,[eax+0C]
pop ebp
ret
exit:
jmp returnhere
_inj5+2:
jmp newmem
returnhere:
|
this is monogame
Last edited by Cake-san on Sat Sep 05, 2015 11:47 pm; edited 1 time in total |
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sat Sep 05, 2015 7:03 am Post subject: |
|
|
Possibly, the value at [ebx+E0] can be zero? Causing the next [ebx+08] to be invalid.
| Code: | newmem:
push ebx
mov ebx,[eax+0C]
mov ebx,[ebx+14]
mov ebx,[ebx+E0]
test ebx,ebx
je originalcode
mov ebx,[ebx+08]
mov [_cmp1],ebx
originalcode:
pop ebx
mov eax,[eax+0C]
pop ebp
ret
exit:
jmp returnhere
_inj5+2:
jmp newmem
returnhere: |
|
|
| Back to top |
|
 |
deama1234 Master Cheater
Reputation: 3
Joined: 20 Dec 2014 Posts: 328
|
Posted: Sat Sep 05, 2015 7:47 am Post subject: |
|
|
| You're navigating through pointers right? Probably some other value accesses that instruction and its [ebx+E0] is a 0; Or maybe now [ebx+E0] is a 0.
|
|
| Back to top |
|
 |
Cake-san Grandmaster Cheater
Reputation: 8
Joined: 18 Dec 2014 Posts: 541 Location: Semenanjung
|
Posted: Sat Sep 05, 2015 11:45 pm Post subject: |
|
|
sorry for the late replied,
I think it's impossible for me to use this method in this game at my level,
it's either break the game or return zero result.
thankyou for the replied.
I'm just going to use the pointer scan -_-
_________________
... |
|
| 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
|
|