Seeing easy hook examples I was able to create a hook for openProcessMemory in order to prevent some hacks mess up with some games. The case I'm facing is that some hacks do it's job so quickly that i can't make the injection in time. For example: Process A (The hack) Process B (The game) Process C (Anti cheat)
A's process open the process memory of game, write into it the desire data, and close it self, giving no time to C process, to inject A, for hook openProcessMemory to catch the moment when the hack try to open the game process. This process works fine while hacks waits for user input since, give time to the anti cheat do his job.
So, here's some questions: Is there a way, through c# easyhook, to know when game memory Is going to be modified by a hack? Currently hooking openProcessMemory (opm), writeProcessMemory (wpm) or readProcessMemory (rpm) but with described issue.
When some of related methods (opm, rpm or wpm) perform some action in target process, could this target process activate another winApi function based on the related methods?
Summary: I'm hooking injector process. And it works while anticheat has time to hook it. I would like make hooks in game process, that lead me to the injector process.