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 


Calling a mono function with a thread

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

Joined: 13 Sep 2022
Posts: 14

PostPosted: Mon Dec 11, 2023 1:44 pm    Post subject: Calling a mono function with a thread Reply with quote

My goal is to call a mono function. I a guide I saw, that it is possible to just create a thread and execute in it the opcodes of the target function.
Since I am also using mono features I would like to include the method names inside my opcode.

Somehow I can't even get my script to compile.
I am stuck with this opcode:
Code:
movss xmm0,[StartOfRound:ReviveDeadPlayers+11f0]

Normallly I could just put it in quotes like this
Code:
jbe "StartOfRound:ReviveDeadPlayers"+1037

and the instruction could be compiled. But this time it doesn't work.

Even with this problem fixed, I really can't believe that you could just execute a method this way. The game is based on Unity.
Is this way of executing a method even possible with or without using method names?

I would really appreciate your help.
I've tried searching around but there is only very limited knowledge available about calling a mono function with cheat engine.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 150

Joined: 06 Jul 2014
Posts: 4651

PostPosted: Mon Dec 11, 2023 2:23 pm    Post subject: Reply with quote

Probably RIP-relative addressing. The address is too far away to access it directly. Allocate memory near the address (third parameter to alloc) or reference it indirectly (i.e. through a register).

IIRC there's more to executing a mono function than just passing the right parameters. Open "monoscript.lua" in the autorun folder and search for "invoke" for more information.

_________________
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