Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Couldn't figure out how to use MUL

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Aleynacombi
Advanced Cheater
Reputation: 0

Joined: 01 Nov 2015
Posts: 79
Location: Gearworks

PostPosted: Tue May 16, 2017 3:59 am    Post subject: Couldn't figure out how to use MUL Reply with quote

Hey.

I previously have written an infinite health cheat for a game.
I achieved this by moving the maximum health value into current health value.

However recenlty I realised maximum health is not really the maximum health beacuse there is a health multiplier.

In this particular case, let eax be the regiter which contains the base adress of the player, eax+34 is the current health, eax+38 is the maximum health and eax+3C is the health multiplier value. Health and maximum health values are in 4 Bytes and health multiplier value is in Float.

So I should move the multiplication of eax+38 and eax+3C to eax+34 to make it look right again but as you know, I can't just put * between and multiply them. I will provide the current code and I will kindly ask someone who has used MUL operation code before to modify it so that it will replace current health with maximum health * health modifier.

Thanks in advance, here is the code: http://i.epvpimg.com/jTVYbab.png

_________________
Welcome to Vincent Corporation
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 26

Joined: 01 Oct 2008
Posts: 663

PostPosted: Tue May 16, 2017 5:41 am    Post subject: Reply with quote

There are fpu commands fild/fistp/fimul etc to handle integer in memory as float.
http://x86.renejeschke.de/

A possible script with eax as base:
Code:

fild    dword ptr[eax+38]
fmul    dword ptr[eax+3c]
fistp   dword ptr[eax+34]

_________________
- Retarded.
dropbox
Back to top
View user's profile Send private message
Aleynacombi
Advanced Cheater
Reputation: 0

Joined: 01 Nov 2015
Posts: 79
Location: Gearworks

PostPosted: Tue May 16, 2017 8:06 am    Post subject: Reply with quote

panraven wrote:
There are fpu commands fild/fistp/fimul etc to handle integer in memory as float.
http://x86.renejeschke.de/

A possible script with eax as base:
Code:

fild    dword ptr[eax+38]
fmul    dword ptr[eax+3c]
fistp   dword ptr[eax+34]


Thank you so much, of course, I've done some searching to figure out myself but all of the examples used something like st(0) or whatever which got me confused.

_________________
Welcome to Vincent Corporation
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites