Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 09-19-2015, 13:49
maktm maktm is offline
Friend
 
Join Date: Apr 2015
Posts: 23
Rept. Given: 0
Rept. Rcvd 4 Times in 2 Posts
Thanks Given: 8
Thanks Rcvd at 16 Times in 8 Posts
maktm Reputation: 4
I got lost after some posts but if your aim is to stop execution at one point with a HWBP/SWBP and read the registers you can use this procedure:

1. Set a hardware/software breakpoint at the virtual address by patching the byte or using debug registers

2. Set a new top-level handler ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms680634(v=vs.85).aspx )

3. You get a context structure when the breakpoint hits so in your callback just handle it by reading the structure passed to the callback which is of type (struct _EXCEPTION_POINTERS *ExceptionInfo)

4. If you overwrote the byte by patching then you should rewrite the original byte in the hook and then replace it again for another breakpoint (if you want)

If you have problems you can ask here again
Reply With Quote
The Following 2 Users Say Thank You to maktm For This Useful Post:
Conquest (09-19-2015), niculaita (09-19-2015)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Olly Registers Recorder n0ital General Discussion 5 04-07-2006 03:35


All times are GMT +8. The time now is 22:52.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )