Solved How to return a mono string in Cydia Subtrate

Discussion in 'Development Support' started by quandkvn, Mar 7, 2019.

Thread Status:
Not open for further replies.
View Users: View Users
  1. quandkvn

    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 :(
     
  2. Ruit

    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: Mar 7, 2019
  3. quandkvn

    quandkvn New Member

    hard with me. I need a specific example
     
  4. Ruit

    Ruit Adminstrator Adminstrator

    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.
     
  5. quandkvn

    quandkvn New Member

    i am trying. Thank you so much!
     
Thread Status:
Not open for further replies.