This time I am working on some kind of super jump script.
I am using IDA to generate pseudo .c code for better understanding.
Can someone tell me if that script multiplies a value with my value and stores the output again?
The original function multiplies x, y and z with 0.5 while jumping and stores results.
My goal is to multiply z with a value I like to define.
Examples:
z * 0.4
z * 0.9
z * 0.2
I will comment everything.
--------------------------------------------------------------------------------
Code: Select all
[ENABLE]
aobscanmodule(INJECT,game.exe,bla bla bla) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
alloc(multi,4) // allocs memory for a double
multi:
dq (double)0.3 // defines multi's type and value
newmem:
code:
fld dword ptr [esp+28] // load z related value
fld qword ptr [multi] // load my 0.3
fmul [esp+28] // Multiply [mutli] with [esp+28] ???
fstp dword ptr [esp+08] // stores my output where normal output would be stored
jmp return
INJECT:
jmp newmem
nop 3
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db D9 44 24 28 D8 4C 24 30
unregistersymbol(INJECT)
dealloc(newmem)
dealloc(multi)
Thanks for any help!