Avery3R / MMMJTAG

My Machine My JTAG
1 stars 0 forks source link

C interface for reading/writing memory of userland processes #1

Open Avery3R opened 4 years ago

Avery3R commented 4 years ago

I want it to mimic the win32 api as closely as possible, so existing code can just be mostly dropped-in.

Ideally something similar to this pseudocode is how an application using the lib should look:

DWORD procPid = JTAGGetPidFromName("gtutorial-x86_64.exe"); // The graphical tutorial from cheat engine
HANDLE hProc = JTAGOpenProcess(PROCESS_ALL_ACCESS, FALSE, procPid);
uint64_t procBase = JTAGGetProcessModuleBase(hProc, nulltpr); // Gets the base address of the process
uint32_t newAmmoCount = 999;
LPVOID ammoValueAddress = (LPVOID)(procBase + someOffset);
JTAGWriteProcessMemory(hProc, ammoValueAddress, &newAmmoCount, sizeof(uint32_t), nullptr);
Avery3R commented 4 years ago

Also add a function to toggle between using DMA, or halting the processor and having it execute instructions to r/w memory.