So that the developer does not close the vulnerability, the game will not be named, and some of the information that allows to identify the game will be changed.
The game is quite popular - more than 1 million installations.
The game is an RPG. There is PvP mode, there are local companies, many different currencies.
Everything is on the server, but the battles themselves are turn-based and are calculated locally.
This is the possibility of hacking.
In battle, coins may fall out of the rivals.
The maximum number of coins per battle is limited and written directly on the screen.
This is 240 coins.
Also, for killing each opponent’s troops they give a stone.
In total there can be up to 8 troops. However, part of the troops may be called up by other troops, so it is impossible to say unequivocally how many stones will be received in battle.
But, more often than not, there is no appeal, so there are 8 stones per battle.
The maximum number of stones per battle is limited and is 120.
Each part of the company contains about 30 battles.
Values in memory are not protected.
Therefore, starting the battle, it is possible by direct search to find 2 values in memory for gold and 3 for stones.
They always have the same offset relative to each other.
Gold is easier to find, stones are harder. But once finding a mutual displacement. You can make a saved list with the necessary data.
Next, we find the value of gold, we consider the offset between the past and current address and use the relocation to get the addresses of the stones.
This can also be done through a script, or through an offset calculator.
In fact, the game reuses memory, so the addresses between the battles remain the same almost always.
For about 100 battles, only twice was it necessary to do a rebase.
After the value is found, we change the value of gold and stones to a maximum of-1. 239 coins and 119 stones. And then we collect some more gold and stones so that the game updates its data everywhere.
As a result, the maximum possible number of resources comes from one battle.
Experience points are a bonus. They are calculated based on the collected stones.
Therefore, after each battle there is an increase in the level of the hero.
And each level increase gives bonuses.
Thus, you can level up the hero very quickly.
The hero’s leveling speed is 10-20 times higher, since we get a level increase for each battle, while the level of opponents grows at a normal speed.
Therefore, each subsequent battle is simpler and simpler.
And all this works, despite the fact that the game is server-based and almost everything is on the server.