Eh.. I thought I would give this a try instead of they "keypress and wait" method.
But I still cant seem to get it working. This is what I got.
Code:
Address Hex dump Command Comments
00949C50 /$ 55 PUSH EBP ; Wow.00949C50(guessed Arg1)
00949C51 |. 8BEC MOV EBP,ESP
00949C53 |. D945 08 FLD DWORD PTR SS:[ARG.1]
00949C56 |. 56 PUSH ESI
00949C57 |. D9C0 FLD ST
00949C59 |. 8BF1 MOV ESI,ECX
00949C5B |. D866 20 FSUB DWORD PTR DS:[ESI+20]
00949C5E |. D9E1 FABS
00949C60 |. D81D 64CB9A00 FCOMP DWORD PTR DS:[9ACB64] ; FLOAT 9.536743e-07
00949C66 |. DFE0 FSTSW AX
00949C68 |. F6C4 05 TEST AH,05
00949C6B |. 7B 1C JPO SHORT 00949C89
00949C6D |. F746 44 00100 TEST DWORD PTR DS:[ESI+44],00001000
00949C74 |. D95E 20 FSTP DWORD PTR DS:[ESI+20]
00949C77 |. 75 12 JNE SHORT 00949C8B
00949C79 |. 6A 00 PUSH 0 ; /Arg1 = 0
00949C7B |. E8 60E4FFFF CALL 009480E0 ; \Wow.009480E0
00949C80 |. 8366 44 CF AND DWORD PTR DS:[ESI+44],FFFFFFCF
00949C84 |. 5E POP ESI
00949C85 |. 5D POP EBP
00949C86 |. C2 0400 RETN 4
00949C89 |> DDD8 FSTP ST
00949C8B |> 8366 44 CF AND DWORD PTR DS:[ESI+44],FFFFFFCF
00949C8F |. 5E POP ESI
00949C90 |. 5D POP EBP
00949C91 \. C2 0400 RETN 4
Seems like we have an StdCall with 1 param as returnValue? Looking at RETN 4.
so..
Code:
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
private unsafe delegate int SetFacing(float floatPtr);
Not sure about the float floatPtr. But ive tried almost everything as argument, pointer to the float value.. etc etc Everything crashes wow. :/
I really suck at ASM.. sigh..