I'm not patching random stuff — I'm specifically patching the DreamBlast.Inventory::GetCoins function
Here’s how it looks in IDA:
il2cpp:0000000001ADA504 ; DreamBlast.Inventory::GetCoins
il2cpp:0000000001ADA504 SUB SP, SP, #0x40
il2cpp:0000000001ADA508 STP X22, X21, [SP,#0x30+var_20]
il2cpp:0000000001ADA50C STP X20, X19, [SP,#0x30+var_10]
...
il2cpp:0000000001ADA5B0 RET
It just returns the coin count using GetItemCount and Mathf.Max
I try to patch it like this
MOV W0, #99999
RET
Or in hex:
20 0B 80 D2 ; MOV W0, #99999
C0 03 5F D6 ; RET
But after patching, the app immediately crashes. The address is correct, and I’m only replacing the start of the function