I wanted to debug a game using OllyDBG. When I'm in the game main menu, I can debug and set breakpoint without problem and when I open the game process using Cheat Engine, I can view the memory.
But when I start to play the game and enter the game map, the game crash when the breakpoint triggered. And also, when I try to reattach the Cheat Engine, the memory cannot be read.
And when I go back to the main menu again, the protection is being turn off... I can view the memory, and debug again.
Any idea which on which function should add bp in order to trace this memory protection? I already add bp on the
IsDebuggerPresent, but it doesn't trigger, so I'm pretty sure it's not the one..