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 


CreateThread problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Insecurely
Newbie cheater
Reputation: 0

Joined: 02 Dec 2014
Posts: 23

PostPosted: Mon Mar 28, 2016 4:25 am    Post subject: CreateThread problem Reply with quote

Hello, I would like to call a function from my own thread but I do not have much knowledge within such thing.

ADDRESS:
mov ecx,theECXhere
call 00400000(Example)
ret

You probably understand what I want to do, but that code theory just creates a crash, I have no idea how to call a function, any help would be appreciated.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Mon Mar 28, 2016 7:47 am    Post subject: Reply with quote

Code:
alloc(newmem,2048)
createthread(newmem)
newmem:
// push any arguments onto the stack in reverse order
call addressOfSubroutine
// if subroutine is caller-cleanup, remove arguments from the stack
ret

Note that in 64-bit processes the caller has to give 32 bytes of space on the stack for the callee.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
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