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 


Breakpoint depending on the value written in the destiny?

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

Joined: 10 Apr 2020
Posts: 172

PostPosted: Tue Sep 28, 2021 6:42 am    Post subject: Breakpoint depending on the value written in the destiny? Reply with quote

This is not a typical conditional breakpoint.

The address im placing a breakpoint on is being accessed and written on by many functions.

Im trying to locate a function that writes 5 to it in the middle of all the ticks.

For example my address is:

233FBDE8 with a value of 3.

Sometimes its 2, sometimes it becomes 1. And sometimes its 5 very rarely and very fast.

So there are 10's of functions that write 2 to it and sometimes maybe one of these ticks is 5. But it could be the other function that writes 1 to it.

So I need to break to locate the tick and function that writes 5 to it.

So basically i need to make a breakpoint on the address to detect when the address becomes 0x00000005.

Pls help
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Tue Sep 28, 2021 7:00 am    Post subject: Reply with quote

Set the breakpoint > right-click and select Set/Change break condition > here you can set your conditional breakpoint.

Although if you are talking about online games. Discussions about hacking online games is prohibited.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Tue Sep 28, 2021 7:06 am    Post subject: Reply with quote

Its not for an online game. Its for a mod.

As i said in my post, its not a typical conditional breakpoint.

Because there are hundreds of ticks and addresses that are writting to the address im breaking.

So i need to only break if the address im putting a breakpoint on becomes a specific value.

Do i have to put 100 conditional breakpoint in 100 instructions that write to my address? Or there is another way?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Tue Sep 28, 2021 7:12 am    Post subject: This post has 1 review(s) Reply with quote

You can abuse the breakpoint window a bit to get what you're looking for. May be a faster/easier way to do this but this is what I do / am used to doing.

1. Add the address to your address list. (ie. 233FBDE8)
2. Right-click > Browse This Memory Region on the address.
3. Select the value in the memory window hex editor.
4. Right-click > Data breakpoint > Break on write
5. Open the breakpoint window. (View > Breakpointlist from the Memory Viewer window.)
6. Right-click the breakpoint you just made and select 'Set/Change condition'
7. Tick the 'Easy' radio button.
8. Enter the basic Lua to do what you wish for the condition, in your case, this should work:

Code:

readInteger(233FBDE8) == 5


Click ok, run the target if it broke while setting up and let it go til it breaks as desired. Adjust 'readInteger' for whichever type the value is accordingly.

A bit long winded but the breakpoint menu option on the hex window doesn't include a Set/Change condition option for some reason.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Tue Sep 28, 2021 7:16 am    Post subject: Reply with quote

LongBeardedLion wrote:
Its not for an online game. Its for a mod.


I only mentioned that because it wasn't clear what game in question you were hacking and the title includes a popular online game. Nevertheless, atom0s has provided a much more in-depth answer on how you can achieve your goal.
Back to top
View user's profile Send private message
vovasivy
Cheater
Reputation: 0

Joined: 09 Jun 2021
Posts: 39

PostPosted: Tue Sep 28, 2021 8:10 am    Post subject: Reply with quote

How did you find this address at all then, I mostly found such addresses in the stack during tracing.
After finding it, I tried to do as "atom0s" writes, but it never helped me, an endless cycle, I didn't have enough patience.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Wed Sep 29, 2021 12:07 am    Post subject: Reply with quote

vovasivy wrote:
How did you find this address at all then, I mostly found such addresses in the stack during tracing.
After finding it, I tried to do as "atom0s" writes, but it never helped me, an endless cycle, I didn't have enough patience.


I typo'd in my post above, try this instead:
Code:

readInteger(0x233FBDE8) == 5


Forgot the 0x in the address part. Adjust for the proper address you are using as needed etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
vovasivy
Cheater
Reputation: 0

Joined: 09 Jun 2021
Posts: 39

PostPosted: Wed Sep 29, 2021 3:39 am    Post subject: Reply with quote

atom0s:
I meant that the address that LongBeardedLion writes about, in which the value is constantly and rapidly changing, can only be found by chance
when tracing or viewing a stack snapshot.
And I agree with you on how to set a conditional breakpoint.
Only if the address to which you need to put the breakpoint is on the stack, it has never helped me.
If I'm wrong, then correct me.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 199

Joined: 25 Jan 2006
Posts: 8518
Location: 127.0.0.1

PostPosted: Wed Sep 29, 2021 3:48 am    Post subject: Reply with quote

vovasivy wrote:
atom0s:
I meant that the address that LongBeardedLion writes about, in which the value is constantly and rapidly changing, can only be found by chance
when tracing or viewing a stack snapshot.
And I agree with you on how to set a conditional breakpoint.
Only if the address to which you need to put the breakpoint is on the stack, it has never helped me.
If I'm wrong, then correct me.


If the address is stack-based then you'd need to set the breakpoint within the function that is setting the value into the stack and do a similar setup. Break when the value being pushed onto the stack / updated on the stack is the value you are looking for.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
vovasivy
Cheater
Reputation: 0

Joined: 09 Jun 2021
Posts: 39

PostPosted: Wed Sep 29, 2021 4:07 am    Post subject: Reply with quote

I communicate through a translator, which is probably why we don't understand each other.
Isn't this the instruction that " LongBeardedLion" is looking for, on which you propose to put a conditional breakpoint.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Wed Sep 29, 2021 8:17 am    Post subject: Reply with quote

Thanks all.

Thanks atomos it worked perfectly Surprised Surprised
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