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 


How Cheat engine determines stack trace return address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Thu Jan 28, 2016 9:37 am    Post subject: How Cheat engine determines stack trace return address Reply with quote

Hi, I've been wondering how it's done.
First I thought CE would assume the function started with
push ebp
mov ebp,esp
and from there take ebp + 04 value as the return value.
However if that was the case then CE wouldn't get dll starting with mov edi,edi
's return address right.
This gets me wondering how exactly CE does that and how likely is it to actually fail ?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jan 28, 2016 5:15 pm    Post subject: Reply with quote

You can find how Cheat Engine does it in the source code in the various files like these:
https://github.com/cheat-engine/cheat-engine/blob/48da5470e306b00141c8c49056164b03cf403237/Cheat%20Engine/stacktrace2.pas
https://github.com/cheat-engine/cheat-engine/blob/5f101ea6808939be5b4c092bd9bf26987b080447/Cheat%20Engine/frmStackViewUnit.pas
https://github.com/cheat-engine/cheat-engine/blob/efb5800f3cfd87942ae3cd1434787fd80ae929d7/Cheat%20Engine/MemoryBrowserFormUnit.pas

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
ulysse31
Master Cheater
Reputation: 2

Joined: 19 Mar 2015
Posts: 324
Location: Paris

PostPosted: Sun Jan 31, 2016 1:38 am    Post subject: Reply with quote

thanks!
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 Discussions 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