I know you believe me, but I wanted to make a short video anyway. Also, I googled ASLR and found out what it was. It was disabled, but even after enabling and rebooting Win 10, it still works with Quake 2. Here's my test code, and my video link. As you can see, I can read the player's Health level with PureBasic, no matter how often I restart the game. So it's a non-changing memory address for it ($AF05E2). Same goes for ammo and other items.
Code: Select all
exe$="C:\Quake2\Quake2.exe"
hProcess=RunProgram(exe$,"+map q2dm1",GetPathPart(exe$),#PB_Program_Open)
pid=ProgramID(hProcess)
ProcessHandle=OpenProcess_(#PROCESS_ALL_ACCESS,0,pid)
While ProgramRunning(hProcess)
ReadProcessMemory_(Processhandle,$AF05E2,@Health.w,2,0)
Debug Health ; Always matches the game.
Delay(250)
Wend
The video proof ->
https://i.imgur.com/u5xai4D.mp4
Note that Imgur "optimized" the video upload, so make it full-screen to read it better.