1

I've only been investigating Cheat Engine within the last week and I want to be able to use a python script to read memory from a pointer and a series of offsets using the pymem module. I'm receiving the error, "pymem.exception.ProcessNotFound: Could not find process: GameAssembly.dll" whenever I run the script, despite Cheat Engine referencing me to this process. I would appreciate any solution to this problem, or an alternative method.

Below is my code:

from pymem import *
from pymem.process import *

pm = pymem.Pymem("GameAssembly.dll")
gameModule = module_from_name(pm.process_handle, "GameAssembly.dll").lpBaseOfDll

def GetPointerAddress(base, offsets):
    address = pm.read_int(base)
    for i in offsets:
        if i != offsets[-1]:
            address = pm.read_int(addr + i)
    return address + offsets[-1]

offset = 0x023BC200
offsets = [0x50, 0xB8, 0x0, 0xB8, 0x10, 0x230, 0x18, 0x30, 0x10, 0x28]

while True:
    output = pm.read_int(GetPointerAddress(gameModule + offset, offsets))
    print(output)

And all the data from Cheat Engine: enter image description here

Thank you for your time.

1 Answers1

0
pm = pymem.Pymem("GameAssembly.dll")

This will try to open a process called "GameAssembly.dll", which does not exist. GameAssembly.dll is just a module in the processes memory.

Your code should look like this:

pm = pymem.Pymem("GameProcessBinaryName.exe")
gameModule = module_from_name(pm.process_handle, "GameAssembly.dll").lpBaseOfDll