public class ConsoleCommand // TypeDefIndex: 1447
{
// Fields
private static bool _enableFPS; // 0x0
private static GameObject _fpsObj; // 0x8
// Methods
// RVA: 0x14FDEEE Offset: 0x14FDEEE VA: 0x14FDEEE
public static void RegisterCommandHandlers() { }
[CommandHandler]
// RVA: 0x1500764 Offset: 0x1500764 VA: 0x1500764
public static void EnableInvincibility() { }
[CommandHandler]
// RVA: 0x14FE37F Offset: 0x14FE37F VA: 0x14FE37F
public static void KillMonster() { }
[CommandHandler]
// RVA: 0x14FEDD0 Offset: 0x14FEDD0 VA: 0x14FEDD0
public static void Gold(long amount = 1) { }
}
function CallFuncArgs(Offset, ReturnType, ArgsType, myargs){
var func_ptr = Module.findBaseAddress('libil2cpp.so').add(Offset);
new NativePointer(func_ptr.sign());
var func_call = new NativeFunction(func_ptr, ReturnType, ArgsType);
func_call(myargs);
}
CallFuncArgs(0x14FEDD0, 'void', ['long'], 9999999); //gold
// i tried also passing pointer to the amount like so:
const arg = Memory.alloc(8); //alloc of 8 size(long)
arg.writeInt(9999999);
CallFuncArgs(0x14FEDD0, 'void', ['pointer'], arg); //gold
Yeah this, the prologue will setup the stack and registers at the beginning and the epilogue at the end of the function will reverse what the prologue did before returning control to the calling function.I don't know much about arm assembly but i believe those instructions are just for setting up the stack
Synchronize with -> IDA View
you will see the currently selected line in green, in this example you can see the green ASM view is the 3rd instruction yet the Pseudo code is the first line.public class ReqAdminCommand : IMessage // TypeDefIndex: 871
{
// Fields
public eAdminCommandType Type; // 0x10
public long Variable1; // 0x18
public long Variable2; // 0x20
public long Variable3; // 0x28
public long Variable4; // 0x30
public long Variable5; // 0x38
// Methods
// RVA: 0x18CCB5B Offset: 0x18CCB5B VA: 0x18CCB5B Slot: 4
public void Load(IBinaryReader reader) { }
// RVA: 0x18CCDFB Offset: 0x18CCDFB VA: 0x18CCDFB Slot: 5
public void Save(IBinaryWriter writer) { }
// RVA: 0x18CD0A6 Offset: 0x18CD0A6 VA: 0x18CD0A6
public void .ctor() { }
}
// With eAdminCommandType enum below:
public enum eAdminCommandType // TypeDefIndex: 1379
{
// Fields
public int value__; // 0x0
public const eAdminCommandType None = 0;
public const eAdminCommandType IncreaseGold = 1;
public const eAdminCommandType IncreaseExp = 2;
public const eAdminCommandType AllHeroes = 3;
public const eAdminCommandType UpdateQuest = 4;
public const eAdminCommandType AddItem = 5;
[...]
}
// RVA: 0x19265A5 Offset: 0x19265A5 VA: 0x19265A5
public void ReqAdminCommand(eAdminCommandType type, long[] argList) { }
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies