News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Getting whole memory region

Started by BlackVortex, October 12, 2009, 02:32:29 PM

Previous topic - Next topic

BlackVortex

I'm making a memory search program to search for bytes in another process, for use in trainers (like Cheat Engine, searching for health values etc)

I first did a loop with ReadProcessMemoryEx and it worked of course, but it takes 3 seconds to go through a few megabytes, so it's kinda useless. So I decided to use VirtualQueryEx to get all the memory regions of the process and ReadProcessMemoryEx them to my process and do the comparison afterwards. This is a hundred times quicker, but there is a slight problem : sometimes it breaks the region to smaller regions, especially in the .data section of the target, why is that ? They seem consecutive in the debugger !

Is it because the state or the access is different, so it doesn't regard them as consecutive pages ? Is there a way to get the full region at once ? Maybe using another API ?

P.S.: Usually I'm the first one to bash those who deal with malicious coding, but this is not malicious, just memory searching another process.

BogdanOntanu

I would like to believe that you have the best intentions at heart.

However there is no way that I can be sure of your real intentions :D

Then:
=====
1) The rules do not allow modifying copyrighted programs (yes not even trainers for games). Basically if you did not write the program then you are not supposed to modify it. Use the plugin interface IF the target game has one or let it be and write your own game/application.

2) IF we answer such kind of questions here THEN somebody else could read the answer...  and we would be involuntary helping somebody with a "bad intention"

3) There are so many "dark" places and forums on the internet for asking such questions and getting answers. Please keep this forums dedicated to creation and avoid the dark or gray areas ...

Locked
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro