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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x51b890]
xor eax, eax
dec ecx
push edi
test ecx, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
jbe 0x406aa7
jmp 0x4066b8
mov esi, dword [esp + 0x18]
cmp dword [eax*4 + 0x51b894], 0x3f19999a
jne 0x406a93
fld dword [eax*4 + 0x51bd20]
push 0x3f800000
mov dword [esp + 0x58], 0x3f800000
fstp dword [esp + 0x38]
fld dword [eax*4 + 0x51bb90]
sub esp, 0xc
mov dword [esp + 0x58], 0x3f800000
fstp dword [esp + 0x48]
fld dword [eax*4 + 0x51bd24]
mov edx, esp
mov dword [esp + 0x4c], 0x3f800000
fstp dword [esp + 0x50]
fld dword [eax*4 + 0x51bb94]
fstp dword [esp + 0x54]
fld dword [esp + 0x54]
fsub dword [esp + 0x48]
fstp dword [esp + 0x5c]
fld dword [esp + 0x44]
fsub dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
mov dword [edx], eax
mov eax, dword [esp + 0x64]
fstp dword [esp + 0x60]
mov ecx, dword [esp + 0x60]
mov dword [edx + 4], ecx
lea ecx, [esp + 0x80]
push ecx
mov dword [edx + 8], eax
call fcn.0044ebc0
mov edx, eax
lea esi, [esi + esi*8]
shl esi, 5
mov edi, dword [edx]
mov dword [esp + 0x1c], esi
lea esi, [esi + 0x49f7f0]
sub esp, 0xc
mov ebx, dword [edx + 4]
mov ecx, dword [edx + 8]
mov edx, esi
mov dword [esp + 0x60], ecx
mov ecx, dword [edx]
mov dword [esp + 0x64], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x68], ecx
mov ecx, esi
mov edx, dword [edx + 8]
mov ebp, dword [ecx]
mov dword [esp + 0x6c], edx
mov edx, esp
sub esp, 0xc
mov dword [edx], ebp
mov ebp, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [edx + 4], ebp
mov dword [edx + 8], ecx
mov ecx, dword [eax]
mov edx, esp
sub esp, 0xc
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [edx + 4], ecx
mov ecx, esp
mov dword [edx + 8], eax
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [ecx], edx
mov edx, dword [esp + 0x60]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov ecx, 0x49f7e8
call fcn.00406af0
sub esp, 0xc
mov ebp, eax
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x6c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
sub esp, 0xc
mov eax, dword [esp + 0x6c]
mov edx, esp
sub esp, 0xc
mov ecx, esp
mov dword [edx], edi
mov dword [edx + 4], ebx
mov dword [edx + 8], eax
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov dword [ecx], edx
mov edx, dword [esp + 0x6c]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov ecx, 0x49f7e8
call fcn.00406af0
cmp ebp, 0xffffffff
je 0x406a8f
cmp eax, 0xffffffff
je 0x406a8f
cmp ebp, eax
je 0x406a8f
mov dword [esp + 0x10], 0
fld dword [esp + 0x40]
fadd dword [esp + 0x34]
mov eax, esi
sub esp, 0xc
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x70], ecx
fmul dword [0x4914c8]
mov eax, dword [eax + 8]
mov ecx, esi
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], eax
mov eax, dword [ecx]
mov edx, esp
fstp dword [esp + 0x34]
fld dword [esp + 0x50]
fadd dword [esp + 0x44]
mov dword [edx], eax
mov eax, dword [ecx + 4]
sub esp, 0xc
mov ecx, dword [ecx + 8]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x6c]
mov dword [edx + 8], ecx
mov edx, esp
fmul dword [0x4914c8]
mov dword [edx], edi
sub esp, 0xc
mov ecx, esp
mov dword [edx + 4], ebx
fstp dword [esp + 0x50]
fld dword [esp + 0x60]
fadd dword [esp + 0x6c]
mov dword [edx + 8], eax
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [ecx], edx
mov edx, dword [esp + 0x60]
fmul dword [0x4914c8]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov ecx, 0x49f7e8
fstp dword [esp + 0x54]
call fcn.00406af0
sub esp, 0xc
mov ebp, eax
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
mov eax, esp
sub esp, 0xc
mov dword [eax], ecx
mov ecx, dword [esp + 0x84]
mov dword [eax + 4], edx
mov edx, esp
sub esp, 0xc
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x78]
mov dword [edx], edi
mov ecx, esp
mov dword [edx + 4], ebx
mov dword [edx + 8], eax
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
mov dword [ecx], edx
mov edx, dword [esp + 0x54]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov ecx, 0x49f7e8
call fcn.00406af0
cmp ebp, 0xffffffff
je 0x40697b
cmp eax, 0xffffffff
je 0x40697b
cmp ebp, eax
mov eax, dword [esp + 0x28]
jne 0x406955
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
jmp 0x406969
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x10
mov dword [esp + 0x10], eax
jl 0x406844
cmp dword [esp + 0x10], 0x10
jne 0x406a8f
mov ecx, dword [esp + 0x28]
push 0
sub esp, 0xc
mov edi, dword [0x49f7f0]
mov eax, esp
sub esp, 0xc
lea edx, [esp + 0x3c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
mov eax, esp
xor ecx, ecx
mov dword [eax], edi
mov edi, dword [0x49f7f4]
mov dword [eax + 4], edi
mov edi, dword [0x49f7f8]
mov dword [eax + 8], edi
call fcn.00416d10
test eax, eax
jne 0x406a8f
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov edi, dword [0x49f7f0]
mov ebx, dword [0x49f7f4]
mov ebp, dword [0x49f7f8]
push eax
sub esp, 0xc
mov dword [0x49f7f0], ecx
mov dword [0x49f7f4], edx
mov dword [0x49f7f8], 0x3f800000
mov ecx, dword [esi]
mov eax, esp
sub esp, 0xc
lea edx, [esp + 0x3c]
mov dword [eax], ecx
mov ecx, dword [esi + 4]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 8]
mov esi, dword [0x49f7f0]
mov dword [eax + 8], ecx
mov eax, esp
xor ecx, ecx
mov dword [eax], esi
mov esi, dword [0x49f7f4]
mov dword [eax + 4], esi
mov esi, dword [0x49f7f8]
mov dword [eax + 8], esi
call fcn.00416d10
mov ecx, dword [esp + 0x1c]
lea edx, [ecx + 0x49f7e8]
cmp eax, edx
jne 0x406a7d
cmp dword [0x49e57c], 1
jne 0x406ab1
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x3c]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
call dword [0x49e658]
test eax, eax
je 0x406ab1
mov dword [0x49f7f0], edi
mov dword [0x49f7f4], ebx
mov dword [0x49f7f8], ebp
mov eax, dword [esp + 0x14]
mov edx, dword [0x51b890]
inc eax
dec edx
mov dword [esp + 0x14], eax
cmp eax, edx
jb 0x4066b4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
mov eax, dword [0x49d720]
mov dword [0x49f7f0], edi
test eax, eax
mov dword [0x49f7f4], ebx
mov dword [0x49f7f8], ebp
je 0x406ae3
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add eax, 8
mov dword [eax], ecx
mov ecx, dword [esp + 0x30]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x6c
ret