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 


ExecuteCodeEx Single thread unlimited calls ?

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

Joined: 08 Oct 2016
Posts: 43

PostPosted: Sat Dec 25, 2021 9:58 pm    Post subject: ExecuteCodeEx Single thread unlimited calls ? Reply with quote

Good day, I'm trying to learn something about cheat engine lua
I found a lua command that will work for me, but it is used in a single call.
I've tried doing this forever but it starts thousands of threads and freezes the program.

Is there a way how can I do this ?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Dec 26, 2021 4:52 pm    Post subject: Reply with quote

look into createRemoteExecutor() and createExecuteCodeExStub

each RemoteExecutor is just a single thread waiting to execute a stub
it's a lot more efficient

_________________
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
maskelihileci
Cheater
Reputation: 0

Joined: 08 Oct 2016
Posts: 43

PostPosted: Mon Dec 27, 2021 5:18 pm    Post subject: Reply with quote

Dark Byte wrote:
look into createRemoteExecutor() and createExecuteCodeExStub

each RemoteExecutor is just a single thread waiting to execute a stub
it's a lot more efficient



createExecuteMethodStub(1,0x00401210,{regnr=0,classinstance=0x1},{type=0,value=0x00B37550})
createRemoteExecutor()


I don't understand how it's done. I try this way. The thread is created but it doesn't call the function. Can you help me?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Mon Dec 27, 2021 6:09 pm    Post subject: Reply with quote

read celua.txt

something like
Code:

stub=createExecuteMethodStub(1,0x00401210,0,0)

executor=createRemoteExecutor()


and then whenever you wish to execute the function do
Code:

executor.executeStub(stub,1,0x00B37550)


(also a classInstance of 0x1? Isn't createExecuteCodeExStub better then if you're not using the instance)

_________________
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
maskelihileci
Cheater
Reputation: 0

Joined: 08 Oct 2016
Posts: 43

PostPosted: Mon Dec 27, 2021 11:44 pm    Post subject: Reply with quote

Dark Byte wrote:
read celua.txt

something like
Code:

stub=createExecuteMethodStub(1,0x00401210,0,0)

executor=createRemoteExecutor()


and then whenever you wish to execute the function do
Code:

executor.executeStub(stub,1,0x00B37550)


(also a classInstance of 0x1? Isn't createExecuteCodeExStub better then if you're not using the instance)


I tried the code you gave exactly, it didn't work, it happens when I specify a class instance, so I need it.
Back to top
View user's profile Send private message
maskelihileci
Cheater
Reputation: 0

Joined: 08 Oct 2016
Posts: 43

PostPosted: Fri Dec 31, 2021 8:51 am    Post subject: I think I found a bug Reply with quote

After a long struggle, I figured out how to remove it and run it in a single thread. All that's left is to add the parameters.

But a bug occurs

stub=createExecuteMethodStub(1,0x00401210,{0},{type=0})
executor=createRemoteExecutor()
executor.executeStub(stub,{0x1,0xAF7550},100)


I make the eax register 1 esp+4 parameter 0xAF7550 call to be

If both are used
The return address that should be in the esp+8 section is shifted to the esp+10 register, if the opcodes were designed accordingly, of course there would be no problem.

But unfortunately, the program crashes afterwards, I tried to change the call method, but it still didn't work.



Scrn.PNG
 Description:
 Filesize:  90.01 KB
 Viewed:  2581 Time(s)

Scrn.PNG


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

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

PostPosted: Fri Dec 31, 2021 9:35 am    Post subject: Reply with quote

try a custom routine that calls the code you want and use executecode on that

Or perhaps you have the parameter count wrong, or the calling convention is wrong

_________________
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
maskelihileci
Cheater
Reputation: 0

Joined: 08 Oct 2016
Posts: 43

PostPosted: Fri Dec 31, 2021 12:11 pm    Post subject: Reply with quote

executeMethod (1,100,0x401210,{regnr=0,classinstance=0x1},{type=0,value=0x00B37550})

I can call executeMethod using this function without any problems. But createExecuteMethodStub this function is giving trouble.

Maybe I couldn't do it. I wanted a convenience where I could call functions continuously using lua.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jan 01, 2022 3:26 am    Post subject: Reply with quote

your methodstub is wrong. You declare 2 parameters but only need 1
_________________
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 -> 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