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 


i wonder how darkbyte can identify what in address is value

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

Joined: 21 Dec 2010
Posts: 37

PostPosted: Sat Dec 17, 2011 8:37 pm    Post subject: i wonder how darkbyte can identify what in address is value Reply with quote

i wonder how darkbyte can identify what in address is value or pointer ,i mean in Dissectdata sectioon. i try to use IsBadPointer in delphi , but don't work ...

Could anyone tell me how to check is pointer or not ,because i doing function to read data like DissectData done and want to save in list only pointer.

_________________
my name is peter4d5
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 473

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

PostPosted: Sat Dec 17, 2011 9:05 pm    Post subject: Reply with quote

Use virtualquery(ex) to build a list of all readable memory. And if an address contains value that falls in that list you can mark it as a pointer.
Keep in mind that floating point values like 3f800000 tend to be picked up as pointers instead of the float they are (which is why i first do a check if it's a human readable floating point notation or not before assigning it as a pointer)

_________________
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
jgoemat
Master Cheater
Reputation: 23

Joined: 25 Sep 2011
Posts: 264

PostPosted: Sat Dec 17, 2011 10:44 pm    Post subject: Code Reply with quote

The code calls FindTypeOfData in byteinterpreter.pas which calls isreadable in CEFuncProc.pas:

Code:
function isreadable(address:ptrUint):boolean;
var mbi: _MEMORY_BASIC_INFORMATION;
begin
  VirtualQueryEx(processhandle,pointer(address),mbi,sizeof(mbi));
  result:=mbi.State=mem_commit;
end;
Back to top
View user's profile Send private message
chASM
Newbie cheater
Reputation: 0

Joined: 23 Jun 2011
Posts: 17

PostPosted: Sun Dec 18, 2011 2:39 pm    Post subject: Re: i wonder how darkbyte can identify what in address is va Reply with quote

peter4d5 wrote:
i wonder how darkbyte can identify what in address is value or pointer ,i mean in Dissectdata sectioon. i try to use IsBadPointer in delphi , but don't work ...

Could anyone tell me how to check is pointer or not ,because i doing function to read data like DissectData done and want to save in list only pointer.


Just as a bit of information, for all programmers who aren't aware.

Microsoft states the following for all IsBadxxxPtr functions:

Code:

Important  This function is obsolete and should not be used. Despite its name, it does not guarantee that the pointer is valid or that the memory pointed to is safe to use.


And they are not kidding either, these functions are not reliable at all for determining good or bad pointers. These functions are not multi-threading safe, which is part of what makes them unreliable in many situations.

Regards,

chASM
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