Joined: 07 Apr 2009
|Posted: Fri Feb 09, 2018 3:30 pm Post subject: Selected Unit [Mono/Unity(x64)]
|Right. So I want to hack a game that probably has been hacked already,
but I want to do it anyway for my own benefit. Endless Legend. It's a 4x strategy game much like the Civilization series. It's also Unity game in 64 bit, and a lot of its primary functions are shared.
I want to be able to adjust the values of the units on the map. I figured to do so; without continuously scanning new units by their variables, I would need to create a script that responds to which unit is selected.
I'm sure it's a hack often done by the more experienced hackers here. And I too have made similar scripts like it (amount of items currently selected with the cursor, etc).
But the few ways I know of to approach this have not been successful and I am entirely at a loss on how to proceed.
What I usually do is simply scan what accesses a value like health, stack size, or in this case movement. Then inject code at that spot to intercept an address in the structure, and rebuild it from there.
However, with this game all unit values (and more) go through a singular function of "set_Value" and "get_Value".
Now, usually this wouldn't stop me. I would find a registry value that's consistent across all of the values that the unit hands over. But there's really way too many values that go through this function.
So my question is, how do you guys do it? Is there a comprehensive and diverse guide on this somewhere? Am I missing something obvious? Should I try finding something C# related in the dissector and try from there?
Any advice would be much appreciated.