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 


logging values at breakpoints..

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Caliber
Expert Cheater
Reputation: 2

Joined: 20 Aug 2007
Posts: 102

PostPosted: Wed Jul 31, 2013 9:19 am    Post subject: logging values at breakpoints.. Reply with quote

haven't used cheatengine to do these things before so I thought I would inquire:

in the case of the code here:

005B1202 - 8B 91 88040000 - mov edx,[ecx+00000488]

is it possible for cheatengine to log values?

for instance

log EDX

or log [ECX+0x488]

etc..


or log [ECX+00488] only if [EBX+40] == 0x70

thanks in advance if you have info on this..

best,
Cal
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Jul 31, 2013 11:26 am    Post subject: Reply with quote

Well, you could use the conditional breakpoint method. After setting the breakpoint set an complex conditonal breakpoint with this code:
Code:

  if readInteger(EBX+0x40)==0x70 then
    print(readInteger(ECX+0x448))
  end
  return false  --never break, just log



Or you can use a predefined onBreakpoint function
E.g if you execute this lua script before setting the breakpoint it will log it from the start
Code:

function debugger_onBreakpoint()
  if (EIP==0x005B1202) then
    if readInteger(EBX+0x40)==0x70 then
      print(readInteger(ECX+0x448))
    end
    return 1 --continue and do not update the gui
  else
    --something else
    return 0 --let the user know about this
  end
end


If you wish to log to a file or something else, then replace print with a function that does that for you.
Also, all registers are defined in the global context of lua, so you don't have to pass on all the registers to subfunctions you may call

_________________
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