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 


[DELPHI] Change registry value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Mon Jan 25, 2021 4:51 am    Post subject: Reply with quote

You need to set the RF flag (bit 16) in the flags register else it will break again on the instruction

unless you're on XP which doesn't support RF in which case you need to disable the breakpoint, do a single step, and set the breakpoint back

also, you're supposed to suspend the thread when you set the breakpoint (not that needed for debug registers only but still recommended)

which brings to the next issue: You're not getting/setting the register context when the breakpoint hits. Only the debugregister context is being read out and written.

_________________
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
Matteusin
How do I cheat?
Reputation: 0

Joined: 24 Jan 2021
Posts: 3

PostPosted: Tue Jan 26, 2021 12:36 am    Post subject: Reply with quote

Dark Byte wrote:
You need to set the RF flag (bit 16) in the flags register else it will break again on the instruction

unless you're on XP which doesn't support RF in which case you need to disable the breakpoint, do a single step, and set the breakpoint back

also, you're supposed to suspend the thread when you set the breakpoint (not that needed for debug registers only but still recommended)

which brings to the next issue: You're not getting/setting the register context when the breakpoint hits. Only the debugregister context is being read out and written.



Thank you, Dark Byte!

I apologize, I was careless and ended up deleting my main question.

I managed to solve it, the EFLAGS was really missing.

Could you tell me if it is possible to add more than one debug point?

Again, sorry for the English
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Jan 26, 2021 1:44 am    Post subject: Reply with quote

you can set 4. Look up the dr7 register and dr0 to dr3
_________________
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
Matteusin
How do I cheat?
Reputation: 0

Joined: 24 Jan 2021
Posts: 3

PostPosted: Tue Jan 26, 2021 10:40 am    Post subject: Reply with quote

Dark Byte wrote:
you can set 4. Look up the dr7 register and dr0 to dr3


Um ... This limitation complicated things!

I found something about Software Breakpoints, could you recommend some code for study? In any language


Thanks
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue Jan 26, 2021 3:36 pm    Post subject: Reply with quote

you can use software breakpoints by writing a $cc at the start of an instruction and capture the software breakpoint exception

then do your stuff, restore the byte, set the trap flag in eflags
suspend all other threads in the game except the current one
resume debugging
wait for the single step exception event
write a $cc back, resume all previously frozen threads and resume debugging

keep in mind that integrity checks detect them, so if you where using hardware bp's to bypass integrity checks, then it won't work

_________________
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
Matteusin
How do I cheat?
Reputation: 0

Joined: 24 Jan 2021
Posts: 3

PostPosted: Wed Jan 27, 2021 9:04 pm    Post subject: Reply with quote

Dark Byte wrote:
you can use software breakpoints by writing a $cc at the start of an instruction and capture the software breakpoint exception

then do your stuff, restore the byte, set the trap flag in eflags
suspend all other threads in the game except the current one
resume debugging
wait for the single step exception event
write a $cc back, resume all previously frozen threads and resume debugging

keep in mind that integrity checks detect them, so if you where using hardware bp's to bypass integrity checks, then it won't work


Thank you very much, Dark!
I will really have to stick to my routine on BP hardware. I will study the VEH Debugger to implement
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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