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 


Perform an action when some value is written to any address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
hyuk9
How do I cheat?
Reputation: 0

Joined: 08 Sep 2017
Posts: 4

PostPosted: Wed Apr 25, 2018 10:51 pm    Post subject: Perform an action when some value is written to any address Reply with quote

I am trying to perform some actions (e.g. log a stacktrace, log registers, etc.) whenever a particular value (e.g. 0x30) is written/read to/from *any* memory address.

Is there a way to do this?

To give some context, I'm trying to locate a data structure that's in memory. I have several integer values that I know are in the data structure, but they are fairly low numbers (e.g. 0x30) that show up thousands of times during a scan.

For this reason, I'm trying to reduce the haystack somehow.

Any ideas?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 354

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

PostPosted: Thu Apr 26, 2018 12:25 am    Post subject: Reply with quote

Code:

setBreakpoint(startoftheregion,sizeoftheregion,bptWrite,bpmException,function()
   get the previous opcode for RIP
  disassemble that
  check if it has a [xxx] part
  interpret xxx
  read the value at xxd
  is it the value ? (0x30)
  yes? return 0
  no? debug_continueFromBreakpoint(co_run) return 1
end)

also it will be so slow that it will take an hour to even register one key input

perhaps it helps if you can pinpoint the region

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
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 Lua Scripting 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