Um if you just want to put 10 into eax then why don't you just do that. Like
push eax
mov eax, 10
pop eax
But that's not really what you are after I think, Because the FTSP is a mov pop, and the value in [] is edi+eax+4*8 I mean you could just break and find edi, eax and mov four to get the value of eax+4 add them and multiply but that's lot of work I would just replace it with your own label like
alloc(newmem,2048)
label(turnItOn)
label(originalCode)
label(WantedNumber)
label(DontWantedNumber)
registersymbol(WantedNumber)
registersymbol(DontWantedNumber)
[enable]
turnItOn:
fstp dword ptr [WantedNumber]
pop edi
jmp DontWantedNumber
WantedNumber:
dd (float) 10.0
DontWantedNumber:
fstp dword ptr [edi+eax*8+04]
pop edi
[disable]
originalCode:
fstp dword ptr [edi+eax*8+04]
pop edi
unregistersymbol(WantedNumber)
unregistersymbol(DontWantedNumber)
dealloc(newmem)
If its a multiplayer game you might want to add a cmp switch to check the player and make sure you are not also helping them. This is easy to do. Most games store you as the default player one on your console. So just search for a 1 on your turn and 0 on opponents turn if 2 player normally works. Or just 1 on my turn and not 1 on opponent. If this fails then try you as a 0 and not 0 for opponent. If not, get creative. Once you have this find the offset and get a good static address and just add it like this
AOBSCAN(Player, ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??)
label(Player)
registersymbol(Player)
cmp [Player], (int)1 // if the player value you found for your turn is = to 1// compare Player to Number 1
jne DontWantedNumber
je WantedNumber
jmp originalCode
Blah blah. I think I covered your question. Only 7 years later.
Player:
dd (int)0