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 


Help my this conditional BP doesn't work

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
CERuleZ
Newbie cheater
Reputation: 0

Joined: 29 Dec 2013
Posts: 13

PostPosted: Wed Aug 02, 2017 1:02 pm    Post subject: Help my this conditional BP doesn't work Reply with quote

I have a call, then the next instruction is the instruction the call jumps to. On this instruction I have a BP. Why doesn't the same conditional BP work on the call instead? I put the conditional BP on the very first instruction the call jumps to, so the BP should also work on the call as well. I'm at a loss here. What am I missing?

Code:
call edx -> readInteger(ECX+0x00000034)==0x00954150 -> This call goes to the next line. The conditional breakpoint doesn't work here. Why?
sub esp,24 -> readInteger(ECX+0x00000034)==0x00954150 -> works
some instructions
ret 000C


Thank you.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Wed Aug 02, 2017 1:16 pm    Post subject: Reply with quote

perhaps ECX+34 doesn't point to an address with value 954150 until after the call ? (code breakpoints run before execution)

perhaps a previous (conditional)jump jumps over the call directly to the sub when ECX is valid ?

_________________
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
CERuleZ
Newbie cheater
Reputation: 0

Joined: 29 Dec 2013
Posts: 13

PostPosted: Wed Aug 02, 2017 1:28 pm    Post subject: Reply with quote

Dark Byte wrote:
perhaps ECX+34 doesn't point to an address with value 954150 until after the call ? (code breakpoints run before execution)

on the first instruction call jumps to it already points to the address

Dark Byte wrote:
perhaps a previous (conditional)jump jumps over the call directly to the sub when ECX is valid ?
But then the return instruction would still jump back to the first instruction after the call if it wasn't the call that made the jump?

EDIT
By the way ty for the quick reply.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Wed Aug 02, 2017 1:44 pm    Post subject: Reply with quote

Not sure what you mean with back to the first instruction.

what I meant was:
Code:

....
....
cmp ecx,0
jne valid
....
....
call edx //ECX is 0 at this point, so the bp condition is not met (ever)
valid:
//ECX contains a valid value here
sub esp,24
...


call edx would never be called if ECX is valid

_________________
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
CERuleZ
Newbie cheater
Reputation: 0

Joined: 29 Dec 2013
Posts: 13

PostPosted: Wed Aug 02, 2017 1:57 pm    Post subject: Reply with quote

Dark Byte wrote:
Not sure what you mean with back to the first instruction.

what I meant was:
Code:

....
....
cmp ecx,0
jne valid
....
....
call edx //ECX is 0 at this point, so the bp condition is not met (ever)
valid:
//ECX contains a valid value here
sub esp,24
...


call edx would never be called if ECX is valid


When the return instruction executes, it goes to the line after the call. The return instruction always jumps back to one instruction after the jump, right? What I mean is I have this:

Code:

call edx -> goes to "sub esp,24"
mov eax,[ebx]
......

sub esp,24
some instructions
ret 000C -> goes back to "mov eax,[ebx]"


Then how can the conditional BP work on the call but not on the sub instruction? Unless the return instruction can jump to a instruction that is not the instruction after the call?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Wed Aug 02, 2017 2:39 pm    Post subject: Reply with quote

ah i misread it. i thought you meant call doesn't trigger but after the call it does.

what can cause that is that something inside that call changes the value at ecx+34 (or it changes ecx)

or the call never returns (exception)

_________________
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
CERuleZ
Newbie cheater
Reputation: 0

Joined: 29 Dec 2013
Posts: 13

PostPosted: Wed Aug 02, 2017 2:52 pm    Post subject: Reply with quote

Dark Byte wrote:

what can cause that is that something inside that call changes the value at ecx+34 (or it changes ecx)

So you're saying there is come code that executes after the call but before the sub?
Like:
Code:

call edx -> goes to "mystery"
mov eax, [ebx]
...

mysterycode
sub esp,24

Wait. I mean yes, the ecx is changed somewhere but it's after the sub instruction, so it shouldn't matter. I'm confused

Quote:

or the call never returns (exception)

What do you mean? Then what about the "ret 000C"? Confused

EDIT
Is it possible that some other thread is changing the value of ECX or what ECX points at between the call and the first instruction the call executes?
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