Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Solved]Code injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sat Sep 05, 2015 6:34 am    Post subject: [Solved]Code injection Reply with quote

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 Rolling Eyes


Last edited by Cake-san on Sat Sep 05, 2015 11:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Sep 05, 2015 7:03 am    Post subject: This post has 1 review(s) Reply with quote

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
View user's profile Send private message
deama1234
Master Cheater
Reputation: 3

Joined: 20 Dec 2014
Posts: 328

PostPosted: Sat Sep 05, 2015 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sat Sep 05, 2015 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites