need some help with CE code
originalcode:
fstp dword ptr [edi+eax*8+04]
pop edi
now what i want to do with this is have EAX which would be the "stored value"
The Acculmulator register. It can also be used as storage. <
now i know pop EDI means is going to take the value that is in edi "transfer the number" to something
but what i want to do is add the value of iunno 10 or somthing so EAX now reads EAX
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(amount)
label(type_coins)
newmem:
pushad
mov [amount],(float)10 // the amount i want EAX to be
push [amount]
push type_coins
push 01
add esp,0c
popall
mov eax,-1000 // i am under the impression of it that this is the problem.
originalcode:
fstp dword ptr [edi+eax*8+04] // the code i need to edit.
pop edi
exit:
jmp returnhere
amount:
db 00 00 00 00
type_coins:
db 'coins'
db 00
this above is the code i have so far i just wonder how i would make it so i have 10 in EAX any tips or help? forgot to add the fact that right now all it does is freeze the value @ its current state 5 and if i build somthing or sell somthing it remains at one but still spends the coins so im not sure what i did wrong =(
---------- Post added 11-07-2012 at 12:21 AM ---------- Previous post was 11-06-2012 at 10:54 PM ----------
so in a nutshell i want edi+eax*8+04 < to edit this so that it will
newmem:
pushad
mov [amount],(float)10
accept this.