Solved How to return a mono string in Cydia Subtrate

Status
Not open for further replies.

quandkvn

New Member
i using hook method of Cydia Subtrate for modding unity3d il2cpp game but i don't know how to convert C string to mono string. Pls help me :(
 

Ruit

Adminstrator
Adminstrator
This already been explained in unity forum itself, so do some researches.
struct for 32 bit should look like this.
Code:
struct Il2CppString{
   char pad_0x0[0x8]; // 0x0
   int32_t length; // 0x8
   uint16_t chars; // 0xC
};
Check il2cpp source from unity when you download it and you'll have your answer.
 
Last edited:

quandkvn

New Member
This already been explained in unity forum itself, so do some researches.
struct for 32 bit should look like this.
Code:
struct Il2CppString{
   char pad_0x0[0x8]; // 0x0
   int32_t length; // 0x8
   uint16_t chars; // 0xC
};
Check il2cpp source from unity when you download it and you'll have your answer.
hard with me. I need a specific example
 

Ruit

Adminstrator
Adminstrator
hard with me. I need a specific example
Not so hard to look in unity il2cpp source? it's should be located in unity installation location.
It may take a bit of time for you to find strings part.
Alternatively, you can look up il2cpp functions in ida (they are not stripped), they are prefixed with il2cpp_xx. You could search for string related functions.
 

quandkvn

New Member
Not so hard to look in unity il2cpp source? it's should be located in unity installation location.
It may take a bit of time for you to find strings part.
Alternatively, you can look up il2cpp functions in ida (they are not stripped), they are prefixed with il2cpp_xx. You could search for string related functions.
i am trying. Thank you so much!
 
Status
Not open for further replies.
Top