Posted: Fri Jan 04, 2013 6:54 am Post subject: Pattern searching in code (.text) section - how to do it?
Hi and congratulations for the Cheat Engine tool! I definitely love it!
I'm writing a program which should scan through the code sections (.text) of an executable and I was wondering what could be the best way to do it.. I'm unsure how to scan through the process' memory: ReadProcessMemory is an easy-to-use function but what should I copy in the buffer? Copying each byte while searching sounds terribly expensive.. but copying the entire .text section sounds expensive too.. injecting a dll sounds tricky..
What method does CE use to scan through a process' memory? ReadProcessMemory? And if it does, does it read the entire section each time or reads just a little chunk of memory?
Joined: 09 May 2003 Posts: 25828 Location: The netherlands
Posted: Fri Jan 04, 2013 9:20 am Post subject:
Use VirtualQueryEx to find the size of the module, then allocate as much memory as you need and then read all the memory.
Once all the memory has been read scan through your buffer for the aob _________________
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
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