| View previous topic :: View next topic |
| Author |
Message |
peter4d5 Cheater
Reputation: 0
Joined: 21 Dec 2010 Posts: 37
|
Posted: Sat Dec 17, 2011 8:37 pm Post subject: i wonder how darkbyte can identify what in address is value |
|
|
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 |
|
 |
Dark Byte Site Admin
Reputation: 473
Joined: 09 May 2003 Posts: 25899 Location: The netherlands
|
Posted: Sat Dec 17, 2011 9:05 pm Post subject: |
|
|
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 |
|
 |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Sat Dec 17, 2011 10:44 pm Post subject: Code |
|
|
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 |
|
 |
chASM Newbie cheater
Reputation: 0
Joined: 23 Jun 2011 Posts: 17
|
Posted: Sun Dec 18, 2011 2:39 pm Post subject: Re: i wonder how darkbyte can identify what in address is va |
|
|
| 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 |
|
 |
|