how to multiply an address's value?

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
reverser69
Cheater
Cheater
Posts: 28
Joined: Wed Dec 27, 2017 2:40 pm
Reputation: 0

how to multiply an address's value?

Post by reverser69 » Fri May 11, 2018 11:57 am

hey guys



this is the code fetching player speed





fld dword ptr [esp+04]

fstp dword ptr [ecx+0C]



how can i multiply [esp+04] or [ecx+0C] by value for ex:6 ?

User avatar
SunBeam
Trouble Makers
Trouble Makers
Posts: 1504
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 222

how to multiply an address's value?

Post by SunBeam » Fri May 11, 2018 12:01 pm

[code=CEA]

label( myFloat )



code:

fld [esp+4] // load [esp+4] into st0 = a

fld [myFloat] // load [myFloat] into st1 = b

fmul st0,st1 // a*b stored in st0

fstp [esp+C] // store result in [esp+C]



myFloat:

dd (float)6.0

[/code]





Also see this: [URL]https://en.wikibooks.org/wiki/X86_Assembly/Floating_Point[/URL]
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 3 times in total.

Post Reply

Who is online

Users browsing this forum: No registered users