This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Help

Viktorovich31

Platinian
Tell me please! Through the game guardian, I found out that this value is responsible for the number of coins "int _coinCount; // 0x3C"
There is no update method in this class, tried all methods in this class. Can you tell me how to find the correct update method?
 

Attachments

Last edited:
you can hook the getter method

// RVA: 0x1B82438 Offset: 0x1B82438 VA: 0x1B82438
public int get_coinCount() { }
Thank you. I did not manage to break through this method. Got through the method
"public void set_coinCount(int value) { }"
This class has the required fields, they are only in this class. I want to break through the update, but I don’t know how to find the update method!
Tell me please.
 

Attachments

  • Screenshot_20221125-104709_MT Manager.jpg
    176 KB · Views: 60
try this :
C++:
bool UnlimitedCoin;


void (*set_coinCount)(void *instance, int value);
//the void *instance is a self-created variable.
int (*old_get_coinCount)(void *instance);
int get_coinCount(void *instance) {
    //Check if instance is NULL to prevent CRASH
    if (instance != NULL && UnlimitedCoin)
    {
        set_coinCount(instance, 999999); //Function Pointer mod
    }
    return old_get_coinCount(instance);
}

call the function pointer just like calling your MSHooks to make your mods work.
C++:
MSHookFunction((void*)getAbsoluteAddress("libil2cpp.so", 0x1B82438), (void*)get_coinCount, (void **)&old_get_coinCount);
set_coinCount = (void(*)(void *, int))getAbsoluteAddress("libil2cpp.so", 0x1B82440);

C++:
case 1:
    UnlimitedCoin = boolean;
    break;
 
Thanks a lot! Please tell me, how can I hook these fields correctly? This class does not have an update method.
 

Attachments

  • Screenshot_20221125-115810_MT Manager.jpg
    176.3 KB · Views: 52
Thanks a lot! Please tell me, how can I hook these fields correctly? This class does not have an update method.
Don't hook the fields if hooking getter function works.
getter function returns value from fields. setter function set value to a field.
To understand more clear

public int get_coin() {
return this.<_coinCount>k__BackingField;
}

public void set_coin(int value) {
this.<_coinCount>k__BackingField = value;

}