| View previous topic :: View next topic |
| Author |
Message |
justdream How do I cheat?
Reputation: 0
Joined: 04 Apr 2012 Posts: 7
|
Posted: Mon Apr 09, 2012 6:14 pm Post subject: Filters scanning memory |
|
|
Hello,
I'm writing a memory scanner and it works perfectly and fast in 'small' programs/games (like CE Tutorial, minesweeper, etc).
But in large and online games, the scan is so slow..
These are the filter I'm using:
| Code: | if (S=SizeOf(MEMORY_BASIC_INFORMATION)) and (MBI.State = MEM_COMMIT) and (MBI.Type_9 = MEM_PRIVATE) and (MBI.RegionSize>0) and (MBI.Protect = PAGE_READWRITE) then begin
|
Is there a better way to improve the scan and turn it much fast?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Mon Apr 09, 2012 6:50 pm Post subject: |
|
|
you're actually skipping too much memory (readwrite_execute might also contain variables)
Perhaps the bottleneck is somewhere else. For example, do not show the scanresults while scanning, do not update the gui for every byte you read something, do not do readprocessmemory calls for regions smaller than 4kb
_________________
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 |
|
 |
justdream How do I cheat?
Reputation: 0
Joined: 04 Apr 2012 Posts: 7
|
Posted: Mon Apr 09, 2012 6:54 pm Post subject: |
|
|
Hi Dark Byte,
Creating a string list to add the scanresults and just pass the results to the listbox when the scan is done may be a solution?
Furthermore, is there another way to improve the scan? I'm making in DLL (don't using RPM to prevent against possible hooks)...
Thanks
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25830 Location: The netherlands
|
Posted: Mon Apr 09, 2012 7:08 pm Post subject: |
|
|
It depends on how many results there are. If you like to scan for the 1 byte value '0' then, yes, you will need to take care of that. But if you only find a handful then that's not the bottleneck
If you are looking for a 4 byte value, you can assume that it's address is on a 4 byte alignment. Meaning that you can skip 75% of the memory compares
Also, do you copy the memory to a temporary buffer first and scan that, or do you scan immediately?
And how do you take care of the game freeing a block of memory that you are currenty reading?
If you use try/except, do not use it for every single byte compare, but use it on a querymemoryregion boundary
_________________
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 |
|
 |
justdream How do I cheat?
Reputation: 0
Joined: 04 Apr 2012 Posts: 7
|
Posted: Mon Apr 09, 2012 7:19 pm Post subject: |
|
|
| Dark Byte wrote: |
Also, do you copy the memory to a temporary buffer first and scan that, or do you scan immediately?
|
I'm scanning immediately :/
| Dark Byte wrote: |
And how do you take care of the game freeing a block of memory that you are currenty reading?
If you use try/except, do not use it for every single byte compare, but use it on a querymemoryregion boundary |
I had not thought of that.. but I'll increment it now...
|
|
| Back to top |
|
 |
|