Our great sponsors
-
ghidra-scripts
A collection of my Ghidra scripts to facilitate reverse engineering and vulnerability research.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
By using IL2CppDumper along with the game's global-metadata.dat file, we can generate headers and structs that we can use with Ghidra, a tool for disassembling code. Once we load Engage and these headers and structs into Ghidra, we can look for a particular function called App.BattleMath$$_IsProbabilityHit. This function is provided a displayed hit (or, as Intelligent Systems calls it, ratio) and is responsible for determining whether or not that attack will actually hit. Ghidra will try to automatically decompile the assembly code into something more readable, and while the results are sometimes mixed, here it's pretty clear what's going on. We can see how, when the displayed hit is less than 51 (or when it's 100), it simply multiplies the displayed hit by 100, and when the displayed hit is 51 or greater, it uses the sin function as described earlier:
By using IL2CppDumper along with the game's global-metadata.dat file, we can generate headers and structs that we can use with Ghidra, a tool for disassembling code. Once we load Engage and these headers and structs into Ghidra, we can look for a particular function called App.BattleMath$$_IsProbabilityHit. This function is provided a displayed hit (or, as Intelligent Systems calls it, ratio) and is responsible for determining whether or not that attack will actually hit. Ghidra will try to automatically decompile the assembly code into something more readable, and while the results are sometimes mixed, here it's pretty clear what's going on. We can see how, when the displayed hit is less than 51 (or when it's 100), it simply multiplies the displayed hit by 100, and when the displayed hit is 51 or greater, it uses the sin function as described earlier: