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 


Il2cpp game help

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

Joined: 12 Jul 2025
Posts: 2

PostPosted: Sat Jul 12, 2025 12:59 am    Post subject: Il2cpp game help Reply with quote

I try to hack an Il2cpp game:

Code:
-- Get instance of class
local pm=readQword(findStatic('','PanelManager','<Instance>k__BackingField',true))
print(ToHex(pm))
-- get method address
local method=getAddress('PanelManager.Get')
print(ToHex(method))
-- create mono string
local name =executeCodeEx(1, 1000, getAddress("il2cpp_string_new"), 'PopupDebug')
print(ToHex(name))
-- game crashed. The reason is memory Access Violation.
local dbg=executeCodeEx(1, nil,method,pm,name)



But if I use BepInEx+UnityExplorer to invoke PanelManager.Get method first, the lua code above can be executed correctly.

Do I makes sth. wrong?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Jul 12, 2025 1:13 am    Post subject: Reply with quote

instead of ExecuteCodeEx try mono_new_string('PopupDebug')

or else use a RemoteExecutor then first attach the thread to the mono/il2cpp lob (mono/il2cpp_thread_attach) and then you can call functions with it

_________________
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
differentrain
How do I cheat?
Reputation: 0

Joined: 12 Jul 2025
Posts: 2

PostPosted: Sat Jul 12, 2025 2:09 am    Post subject: Reply with quote

Thanks DB.

But the point is, these code, makes game crash:

Quote:
local pm=readQword(findStatic('','PanelManager','<Instance>k__BackingField',true))
print(ToHex(pm))
local method=getAddress('PanelManager.Get')
print(ToHex(method))
local name =mono_new_string('PopupDebug')
print(ToHex(name))
local methodId = mono_findMethod('','PanelManager', 'Get')
print(ToHex(my_mono_invoke_method(mono_enumDomains()[1],pm,methodId,{name})))



1.png
 Description:
 Filesize:  47.75 KB
 Viewed:  74 Time(s)

1.png


Back to top
View user's profile Send private message
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