Hi, i'm making a mod for a simple android game (lgl mod menu). I hooked an update function, it's working ok, now i need to patch some static fields in the main class.
I've tried 2 methods thus far:
1. Hook class directly from offset, I'm using the typeinfo method
I have the header file for this game, so i do this
Returns a wrong address and i get segfault later
2. Hook from instance (my hooked function is a Main function)
Doesn't work and idk why. i also tried casting Main* (not Main__Class), didn't work either. Plz help
I've tried 2 methods thus far:
1. Hook class directly from offset, I'm using the typeinfo method
I have the header file for this game, so i do this
C++:
Main__Class* mainclass = (Main__Class*) getAbsoluteAddress(targetLibName, 0x029a6a68)
2. Hook from instance (my hooked function is a Main function)
C++:
Main__Class* mainclass = (Main__Class*) instance;