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 


call a function in another process ? stop a process ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
supercharger
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2009
Posts: 61

PostPosted: Fri Jan 17, 2014 2:55 am    Post subject: call a function in another process ? stop a process ? Reply with quote

is it possible to call a function in another process & and in the memory space of that process ?
and is it possible to cause a process to stop at a certain EIP ?
i am thinking of using an EXE or Python to control another process with minimal modification of codes in the target process.
although i can inject codes into a process, i wish i had a quicker way of development, in spite of the low running performance.
Back to top
View user's profile Send private message
Chris12
Expert Cheater
Reputation: 1

Joined: 27 Apr 2012
Posts: 103

PostPosted: Fri Jan 17, 2014 6:24 am    Post subject: Reply with quote

Yes its possible and relatively easy.
It basically works exactly like a normal code injection.
You can even use the code injection template with CE.

For more automatic control write a lua script that creates a code injection at the EIP you want and check some global variable to decide if you want to jump to exit process or not.

You can get the "ExitProcess()" function with GetProcAddress.
Back to top
View user's profile Send private message
supercharger
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2009
Posts: 61

PostPosted: Fri Jan 17, 2014 11:21 am    Post subject: Reply with quote

sorry i didn't express precisely. i should say 'pause' instead of 'stop', i didn't mean to exit a process.

the scenario that i imagined is like this, for example:

a game has functions that draw images or text on screen,
but drawing must be called at a certain EIP (a little sooner or later), or the graphics will be cleared (initialized).
if i want to use the built-in functions to draw some extra images or text, i should inject some codes at the EIP, normally i use DLL here.

but writing/compiling/loading/unloading DLL take quite some time,

so i wish i could use another process(ideally with Python) to pause the game process at an EIP, then call the functions in the game process, then unpause the game process.
because Python has an interactive mode - pause a program and allow me to alter the program then unpause the program. this can be quicker than handling DLL. what's more, writing in Python is much faster than writing ASM. this helps development.

i don't know about many features in CE, i don't know LUA script either. and CE should not be a companion of games, it's only for the time of development, when development is done, CE should not be required. a game should run by itself or with only one specialized trainer running at the background.

so can it be done without CE?
or should i use some features in CE for the time of development then compile DLL when i am sure about the codes?
but sometimes i have to write hundreds lines of code in ASM before i can conclude that the planned feature can work correctly.
does CE help in that situation?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Jan 17, 2014 2:27 pm    Post subject: Reply with quote

If you want to pause a process you can use SuspendThread on the processes main thread. (Wow64SuspendThread for 64bit processes.)
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jan 17, 2014 2:44 pm    Post subject: Reply with quote

Or use NtSuspendProcess(processhandle) from ntdll.dll
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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