View previous topic :: View next topic |
Author |
Message |
KryziK Expert Cheater
Reputation: 3
Joined: 16 Aug 2009 Posts: 199
|
Posted: Tue Jan 12, 2010 3:34 pm Post subject: Scan speed |
|
|
Hi, I am making my own memory editor, (A piece of crap, really. It was only to see if I could), and I was wondering how CE scans so fast?
My current setup is making a For Loop from 00000000 to FFFFFFFF with a ReadProcessMemory call and this seems to take ages. (I haven't actually let it run as it takes WAY too long)
Is there a better way to do this? Does CE use something such as a DLL that I could use instead? Do I need to say anything else?
Thank you!
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Tue Jan 12, 2010 3:50 pm Post subject: |
|
|
make sure you limit the number of windows api calls to the bare minimum
Instead of calling readprocessmemory for every byte, call it to read big chunks of memory and evaluate that
And to figure out what blocks to read, use VirtualQueryEx to find the size and location of readable blocks
_________________
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 |
|
 |
KryziK Expert Cheater
Reputation: 3
Joined: 16 Aug 2009 Posts: 199
|
Posted: Tue Jan 12, 2010 4:21 pm Post subject: |
|
|
Hmm, I guess I will have to read up to figure this out.
I figured it would have to do with reading larger blocks at a time, but didn't think about how to process them.
Thanks for the help.
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Jan 12, 2010 7:02 pm Post subject: |
|
|
you could also multithread your processing. furthermore you probably only intend to scan usermode memory in which case up to 7fffffff is enough. in fact getsysteminfo() will help you ascertain min/max application address
|
|
Back to top |
|
 |
KryziK Expert Cheater
Reputation: 3
Joined: 16 Aug 2009 Posts: 199
|
Posted: Tue Jan 12, 2010 7:04 pm Post subject: |
|
|
No multithreading unfortunately.
Edit:
Dark Byte wrote: | make sure you limit the number of windows api calls to the bare minimum
Instead of calling readprocessmemory for every byte, call it to read big chunks of memory and evaluate that
And to figure out what blocks to read, use VirtualQueryEx to find the size and location of readable blocks |
So does this mean I should use ReadProcessMemory with a 32 or 64 bit type? How could I split it up into the specified type?
What is VirtualQueryEx specifically for? I have a way to get the Base address if it has anything to do with that.
|
|
Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Sat Apr 03, 2010 11:56 am Post subject: |
|
|
VirtualQueryEx will return to you the memory page information the MEMORY_BASIC_INFORMATION structure from the address. It can be any address, it doesn't have to be the base of the memory region. Read up MSDN on VirtualQueryEx.
|
|
Back to top |
|
 |
|