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 


How Check if the address is Correct ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Thu Dec 21, 2017 12:02 am    Post subject: How Check if the address is Correct ? Reply with quote

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

popad
popfd



check if is base address.PNG
 Description:
 Filesize:  67.81 KB
 Viewed:  2753 Time(s)

check if is  base address.PNG


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Thu Dec 21, 2017 9:52 am    Post subject: Reply with quote

Twistedfate wrote:
but how could I check if the address it self is wrong

Read this topic. For a 64-bit example, see this topic.
Twistedfate wrote:
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.
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 Lua Scripting 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