Function at 0x518160
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x168
push ebx
mov ebx, ecx
mov ecx, dword [0x5f203c]
call fcn.004b04d0
fsub dword [ebx + 4]
mov ecx, dword [0x5f203c]
fstp dword [esp + 4]
call fcn.004b04d0
mov eax, dword [ebx + 0x48]
fstp dword [ebx + 4]
test eax, eax
je 0x518438
mov ecx, dword [ebx + 0x14]
lea edx, [ebx + 8]
push esi
push edi
lea esp, [esp]
mov eax, dword [edx + 0xc]
add eax, dword [edx + 0x10]
cmp edx, edx
jne 0x5181ae
cmp ecx, eax
je 0x5181e5
mov esi, dword [edx + 8]
cmp esi, ecx
mov eax, ecx
ja 0x5181b9
sub eax, esi
mov esi, dword [edx + 4]
fld dword [esp + 0xc]
mov eax, dword [esi + eax*4]
fadd dword [eax]
fstp dword [eax]
mov esi, dword [edx + 8]
cmp esi, ecx
mov eax, ecx
ja 0x5181d2
sub eax, esi
mov esi, dword [edx + 4]
mov eax, dword [esi + eax*4]
fld dword [eax]
inc ecx
fcomp dword [ebx + 0x40]
fnstsw ax
test ah, 0x41
jne 0x5181a0
mov eax, dword [edx + 0x10]
add eax, dword [edx + 0xc]
cmp edx, edx
jne 0x5181f3
cmp ecx, eax
je 0x518209
mov eax, dword [edx + 0x10]
add eax, dword [edx + 0xc]
push eax
push edx
push ecx
push edx
lea ecx, [esp + 0x3c]
push ecx
mov ecx, edx
call fcn.005178d0
mov ecx, dword [ebx + 0x28]
push ebp
lea ebp, [ebx + 0x1c]
mov edx, ebp
mov eax, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
cmp edx, ebp
jne 0x518220
cmp ecx, eax
je 0x518257
mov esi, dword [edx + 8]
cmp esi, ecx
mov eax, ecx
ja 0x51822b
sub eax, esi
mov esi, dword [edx + 4]
fld dword [esp + 0x10]
mov eax, dword [esi + eax*4]
fadd dword [eax]
fstp dword [eax]
mov esi, dword [edx + 8]
cmp esi, ecx
mov eax, ecx
ja 0x518244
sub eax, esi
mov esi, dword [edx + 4]
mov eax, dword [esi + eax*4]
fld dword [eax]
inc ecx
fcomp dword [ebx + 0x40]
fnstsw ax
test ah, 0x41
jne 0x518212
mov eax, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
cmp edx, ebp
jne 0x518265
cmp ecx, eax
je 0x51827b
mov eax, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
push eax
push ebp
push ecx
push edx
lea ecx, [esp + 0x40]
push ecx
mov ecx, ebp
call fcn.005178d0
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x518435
fld dword [ebx + 0x78]
fcomp dword [0x5ac498]
fnstsw ax
test ah, 1
jne 0x518435
mov eax, dword [ebx + 0x8c]
mov ecx, dword [ebx + 0x4c]
lea edx, [esp + 0x10]
push edx
push eax
push ecx
mov ecx, dword [ebx + 0x48]
call fcn.004b61c0
test eax, eax
je 0x518435
mov eax, dword [ebx + 0x8c]
mov ecx, dword [ebx + 0x4c]
lea edx, [esp + 0x30]
push edx
push eax
push ecx
mov ecx, dword [ebx + 0x48]
call fcn.004b6160
fld dword [esp + 0x17c]
mov eax, dword [esp + 0x30]
fmul dword [ebx + 0x80]
mov esi, dword [esp + 0x10]
mov ecx, 0x10
lea edi, [esp + 0x78]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [eax + 0x30]
mov dword [esp + 0xa8], edx
mov ecx, dword [eax + 0x34]
push ecx
mov dword [esp + 0xb0], ecx
mov edx, dword [eax + 0x38]
fstp dword [esp]
push 0
push 0
lea eax, [esp + 0x144]
push eax
mov dword [esp + 0xc0], edx
call fcn.0048e18f
push ecx
fld dword [ebx + 0x7c]
lea ecx, [esp + 0xfc]
fmul dword [0x5999b0]
fstp dword [esp]
push ecx
call fcn.0048e340
lea edx, [esp + 0xf8]
push edx
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0xc0]
push ecx
call fcn.0048d832
mov ecx, 0x10
lea esi, [esp + 0xb8]
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
fld dword [esp + 0x68]
fadd dword [ebx + 0x70]
fstp dword [esp + 0x14]
fld dword [esp + 0x6c]
fadd dword [ebx + 0x74]
fstp dword [esp + 0x18]
fld dword [esp + 0x70]
fadd dword [ebx + 0x78]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], edx
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x20]
mov dword [esp + 0x2c], ecx
push edx
lea ecx, [ebx + 8]
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], eax
call fcn.00518070
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x13c]
push ecx
lea edx, [esp + 0xc0]
push edx
call fcn.0048d832
mov ecx, 0x10
lea esi, [esp + 0xb8]
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
fld dword [esp + 0x68]
fadd dword [ebx + 0x70]
fstp dword [esp + 0x14]
fld dword [esp + 0x6c]
fadd dword [ebx + 0x74]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
fld dword [esp + 0x70]
mov dword [esp + 0x28], ecx
fadd dword [ebx + 0x78]
push eax
mov ecx, ebp
mov dword [esp + 0x24], 0
fstp dword [esp + 0x20]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x30], edx
call fcn.00518070
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x168
ret 4