Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Override Open/Read/Write Process

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
graysmiley
How do I cheat?
Reputation: 0

Joined: 18 Sep 2021
Posts: 2

PostPosted: Sat Sep 18, 2021 9:13 pm    Post subject: Override Open/Read/Write Process Reply with quote

Hi. I'm trying to find out if it's possible to create a plug-in that allows Cheat Engine to use a process from a custom source.

Specifically, I have a remote connection library for PS3 that provides access to processes memory. I'd like to have a ce plug-in that will use this library rather than an actual Windows process. Could someone tell me if this is possible with the C plug-in sdk, and if so, do you have any suggestions or examples for how I can approach this?

Thanks!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Sep 19, 2021 6:05 am    Post subject: Reply with quote

look at the emurpm extension on ce's githib.

it overrides the original rpm/wpm and vqe

you can use something similar for your situation

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
graysmiley
How do I cheat?
Reputation: 0

Joined: 18 Sep 2021
Posts: 2

PostPosted: Sun Sep 19, 2021 12:22 pm    Post subject: Reply with quote

Dark Byte wrote:
look at the emurpm extension on ce's githib.

it overrides the original rpm/wpm and vqe

you can use something similar for your situation


Thanks, it looks like the C plug-in API has the ability to hook these through the `ExportedFunctions` struct. Is there are API that I can use to actually load memory into the interface, simulating a Windows process opening?

The goal is basically to use memory from a std::vector as my pseudo-process, allowing CE to view and modify the contents of that vector.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sun Sep 19, 2021 6:15 pm    Post subject: Reply with quote

yes.

you can also hook the processlist api and openprocess

also readprocessmemory takes an address and expects a memoryblock to be filled with data, you can fill that data with whatever you like. including the contents of a file

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Mon Sep 20, 2021 12:43 pm    Post subject: Reply with quote

Not Lua related; moved.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
graysmiley
How do I cheat?
Reputation: 0

Joined: 18 Sep 2021
Posts: 2

PostPosted: Tue Sep 21, 2021 12:20 am    Post subject: Reply with quote

Dark Byte wrote:
yes.

you can also hook the processlist api and openprocess

also readprocessmemory takes an address and expects a memoryblock to be filled with data, you can fill that data with whatever you like. including the contents of a file


Unfortunately it looks like ProcessList can't be hooked, only called, as it's a function pointer rather than a pointer to a function pointer.

It seems like getting a custom entry into the Process List will be necessary for what I'd like to do. Does simply calling ProcessList(char *, int) create a usable selection dialog? I've tried calling it myself but get access violations (I assume from the parameters I'm using)

Is there an existing API doc? I hate to ask so many noob questions.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Tue Sep 21, 2021 3:22 am    Post subject: Reply with quote

i meant hooking process32first/next

but you can also just create a dialog yourself and do a lua openProcess(0) and let your openProcess hook return success. That will trigger the UI into normal operation mode

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
graysmiley
How do I cheat?
Reputation: 0

Joined: 18 Sep 2021
Posts: 2

PostPosted: Wed Sep 22, 2021 11:07 pm    Post subject: Reply with quote

Dark Byte wrote:
i meant hooking process32first/next

but you can also just create a dialog yourself and do a lua openProcess(0) and let your openProcess hook return success. That will trigger the UI into normal operation mode


Thank you very much! I seem to have everything working now!

For anyone trying to accomplish something similar, I ended up hooking everything Dark Byte suggested:
Process32First (To set flag for Process32Next)
Process32Next (Add fake process at the end, used 0xFFFFFFFF)
OpenProcess
ReadProcessMemory
WriteProcessMemory
VirtualQueryEx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites