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 do i study breakpoints that tick constantly in the game?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Tue Jun 02, 2020 7:26 am    Post subject: How do i study breakpoints that tick constantly in the game? Reply with quote

So basically im reverse engineering a function. I need to understand where a certain value is coming from originally. So i need to go back in time in the function to the very root of this value. I have seen it being passed from register to register. But im in a dead end now, because i got to a function that simply ticks constantly on breakpoint, so i cant really use a breakpoint there to see where is my value being passed. Because it breaks even when my action is not being performed so i dont even have the time to trigger the action in the game that would trigger the breakpoint so that i could see where the value is coming from. So instead it is breaking immediately and with other values that are not related.

Maybe this is not very clear. Ill try more:
What im trying to do is to understand what in assembly responds to the press of a key in the game that changes the stance of a unit. So i got the address of the value that changes when i press that key. But so far that value can be traced back as being passed from function to function and register to register much before.

So i guess i got to the point where the game has a function that i assume its checking what is happening constantly in the game. So i cant really go in the game and press the key, because it breaks constantly.

How do i go around this problem? How can i understand where a value is coming from in assembly if the current function simply breaks constantly and does not allow me to study a specific action?

Help pls.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4723

PostPosted: Tue Jun 02, 2020 10:36 am    Post subject: Reply with quote

Try setting a "break and trace" on the original access, step over calls.

LongBeardedLion wrote:
i got to a function that simply ticks constantly on breakpoint, so i cant really use a breakpoint there to see where is my value being passed
Set a conditional breakpoint. You can set a condition on an existing breakpoint in View -> Breakpointlist.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Thu Jun 04, 2020 11:23 am    Post subject: Reply with quote

Thank you ParkourPenguin.

I have been studying it but so far it seems im doing something wrong.

So i have a breakpoint at 43a9db.

And everytime i want it to break the address in the EBP changes to something different. But that address + 0x2 always points at 03 EA, Bytes. As you can see in the image.

So how do i set this condition?

EBP + 0x2 == 0x03?

I tried it and it did not work.

Pls help.
Also is there any way to go back in time and see what the EBP was before without breakpoints? Like a step into but backwards?



condition 1.jpg
 Description:
 Filesize:  199.74 KB
 Viewed:  2275 Time(s)

condition 1.jpg



condition 2.jpg
 Description:
 Filesize:  315.2 KB
 Viewed:  2275 Time(s)

condition 2.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4723

PostPosted: Thu Jun 04, 2020 11:37 am    Post subject: Reply with quote

Code:
readBytes(EBP+2, 1, false) == 3

LongBeardedLion wrote:
Also is there any way to go back in time and see what the EBP was before without breakpoints?
Nothing I'm familiar with.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Thu Jun 04, 2020 3:37 pm    Post subject: Reply with quote

Thank you Parkour Penguin.
I succeeded in going back on a huge function and tracing our value very far.
And it all seemed great. But then i came accross [ESP+110]. And dont know how to put a condition on that since its a pointer stored in the stack.
So i went on the stack, and the value does correspond to our value 03.

So how should i put a condition for this?
Perhaps i should read more about conditions where can i learn this in depth so i dont have to annoy you anymore?

Here are the images:

Edit:

readBytes([ESP+110]+2, 1, false) == 3 ??

That didnt work either? :O



condition 1.jpg
 Description:
 Filesize:  415.38 KB
 Viewed:  2259 Time(s)

condition 1.jpg



condition 2.jpg
 Description:
 Filesize:  384.2 KB
 Viewed:  2260 Time(s)

condition 2.jpg


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4723

PostPosted: Thu Jun 04, 2020 4:26 pm    Post subject: Reply with quote

See the "sub esp,104" and the couple push instructions just above that? 0x110-0x104-4-4 = 4. It's accessing a parameter passed to the function. Go to the caller and it'll be the last thing pushed on the stack before the call.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 174

PostPosted: Thu Jun 04, 2020 7:57 pm    Post subject: Reply with quote

Surprised Surprised wow it looks like magic. Thank you. Im loving learning about it everyday.
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