Prep: Infinite Health and Mana (Offline)

Motivation

After the speed hack we do a quick infinite health and mana hack. Beware that this hack only works locally because we will only modify GameLogic.dll instead of tampering the messages between client and server. The game server performs checks on the value of health and mana, therefore this simple hack only works in offline mode.

Infinite Mana Hack

Search "Mana" in symbols and we find a function named Player::UseMana(int):

WTF is this->m_inventory._Myhead??? Rename the vars a bit:

The mana deduction happens at:

We can "NOP" out the mana subtraction:

Save the patch and go back to the game. Click "Offline Play" and test if mana is infinite now. It should work.

Infinite Health Hack (failed attempt)

Similarly, we can search for "Damage" in symbols and find this Player::Damage() function:

Pseudocode:

If we set v6 to 0 we should be free from damage. So here we can patch the binary to mov eax, 0:

Press space key and hover your mouse on this line. Go to "Edit -> Patch program -> Assemble":

Well, the game crashes. We will try patching something else.

Infinite Health Hack (success)

Note that there is a "respawn" functionality in the game. Search "Respawn" in symbols and we can find a function named Player::PerformRespawn():

Pseudocode:

Basically this code says the character can be respawned with 100 health and 100 mana. If we set this->m_health to something like max Int32 (0x7fffffff), we could gain an insane amount of health when we respawn. This is the relevant assembly:

Patch 0x00000064 to 0x7fffffff:

Go back to the game. Find a rat and get killed, respawn, now we have max Int32 amount of health 😎

Appendix: Cheat Engine edition

Last updated