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

Disassembly:
sub esp, 0xf8
push ebp
mov ebp, dword [esp + 0x100]
push esi
push edi
mov al, byte [ebp + 0x52]
mov dword [esp + 0xc], 0
test al, al
je 0x405a29
mov eax, dword [ebp + 0x60]
lea ecx, [esp + 0x44]
push eax
push 1
push ecx
call fcn.00404400
mov edx, dword [ebp + 0x64]
lea eax, [esp + 0xd0]
push edx
push 2
push eax
call fcn.00404400
lea ecx, [esp + 0xdc]
lea edx, [esp + 0x5c]
push ecx
push edx
call fcn.004044e0
mov eax, dword [ebp + 0x68]
lea ecx, [esp + 0xe4]
push eax
push 3
push ecx
call fcn.00404400
lea edx, [esp + 0xf0]
lea eax, [esp + 0x70]
push edx
push eax
call fcn.004044e0
add esp, 0x34
lea esi, [esp + 0x44]
lea edi, [esp + 0x84]
jmp 0x405a33
lea esi, [ebp + 0xac]
lea edi, [esp + 0x44]
mov eax, dword [esp + 0x110]
mov ecx, 0x10
test eax, eax
rep movsd dword es:[edi], dword [esi]
je 0x405a53
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.004044e0
add esp, 8
mov al, byte [ebp + 0x52]
test al, al
je 0x405a8d
mov edx, dword [ebp + 0x5c]
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x54]
push edx
push eax
lea edx, [esp + 0xcc]
push ecx
push edx
call fcn.004044a0
lea eax, [esp + 0xd4]
lea ecx, [esp + 0x94]
push eax
push ecx
call fcn.004044e0
add esp, 0x18
jmp 0x405a9e
lea esi, [ebp + 0x6c]
mov ecx, 0x10
lea edi, [esp + 0x84]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x405aba
lea edx, [esp + 0x84]
push eax
push edx
call fcn.004044e0
add esp, 8
lea esi, [ebp + 0x10]
mov edi, 0x10
mov eax, dword [esi]
test eax, eax
je 0x405ade
lea ecx, [esp + 0x44]
lea edx, [esp + 0x84]
push ecx
push edx
push eax
call fcn.004059a0
add esp, 0xc
add esi, 4
dec edi
jne 0x405ac2
mov eax, dword [ebp + 4]
test eax, eax
je 0x40640f
cmp dword [ebp], 0
je 0x40640f
mov eax, dword [0x456688]
sub esp, 0xc
fld dword [eax + 0x38]
fchs
fstp dword [esp + 8]
fld dword [eax + 0x34]
fchs
fstp dword [esp + 4]
fld dword [eax + 0x30]
fchs
fstp dword [esp]
lea eax, [esp + 0xd0]
push eax
call fcn.004044a0
lea ecx, [esp + 0xd4]
lea edx, [esp + 0x94]
push ecx
push edx
call fcn.004044e0
lea eax, [esp + 0x9c]
push 0x456648
push eax
call fcn.004044e0
lea ecx, [esp + 0x64]
push 0x456648
push ecx
call fcn.004044e0
mov ecx, dword [ebp]
mov eax, dword [ebp + 8]
add esp, 0x28
fld dword [eax + 8]
fmul dword [esp + 0x8c]
fld dword [eax + 4]
fmul dword [esp + 0x88]
add eax, 0x30
dec ecx
faddp st(1)
fld dword [esp + 0x84]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0x90]
fstp dword [eax - 0x24]
fld dword [eax - 0x28]
fmul dword [esp + 0x9c]
fld dword [eax - 0x2c]
fmul dword [esp + 0x98]
faddp st(1)
fld dword [esp + 0x94]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0xa0]
fstp dword [eax - 0x20]
fld dword [eax - 0x28]
fmul dword [esp + 0xac]
fld dword [eax - 0x2c]
fmul dword [esp + 0xa8]
faddp st(1)
fld dword [esp + 0xa4]
fmul dword [eax - 0x30]
faddp st(1)
fadd dword [esp + 0xb0]
fstp dword [eax - 0x1c]
fld dword [eax - 0x14]
fmul dword [esp + 0x48]
fld dword [eax - 0x10]
fmul dword [esp + 0x4c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x44]
faddp st(1)
fadd dword [esp + 0x50]
fstp dword [eax - 0xc]
fld dword [eax - 0x14]
fmul dword [esp + 0x58]
fld dword [eax - 0x10]
fmul dword [esp + 0x5c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x54]
faddp st(1)
fadd dword [esp + 0x60]
fstp dword [eax - 8]
fld dword [eax - 0x14]
fmul dword [esp + 0x68]
fld dword [eax - 0x10]
fmul dword [esp + 0x6c]
faddp st(1)
fld dword [eax - 0x18]
fmul dword [esp + 0x64]
faddp st(1)
fadd dword [esp + 0x70]
fstp dword [eax - 4]
jne 0x405b67
mov edx, dword [ebp + 4]
mov ecx, dword [0x466740]
mov esi, dword [ebp + 0xc]
mov eax, dword [0x4566b8]
add ecx, edx
push ebx
mov dword [0x466740], ecx
mov ebx, dword [ebp + 4]
mov edi, eax
add eax, ebx
mov dword [0x4566b8], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x40], eax
lea ebx, [edi + edi*2]
mov eax, 0xffffff88
mov dword [esp + 0x38], edi
shl ebx, 2
sub eax, esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], eax
mov al, byte [ebp + 0x50]
test al, al
jne 0x405cab
mov ecx, dword [esi + 0x18]
test byte [ecx + 0x4c], 2
je 0x405ccc
fld dword [esi + 0x14]
fmul dword [esp + 0x50]
fld dword [esi + 0x10]
fmul dword [esp + 0x4c]
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x48]
faddp st(1)
fadd dword [esp + 0x54]
fstp dword [esp + 0x10]
fld dword [esi + 0x10]
fmul dword [esp + 0x5c]
fld dword [esi + 0x14]
fmul dword [esp + 0x60]
test al, al
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x58]
faddp st(1)
fadd dword [esp + 0x64]
fstp dword [esp + 0x28]
fld dword [esi + 0x10]
fmul dword [esp + 0x6c]
fld dword [esi + 0x14]
fmul dword [esp + 0x70]
faddp st(1)
fld dword [esi + 0xc]
fmul dword [esp + 0x68]
faddp st(1)
fadd dword [esp + 0x74]
fstp dword [esp + 0x24]
je 0x405d3e
mov eax, dword [esi]
fld dword [eax + 0x14]
fmul dword [esp + 0x24]
fld dword [eax + 0x10]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [eax + 0xc]
fmul dword [esp + 0x10]
faddp st(1)
fcomp qword [0x449638]
fnstsw ax
test ah, 5
jp 0x4063e5
push esi
call fcn.00401b70
add esp, 4
test eax, eax
je 0x4063e5
cmp eax, 2
mov eax, dword [0x4566bc]
setne dl
mov byte [ebx + eax + 8], dl
mov ebx, dword [esi + 0x18]
mov dword [esp + 0x30], ebx
mov al, byte [ebx + 0x4c]
test al, 6
mov byte [esp + 0x1b], al
je 0x406004
fld dword [esi + 0x74]
test al, 2
je 0x405fd3
mov ecx, dword [0x4566c0]
xor ebp, ebp
test ecx, ecx
jbe 0x405fd3
mov ecx, dword [0x4566a0]
add ecx, 4
mov edx, dword [0x45668c]
fld dword [0x449530]
mov edi, dword [edx + ebp*4]
mov bl, byte [edi]
mov dl, bl
and dl, 4
je 0x405e43
mov eax, dword [esi]
fstp st(0)
fld dword [ecx - 4]
fsub dword [eax + 0xc]
fstp dword [esp + 0x14]
fld dword [ecx]
fsub dword [eax + 0x10]
fstp dword [esp + 0x20]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
fst dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fcom qword [0x449610]
fnstsw ax
and eax, 0x4100
jne 0x405e22
fsqrt
fdivr dword [0x44951c]
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x20]
fmul st(1)
fstp dword [esp + 0x20]
fmul dword [esp + 0x1c]
fstp dword [esp + 0x1c]
jmp 0x405e24
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x24]
fld dword [esp + 0x20]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x10]
faddp st(1)
fmul dword [edi + 0x10]
test bl, 2
je 0x405f75
mov eax, dword [esi]
fld dword [ecx - 4]
fsub dword [eax + 0xc]
test dl, dl
fstp dword [esp + 0x14]
fld dword [ecx]
fsub dword [eax + 0x10]
fstp dword [esp + 0x20]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
fstp dword [esp + 0x1c]
je 0x405f04
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x4495e8]
fsubr qword [0x449520]
fst dword [esp + 0x14]
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x405ec2
fld dword [esp + 0x14]
fld qword [0x449538]
fcompp
fnstsw ax
test ah, 5
jp 0x405ef5
fld dword [esp + 0x14]
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x405ee3
fld dword [esp + 0x14]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405f75
fld qword [0x449520]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405f75
fld qword [0x449538]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x405f75
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x4495e8]
fsubr qword [0x449520]
fld st(0)
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x405f51
fld st(0)
fld qword [0x449538]
fcompp
fnstsw ax
test ah, 5
jp 0x405f6a
fld st(0)
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jnp 0x405f72
fstp st(0)
fld qword [0x449520]
jmp 0x405f72
fstp st(0)
fld qword [0x449538]
fmul dword [edi + 0x10]
cmp bl, 1
jne 0x405f97
fstp st(0)
fld dword [ecx + 4]
fmul dword [esp + 0x24]
fld dword [ecx - 4]
fmul dword [esp + 0x10]
faddp st(1)
fld dword [ecx]
fmul dword [esp + 0x28]
faddp st(1)
fmul dword [edi + 0x10]
fcom qword [0x449538]
fnstsw ax
and eax, 0x4100
jne 0x405faa
faddp st(1)
jmp 0x405fbe
mov eax, dword [esp + 0x10c]
mov dl, byte [eax + 0x51]
test dl, dl
je 0x405fbc
fsubp st(1)
jmp 0x405fbe
fstp st(0)
mov eax, dword [0x4566c0]
inc ebp
add ecx, 0xc
cmp ebp, eax
jb 0x405d98
mov al, byte [esp + 0x1b]
mov ebx, dword [esp + 0x30]
test al, 4
je 0x405fff
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov eax, dword [esi]
fld dword [ecx + 0x14]
fadd dword [edx + 0x14]
fadd dword [eax + 0x14]
fld dword [ebx + 0x28]
fmul qword [0x4495c8]
fdivp st(1)
fsubr qword [0x449520]
faddp st(1)
fstp dword [esi + 0x70]
jmp 0x40600b
mov dword [esi + 0x70], 0
test byte [ebx + 0x4d], 2
je 0x4060a7
mov edi, dword [esi]
fld dword [edi + 0x24]
fmul qword [0x449630]
fadd qword [0x449630]
call fcn.0043c9b0
mov dword [esi + 0x58], eax
fld dword [edi + 0x28]
fmul qword [0x449630]
fsubr qword [0x449630]
call fcn.0043c9b0
mov edi, dword [esi + 4]
mov dword [esi + 0x64], eax
fld dword [edi + 0x24]
fmul qword [0x449630]
fadd qword [0x449630]
call fcn.0043c9b0
mov dword [esi + 0x5c], eax
fld dword [edi + 0x28]
fmul qword [0x449630]
fsubr qword [0x449630]
call fcn.0043c9b0
mov edi, dword [esi + 8]
mov dword [esi + 0x68], eax
fld dword [edi + 0x24]
fmul qword [0x449630]
fadd qword [0x449630]
call fcn.0043c9b0
mov dword [esi + 0x60], eax
fld dword [edi + 0x28]
fmul qword [0x449630]
fsubr qword [0x449630]
call fcn.0043c9b0
mov dword [esi + 0x6c], eax
test byte [ebx + 0x4c], 0x18
je 0x406394
lea ecx, [esi + 0x78]
mov dword [esp + 0x30], 3
mov dword [esp + 0x24], ecx
mov eax, dword [esi + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x44], eax
mov al, byte [eax + 0x4c]
fld dword [edx + 0xc]
test al, 8
mov byte [esp + 0x2f], al
je 0x40632f
mov ecx, dword [0x4566c0]
mov dword [esp + 0x28], 0
test ecx, ecx
jbe 0x40632f
mov ecx, dword [esp + 0x3c]
mov eax, edx
mov edx, dword [0x4566a0]
lea ebp, [eax + ecx]
lea ecx, [edx + 4]
mov edx, dword [esp + 0x28]
mov eax, dword [0x45668c]
fld dword [0x449530]
mov edi, dword [eax + edx*4]
mov bl, byte [edi]
and bl, 4
je 0x406197
mov edx, dword [esi + ebp]
fstp st(0)
fld dword [ecx - 4]
fsub dword [edx + 0xc]
fstp dword [esp + 0x10]
fld dword [ecx]
fsub dword [edx + 0x10]
fld dword [ecx + 4]
fsub dword [edx + 0x14]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fcom qword [0x449610]
fnstsw ax
and eax, 0x4100
jne 0x406175
fsqrt
fdivr dword [0x44951c]
fld dword [esp + 0x10]
fmul st(1)
fstp dword [esp + 0x10]
fld st(0)
fmulp st(3)
fmulp st(1)
jmp 0x406177
fstp st(0)
fld dword [edx + 0x2c]
fmul st(1)
fld dword [edx + 0x28]
fmul st(3)
faddp st(1)
fld dword [edx + 0x24]
fmul dword [esp + 0x10]
mov edx, dword [esp + 0x28]
faddp st(1)
fmul dword [edi + 0x10]
fstp st(2)
fstp st(0)
mov al, byte [edi]
test al, 2
mov byte [esp + 0x1b], al
je 0x4062cb
mov eax, dword [esi + ebp]
fld dword [ecx - 4]
fsub dword [eax + 0xc]
test bl, bl
fstp dword [esp + 0x10]
fld dword [ecx]
fsub dword [eax + 0x10]
fld dword [ecx + 4]
fsub dword [eax + 0x14]
je 0x406256
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x4495e8]
fsubr qword [0x449520]
fstp dword [esp + 0x10]
fstp st(0)
fstp st(0)
fld dword [esp + 0x10]
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x406214
fld dword [esp + 0x10]
fld qword [0x449538]
fcompp
fnstsw ax
test ah, 5
jp 0x406247
fld dword [esp + 0x10]
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x406235
fld dword [esp + 0x10]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x4062cb
fld qword [0x449520]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x4062cb
fld qword [0x449538]
fld dword [edi + 0x10]
fmulp st(2)
fmulp st(1)
jmp 0x4062cb
fstp st(0)
fstp st(0)
fstp st(0)
fld dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [esp + 0x20]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fdiv dword [edi + 0x14]
fmul qword [0x4495e8]
fsubr qword [0x449520]
fld st(0)
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jp 0x4062a7
fld st(0)
fld qword [0x449538]
fcompp
fnstsw ax
test ah, 5
jp 0x4062c0
fld st(0)
fcomp qword [0x449520]
fnstsw ax
test ah, 5
jnp 0x4062c8
fstp st(0)
fld qword [0x449520]
jmp 0x4062c8
fstp st(0)
fld qword [0x449538]
fmul dword [edi + 0x10]
cmp byte [esp + 0x1b], 1
jne 0x4062ef
mov eax, dword [esi + ebp]
fstp st(0)
fld dword [eax + 0x2c]
fmul dword [ecx + 4]
fld dword [eax + 0x24]
fmul dword [ecx - 4]
faddp st(1)
fld dword [eax + 0x28]
fmul dword [ecx]
faddp st(1)
fmul dword [edi + 0x10]
fcom qword [0x449538]
fnstsw ax
and eax, 0x4100
jne 0x406302
faddp st(1)
jmp 0x406316
mov eax, dword [esp + 0x10c]
mov bl, byte [eax + 0x51]
test bl, bl
je 0x406314
fsubp st(1)
jmp 0x406316
fstp st(0)
mov eax, dword [0x4566c0]
inc edx
add ecx, 0xc
cmp edx, eax
mov dword [esp + 0x28], edx
jb 0x406109
mov al, byte [esp + 0x2f]
test al, 0x10
je 0x40634c
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
mov edx, dword [ecx - 0x78]
fld dword [edx + 0x14]
fdiv dword [eax + 0x28]
fsubr qword [0x449520]
faddp st(1)
fcom dword [0x449530]
fnstsw ax
test ah, 5
jp 0x406361
fstp st(0)
fld dword [0x449530]
fcom qword [0x449520]
fnstsw ax
and eax, 0x4100
jne 0x406378
fstp st(0)
fld dword [0x44951c]
mov eax, dword [esp + 0x24]
fstp dword [eax]
add eax, 4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
jne 0x4060c0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov eax, dword [esi]
mov ebp, dword [esp + 0x10c]
fld dword [ecx + 0x14]
fadd dword [edx + 0x14]
mov ecx, dword [0x4566bc]
fadd dword [eax + 0x14]
mov eax, dword [esp + 0x34]
add eax, 0xc
mov dword [esp + 0x34], eax
fstp dword [eax + ecx - 0xc]
mov edx, dword [0x4566bc]
mov ebx, dword [esp + 0x34]
mov dword [eax + edx - 8], esi
mov edx, dword [esp + 0x38]
mov eax, dword [0x466744]
inc edx
inc eax
mov dword [esp + 0x38], edx
mov dword [0x466744], eax
mov edi, edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add esi, 0x90
sub ecx, 0x90
dec eax
mov dword [0x4566b8], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
jne 0x405c9b
pop ebx
pop edi
pop esi
pop ebp
add esp, 0xf8
ret