Help! (200$) Help Modify Obscured types for ARM64 and libil2cpp unity3d

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
Heres the way I do it:
C++:
int GetObscuredIntValue(uint64_t location){
    int cryptoKey = *(int *)location;
    int obfuscatedValue = *(int *)(location + 0x4);

    return obfuscatedValue ^ cryptoKey;
}

/*
Set the real value of an ObscuredInt.

Parameters:
    - location: the location of the ObscuredInt
    - value: the value we're setting the ObscuredInt to
*/
void SetObscuredIntValue(uint64_t location, int value){
    int cryptoKey = *(int *)location;

    *(int *)(location + 0x4) = value ^ cryptoKey;
}
Heres how to return the value with my method, the method below works the same way:
C++:
void(*old_UpdateHook)(void *instance);
void UpdateHook(void *instance) {

    if(toggle) {
    //0x177 is the field offset, and 999 is the value you return
       SetObscuredIntValue((uint64_t)instance + 0x177, 999);
    }
   return old_UpdateHook(instance);
}
Heres the other one you can try if mine fails, even tho they look about the same (except the float one):
C++:
/*
Set the real value of an ObscuredFloat.
Parameters:
    - location: the location of the ObscuredFloat
    - value: the value we're setting the ObscuredFloat to
*/
void SetObscuredFloatValue(uint64_t location, float value){
    int cryptoKey = *(int *)location;

    /* use this intfloat to get the integer representation of our parameter value */
    intfloat IF;
    IF.f = value;

    /* use this intfloat to generate our hacked ObscuredFloat */
    intfloat IF2;
    IF2.i = IF.i ^ cryptoKey;

    *(float *)(location + 0x4) = IF2.f;
}
C++:
/*
Parameters:
    - location: the location of the ObscuredInt
    - value: the value we're setting the ObscuredInt to
*/
void SetObscuredIntValue(uint64_t location, int value){
    int cryptoKey = *(int *)location;

    *(int *)(location + 0x4) = value ^ cryptoKey;
}
 
Last edited:

finofantashi

Platinian
Original poster
Nov 5, 2021
8
1
3
29
Viet Nam
Heres the way I do it:
C++:
int GetObscuredIntValue(uint64_t location){
    int cryptoKey = *(int *)location;
    int obfuscatedValue = *(int *)(location + 0x4);

    return obfuscatedValue ^ cryptoKey;
}

/*
Set the real value of an ObscuredInt.

Parameters:
    - location: the location of the ObscuredInt
    - value: the value we're setting the ObscuredInt to
*/
void SetObscuredIntValue(uint64_t location, int value){
    int cryptoKey = *(int *)location;

    *(int *)(location + 0x4) = value ^ cryptoKey;
}
Heres how to return the value with my method, the method below works the same way:
C++:
void(*old_UpdateHook)(void *instance);
void UpdateHook(void *instance) {

    if(toggle) {
    //0x177 is the field offset, and 999 is the value you return
       SetObscuredIntValue((uint64_t)instance + 0x177, 999);
    }
   return old_UpdateHook(instance);
}
Heres the other one you can try if mine fails, even tho they look about the same (except the float one):
C++:
/*
Set the real value of an ObscuredFloat.
Parameters:
    - location: the location of the ObscuredFloat
    - value: the value we're setting the ObscuredFloat to
*/
void SetObscuredFloatValue(uint64_t location, float value){
    int cryptoKey = *(int *)location;

    /* use this intfloat to get the integer representation of our parameter value */
    intfloat IF;
    IF.f = value;

    /* use this intfloat to generate our hacked ObscuredFloat */
    intfloat IF2;
    IF2.i = IF.i ^ cryptoKey;

    *(float *)(location + 0x4) = IF2.f;
}
C++:
/*
Parameters:
    - location: the location of the ObscuredInt
    - value: the value we're setting the ObscuredInt to
*/
void SetObscuredIntValue(uint64_t location, int value){
    int cryptoKey = *(int *)location;

    *(int *)(location + 0x4) = value ^ cryptoKey;
}
Thanks but I want to mod value of ObscuredType
 

alsya

Solid & Active Platinian
Oct 21, 2021
80
18
8
unknown
Give me an example of the obscured type, like post a screenshot of a method. So I can know what youre trying to do
how do you hook it? if no fields, and only methods?, my example has a method public obscuredInt get_damage() { }? is it the same way with fields offset??
 

Meepoooo

Platinian
May 9, 2022
12
2
3
39
Viet Nam
Give me an example of the obscured type, like post a screenshot of a method. So I can know what youre trying to do
Plz help me with this:

Code:
{

// dumpcs   
public struct ObscuredInt : IObscuredType, IFormattable, IEquatable<ObscuredInt>, IComparable<ObscuredInt>, IComparable<int>, IComparable
    {
        // Token: 0x0600016F RID: 367 RVA: 0x0000212A File Offset: 0x0000032A
        [Token(Token = "0x6000159")]
        [Address(RVA = "0x28F8AD4", Offset = "0x28F8AD4", VA = "0x28F8AD4")]
        private ObscuredInt(int value)
        {
        }
// field offset
protected ObscuredInt _currentRoomID; // 0x18
    // RVA: 0x1113008 Offset: 0x1113008 VA: 0x1113008
    private void room_update() { }
// code   
    
int GetObscuredIntValue(uint32_t location){
    int cryptoKey = *(int *)0x28F8AD4;
    int obfuscatedValue = *(int *)(0x28F8AD4 + 0x4);

    return obfuscatedValue ^ cryptoKey;
}
void SetObscuredIntValue(uint32_t location, int value){
    int cryptoKey = *(int *)0x28F8AD4;

    *(int *)(0x28F8AD4 + 0x4) = value ^ cryptoKey;
}
bool istele;
int teleValue;
void(* old_UpdateRoom)(void * instance);
void UpdateRoom(void*instance) {
    if(instance != NULL) {
        if(istele) {
            istele = false;
            SetObscuredIntValue((uint32_t ) instance + 0x18, teleValue);
        }
    }
    old_UpdateRoom(instance);
}
MSHookFunction((void *) getAbsoluteAddress("libil2cpp.so", 0x1113008),  (void*)UpdateRoom, (void**)&old_UpdateRoom);
 

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
Plz help me with this:

Code:
{

// dumpcs
public struct ObscuredInt : IObscuredType, IFormattable, IEquatable<ObscuredInt>, IComparable<ObscuredInt>, IComparable<int>, IComparable
    {
        // Token: 0x0600016F RID: 367 RVA: 0x0000212A File Offset: 0x0000032A
        [Token(Token = "0x6000159")]
        [Address(RVA = "0x28F8AD4", Offset = "0x28F8AD4", VA = "0x28F8AD4")]
        private ObscuredInt(int value)
        {
        }
// field offset
protected ObscuredInt _currentRoomID; // 0x18
    // RVA: 0x1113008 Offset: 0x1113008 VA: 0x1113008
    private void room_update() { }
// code

int GetObscuredIntValue(uint32_t location){
    int cryptoKey = *(int *)0x28F8AD4;
    int obfuscatedValue = *(int *)(0x28F8AD4 + 0x4);

    return obfuscatedValue ^ cryptoKey;
}
void SetObscuredIntValue(uint32_t location, int value){
    int cryptoKey = *(int *)0x28F8AD4;

    *(int *)(0x28F8AD4 + 0x4) = value ^ cryptoKey;
}
bool istele;
int teleValue;
void(* old_UpdateRoom)(void * instance);
void UpdateRoom(void*instance) {
    if(instance != NULL) {
        if(istele) {
            istele = false;
            SetObscuredIntValue((uint32_t ) instance + 0x18, teleValue);
        }
    }
    old_UpdateRoom(instance);
}
MSHookFunction((void *) getAbsoluteAddress("libil2cpp.so", 0x1113008),  (void*)UpdateRoom, (void**)&old_UpdateRoom);
You really have no idea what you are doing, you dont replace location with your offset, even tho I showed clearly how it was used in a post above. Just leave it as location and call the method in your update function.
C++:
SetObscuredIntValue((uint32_t)instance + 0x18, 9999999);
 
Last edited:

Wizzy2008

Platinian
May 24, 2023
5
0
1
Turkey
You really have no idea what you are doing, you dont replace location with your offset, even tho I showed clearly how it was used in a post above. Just leave it as location and call the method in your update function.
C++:
SetObscuredIntValue((uint32_t)instance + 0x18, 9999999);
can you help me
public ObscuredFloat JumpForce; // 0x78
// RVA: 0xB445B8 Offset: 0xB445B8 VA: 0xB445B8
public void UpdateDesiredTargetSpeed(Vector2 input) { }

How do I hook this in lgl 3.2