Bavarian Cheater Reputation: 0
Joined: 28 Feb 2018 Posts: 30
|
Posted: Thu Feb 25, 2021 2:32 pm Post subject: how to map memory offset to the local file offset? |
|
|
how to map memory offset of process I'm attached to, to the local file offset?
plan I'm trying to follow
1. lua: getNameFromAddress("address", false, false, true) - last true returns PE section name, e.g. ".code+offset"
2. asm: GetModuleFileNameW(NULL, path, MAX_PATH) - Retrieves the fully qualified path for the file i'm attached to, e.g. c:\game\file.exe
3. lua: io.open(path)
4. lua: io.write(file_offset)
I'm a bit stuck at p4 trying to find "file+offset" from ".code+offset"
are there any cheaper and easier way lua in CE can provide?
|
|