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 


Break and Trace Condition

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

Joined: 20 Jan 2012
Posts: 42

PostPosted: Sun May 08, 2016 8:50 am    Post subject: Break and Trace Condition Reply with quote

I am trying to break and trace some code which is used for multiple things.
So I want to trace it in a special condition I need.

In my case this is ECX==0x145E4168 - for example.

The break+trace window offers only a STOP condition, but that's not what i need. This way I get all kinds of traces, but not for the case I need it for.

Is there a way to start the trace only if the given register has the required value?

_________________
This text has been encrypted with XOR twice for security reasons.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Sun May 08, 2016 9:07 am    Post subject: Reply with quote

  1. If needed, pause the process using the Advanced Options window (bottom left in the main CE window).
  2. Set the break and trace at an instruction.
  3. Go to View -> Breakpointlist.
  4. Right click on the breakpoint and select "Set/change condition".
  5. Set whatever condition you want.
  6. Click on "OK" and unpause the process if you paused it.

_________________
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
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun May 08, 2016 9:08 am    Post subject: Reply with quote

I normally just write an injection script to do that.
Code:
newmem:
  cmp ecx,145E4168
  jne code
  nop // set breakpoint here
code:
  //regular instruction
  jmp return
INJECT:
  jmp newmem // make sure it jumps to your compare
return:
Back to top
View user's profile Send private message
Snooman
Cheater
Reputation: 1

Joined: 20 Jan 2012
Posts: 42

PostPosted: Wed May 11, 2016 9:49 am    Post subject: Reply with quote

Zanzer wrote:
I normally just write an injection script to do that.
Code:
newmem:
  cmp ecx,145E4168
  jne code
  nop // set breakpoint here
code:
  //regular instruction
  jmp return
INJECT:
  jmp newmem // make sure it jumps to your compare
return:


This idea I had in mind too, but maybe there is a more practical way I dont know yet.

Thanks to both for your answers Very Happy

_________________
This text has been encrypted with XOR twice for security reasons.
Back to top
View user's profile Send private message
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