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 


Conditional Breakpoints

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

Joined: 30 Sep 2012
Posts: 42

PostPosted: Thu Dec 05, 2013 7:51 pm    Post subject: Conditional Breakpoints Reply with quote

Hi folks. I'm having a bit of trouble with this. I've managed to get it to break on a simple condition like "EDX == 0x0ED93C50", But I can't figure out how to something like [EDX] == 0x32. I assume I have to use the complex tab, but haven't managed to get it to work. If I have to type a whole lua if... then statement, could I have an example? I haven't tackled any lua stuf yet. Thanks. Smile

Also I've tried using "al", but that doesn't seem to work. Do you have to stick to the full registers like EAX, EBX, etc.?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25796
Location: The netherlands

PostPosted: Thu Dec 05, 2013 8:51 pm    Post subject: Reply with quote

if [EDX] points to a 4 byte value then
Code:

readInteger(EDX)==0x32


If it's a 1 byte value, then
Code:

bAnd(readInteger(EDX),0xff)==0x32



Also,
AL=bAnd(EAX,0xff)
AH=bShr(bAnd(EAX,0xffff), 8)
AX=bAnd(EAX,0xffff)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Telecide
Cheater
Reputation: 0

Joined: 30 Sep 2012
Posts: 42

PostPosted: Thu Dec 05, 2013 9:48 pm    Post subject: Reply with quote

Thanks!

Is that all you write in the condition box? Is it on "easy" or "complex"? Tried it a few times, but no break yet.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25796
Location: The netherlands

PostPosted: Thu Dec 05, 2013 9:56 pm    Post subject: Reply with quote

That's on easy. On complex you need to write a multiline script that eventually returns true or false

Remember that the condition check is done before the instruction is executed.

so the address EDX points to isn't yet 0x32 when the check is done. So set the breakpoint after it

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Telecide
Cheater
Reputation: 0

Joined: 30 Sep 2012
Posts: 42

PostPosted: Thu Dec 05, 2013 10:05 pm    Post subject: Reply with quote

Yes!! It worked! Thank you. It's great to be able to get help from the actual creator of this thing. Hacking is becoming more fun than the game itself, heheh. Smile

Edit:

One last question. Can you use an offset like

readInteger(ECX+00000124) == 0x15065874
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25796
Location: The netherlands

PostPosted: Fri Dec 06, 2013 6:19 am    Post subject: Reply with quote

Yes, but i assume you'd rather do 0x124 else it would be handled as a decimal offset
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
0xDEAD10CC
How do I cheat?
Reputation: 1

Joined: 08 Feb 2015
Posts: 8

PostPosted: Tue Sep 08, 2020 6:31 pm    Post subject: Reply with quote

Sorry for necroposting but I do have some issues with conditions for breakpoint. Maybe someone helps me out?

I found an instruction of interest by data breakpoint on 'write access' like this:

Code:
mov [r14+40],eax


This is instruction within the loop and I try to break condition (through 'break and trace instructions') on that instruction when r14 is pointing to specific address. I deduct the offset of 0x40 from the address and try to match r14 to exact value like this:

Code:
r14 == 0xFD3AF460


or this:

Code:
r14d == 0xFD3AF460


Neither of them works. Without condition code breaks just fine. Also the value of interest is changed.

How do I set up condition properly?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25796
Location: The netherlands

PostPosted: Wed Sep 09, 2020 1:18 am    Post subject: Reply with quote

R14 not r14
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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