The fstp instruction is the one that writes to the value.
I have read the man pages etc of fstp, fadd, fmul etc and I still can't seem to get this right.
I tried calling fadd twice. But it doesn't double the value ..makes it exponentially more.
I tried to do fmul [2x] where 2x is a variable with 2 in it.
Still makes the value grow tooo big.
I actually don't understand these floating point instructions very well.
I know they load, store, add value to the stack at st[01] but then how does one manipulate this value?
Where in this set of instructions can inject something to make the value 2 times..?
Also..is
Code:
2x:
dd (float) 2
a valid operation? Or will I have to use fimul instead?
just got up but it sounds like it should have worked lol It's possible the code is being run more often than you think and that's causing it to get bigger than intended.
the i is only for store and load and means to store or load the value as an integer.
maybe try hooking and after the add convert to integer and double it then
Code:
fistp dword ptr [esp+7c] // store as int
mov eax, [esp+7c] // load into register
shl eax, 1 // double integer value with bit math
fild [esp+7c] // load int
fstp dword ptr [esp+7c] // store float
but yeah any of those sound like they should work, duplicating the fadd should double that part of the value or not popping it on store and then adding to itself and re-storing, or fmul [2x] before the store. _________________
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