Posted: Thu Dec 21, 2017 12:02 am Post subject: How Check if the address is Correct ?
I know
cmp eax,0 <-----------------eax is always 0 even when the address is clearly invalid: "?? ?? ?? ??"
but how could I check if the address it self is wrong
look at the picture .
if the game go to this address will break
mov edi,[edi+00000138]
because edi value is 1 and cannot be used as correct address
so how to check the edi if contain the correct address or not .
2nd Question can I use:
pushfd
pushad
pushf
or pushfd is enough rather than pushf
Code:
mov [atk],1
pushfd
pushad
push 4 //size in bytes of pointer
lea eax,[atk]
//i try also lea eax,[atk+00000138] same crash ..
push eax
call isbadreadptr
cmp eax,0
jne invalidmemory2
2nd Question can I use:
pushfd
pushad
pushf
or pushfd is enough rather than pushf
pushad pushes all general purpose registers on the stack (probably unnecessary to do all of them), and pushf / pushfd pushes the flags/eflags register on the stack (probably unnecessary unless the game checks it right after the code injection).
Always use pushfd (pushfq for 64-bit) unless you know you have a good reason to use pushf. _________________
I don't know where I'm going, but I'll figure it out when I get there.
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