tawnix How do I cheat?
Reputation: 0
Joined: 04 Jan 2024 Posts: 3
|
Posted: Mon Jan 08, 2024 5:07 am Post subject: [Plugin] Is there a way to supply DLLs to cheat engine? |
|
|
sorry for the 2nd post in couple days.
I'm working on this plugin project that strictly uses a driver without loading DBK into my system.
Little background information:
1. Hooking OpenProcess to return (HANDLE)1; so Cheat engine doesn't complain. This allows me to avoid any errors when cheat engine is trying to use Win32 API functions. Because I don't need a handle at all to be honest if I'm doing everything through kernel.
2. I am also obviously hooking the ReadMem, WriteMem, and QueryMem. All of these functions are redirected to my driver.
What I'm trying to accomplish:
I'm trying to redirect the Module32First to my driver so I can fill in that data cheat engine is looking for but this is not as straightforward as other functions are. I can, for example, hook the exported function VirtualQueryEx, and this part is very simple. I send a IO request to my driver and get the MemoryBasicInformation structure and send it to the pointer supplied to VirtualQueryEx like so:
| Code: |
SIZE_T __stdcall CustomVirtualQuery(HANDLE hProcess, LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength) {
MEMORY_BASIC_INFORMATION PersonalMBI{ 0 };
SIZE_T Driversize = Driver.QueryVirtualMemory((HANDLE)*Exported.OpenedProcessID, (PVOID)lpAddress, &PersonalMBI, dwLength);
memcpy(lpBuffer, &PersonalMBI, dwLength);
return Driversize;
} |
I basically just want to give cheat engine the list of modules (DLLs) I obtain from my driver. This doesn't seem as straight forward as the VirtualQueryEx function, where I can read the data from kernel and then just copy the data to the structure CE is supplying in the function parameters.
From kernel I can simply walk the PEB and obtain everything i need.
Does anyone have ideas on how I can accomplish this? Really not sure what to do with this.
|
|