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

Disassembly:
sub esp, 0xb4
fldz
xor eax, eax
mov word [esp + 0x1c], ax
xor ecx, ecx
mov word [esp + 0x48], cx
fst dword [esp + 0x34]
fst dword [esp + 0x6c]
push ebx
fldz
xor edx, edx
fst qword [esp + 0x80]
push ebp
fxch st(1)
xor ebp, ebp
fst dword [esp + 0x14]
mov ebx, dword [esp + 0xcc]
mov word [esp + 0x10], dx
mov dword [esp + 8], ebp
fstp dword [esp + 0x18]
mov dword [esp + 0x6c], ebp
mov dword [esp + 0xc], ebp
movzx eax, word [esp + 0x24]
mov word [0x4250a0], ax
mov eax, 1
fstp qword [esp + 0x1c]
mov word [esp + 0x10], cx
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
movzx eax, word [esp + 0x10]
movzx ecx, word [esp + 0x10]
imul eax, ecx
lea edx, [esp + 0x8c]
mov dword [esp + 0xa0], edx
lea edx, [esp + 0x98]
mov dword [esp + 0x8c], ebp
push edx
mov word [esp + 0x14], ax
dec dword [esp + 0x14]
push ebx
call fcn.00401870
add esp, 8
test eax, eax
jne 0x406092
lea eax, [ebp - 0xc]
pop ebp
pop ebx
add esp, 0xb4
ret
push esi
push edi
push ebp
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x4c]
push ecx
call fcn.004014d0
mov dx, word [0x42458c]
movsx eax, dx
mov dword [esp + 0x4c], eax
fild dword [esp + 0x4c]
fld qword [0x425928]
fsub qword [0x41f8a0]
fsubp st(1)
call fcn.0040aec0
mov edi, dword [esp + 0xe8]
push ebx
push edi
mov word [0x42458c], ax
call fcn.00401530
add esp, 0x20
test eax, eax
jge 0x406141
mov eax, dword [esp + 0xc8]
cmp eax, ebp
je 0x406115
push ebp
push eax
call fcn.00402000
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
mov eax, dword [esp + 0xcc]
cmp eax, ebp
je 0x406134
push edi
push eax
call fcn.00401be0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb4
ret
lea ecx, [esp + 0x38]
push edi
push ecx
mov dword [0x4252f0], 0x15989961
call fcn.00401be0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x48]
mov dword [esp + 0x10], edx
dec dword [esp + 0x10]
push ebx
push eax
call fcn.00401be0
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
fld dword [0x425b58]
mov eax, 1
fsub qword [0x41f350]
mov dword [esp + 0x48], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x68]
fstp dword [0x425b58]
fld dword [0x425b58]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], ecx
fild dword [esp + 0x34]
fsubp st(1)
fsubr dword [esp + 0x1c]
mov edx, dword [edi + 4]
add edx, 2
push edx
push eax
fstp dword [esp + 0x24]
call fcn.00401a60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
lea ecx, [esp + 0x68]
push ebp
push ecx
call fcn.00402000
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
lea edx, [esp + 0x5c]
push 2
push edx
call fcn.00401a60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
lea eax, [esp + 0x80]
push 3
push eax
call fcn.00401a60
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
lea ecx, [esp + 0x48]
push ecx
call fcn.00401b20
add esp, 4
and eax, 0x8000001f
jns 0x406246
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x406288
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x38]
push edi
push edx
mov dword [esp + 0x3c], edi
call fcn.00402b10
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
lea eax, [esp + 0x48]
push edi
push eax
call fcn.00402b10
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x406a26
jmp 0x40628c
mov dword [esp + 0x34], ebp
mov ebx, dword [esp + 0x3c]
mov cx, word [esp + 0x58]
mov eax, dword [esp + 0x4c]
movsx edx, cx
dec ebx
dec eax
mov edi, ebx
sub edi, eax
mov ecx, 0x28c5f905
sub ecx, edx
add ecx, dword [esp + 0x10]
mov ebp, edi
shl ebp, 5
lea edx, [esp + 0x48]
push ebp
mov dword [esp + 0x14], ecx
dec dword [esp + 0x5c]
push edx
mov dword [esp + 0x5c], eax
call fcn.00402b10
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401870
add esp, 0x10
test eax, eax
jl 0x406324
nop
mov eax, dword [esp + 0x70]
inc dword [eax + edi*4]
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push ecx
call fcn.00404bd0
fld dword [0x425230]
fadd dword [esp + 0x88]
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x48]
fmul dword [esp + 0x2c]
push eax
fstp dword [esp + 0x30]
call fcn.00401870
add esp, 0x14
test eax, eax
jge 0x4062e0
fld dword [esp + 0x20]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x20]
mov cx, word [esp + 0x2c]
movsx edx, cx
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fsub dword [esp + 0x20]
fadd qword [0x41f898]
fcomp qword [0x41f890]
fnstsw ax
test ah, 0x44
jnp 0x4063a0
mov ax, word [esp + 0x2c]
movsx ecx, ax
mov dword [esp + 0x30], ecx
fild dword [esp + 0x30]
fsub dword [esp + 0x1c]
fadd qword [0x425928]
mov dx, word [0x425eac]
movsx eax, dx
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmulp st(1)
call fcn.0040aec0
mov word [0x425eac], ax
fadd qword [0x425928]
fstp qword [0x425928]
jmp 0x4063a2
fstp st(0)
lea ecx, [esp + 0x48]
push ebp
push ecx
call fcn.00401720
add esp, 8
cmp ebx, dword [esp + 0x54]
mov dword [esp + 0x78], ebx
jle 0x406930
add edi, edi
add edi, edi
add ebp, 0xffffffe0
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], ebp
lea ecx, [ecx]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
lea ebp, [edx + ebx*4]
mov edx, dword [ebp]
cmp edx, dword [eax + ecx*4]
lea eax, [eax + ecx*4]
jb 0x4063fa
mov eax, dword [esp + 0x70]
or ebp, 0xffffffff
mov dword [edi + eax - 4], ebp
jmp 0x40658a
fld dword [esp + 0x44]
mov esi, dword [eax]
fsub qword [0x41f888]
fstp dword [esp + 0x44]
inc dword [0x425840]
mov ecx, dword [0x425840]
mov dword [esp + 0x24], ecx
fild dword [esp + 0x24]
fsub dword [esp + 0x44]
fld dword [esp + 0x1c]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x24], edx
fisub dword [esp + 0x24]
fucompp
fnstsw ax
fld dword [esp + 0x44]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x44]
test ah, 0x44
jp 0x406482
fld dword [0x425848]
fadd qword [0x41f880]
fcomp qword [0x41f878]
fnstsw ax
fld dword [0x425848]
fadd st(1)
fstp dword [0x425848]
test ah, 5
jp 0x406482
fld qword [0x4259b8]
fsub qword [0x41f870]
fstp qword [0x4259b8]
mov ecx, dword [ebp]
mov eax, ecx
xor edx, edx
mov edi, esi
shr edi, 0x10
div edi
movzx edx, word [ebp - 2]
mov ebx, eax
imul eax, edi
sub ecx, eax
shl ecx, 0x10
or ecx, edx
movzx edx, si
mov eax, ebx
imul eax, edx
cmp ecx, eax
jae 0x4064ea
mov edx, dword [esp + 0x14]
add edx, 0x64d31818
dec ebx
add ecx, esi
cmp edx, 0x11bdb72
je 0x4064db
fld dword [0x425ee0]
fld qword [0x4250f8]
fadd qword [0x41f868]
fsubp st(1)
fstp dword [0x425ee0]
cmp ecx, esi
jb 0x4064ea
cmp ecx, eax
jae 0x4064ea
add ecx, esi
dec ebx
cmp ecx, esi
jae 0x4064df
sub ecx, eax
fld qword [esp + 0x8c]
mov eax, ecx
fsub st(1)
xor edx, edx
div edi
mov edx, eax
imul eax, edi
sub ecx, eax
movzx eax, word [ebp - 4]
fstp qword [esp + 0x8c]
fld qword [0x423110]
shl ecx, 0x10
fsubr qword [0x41f860]
or ecx, eax
fld qword [esp + 0x8c]
movzx eax, si
fld dword [0x42590c]
faddp st(2)
mov edi, edx
imul edi, eax
fcompp
fnstsw ax
fsubr dword [0x42590c]
fstp dword [0x42590c]
test ah, 0x41
jp 0x40655a
movzx eax, word [esp + 0x2c]
imul eax, eax, 0x52524725
mov word [esp + 0x2c], ax
cmp ecx, edi
jae 0x406570
add ecx, esi
dec edx
cmp ecx, esi
jb 0x406570
cmp ecx, edi
jae 0x406570
add ecx, esi
dec edx
cmp ecx, esi
jae 0x406565
mov ecx, dword [esp + 0x70]
shl ebx, 0x10
or ebx, edx
mov edx, dword [esp + 0x18]
mov dword [edx + ecx - 4], ebx
mov ebx, dword [esp + 0x78]
mov edi, edx
or ebp, 0xffffffff
mov eax, dword [esp + 0x70]
inc dword [edi + eax - 4]
fld dword [0x425ac8]
mov ax, word [esp + 0x2c]
movsx ecx, ax
sub ecx, 0x77adeb7b
mov dword [esp + 0x24], ecx
lea edx, [esp + 0x5c]
push 0
fisub dword [esp + 0x28]
push edx
fstp dword [0x425ac8]
add dword [esp + 0x34], ebp
mov eax, dword [esp + 0x78]
add dword [edi + eax - 4], ebp
call fcn.00402000
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a24
mov esi, dword [esp + 0x54]
cmp esi, 1
jl 0x4065ea
mov eax, dword [esp + 0x50]
mov eax, dword [eax + esi*4 - 4]
mov ecx, dword [esp + 0x64]
mov dword [ecx], eax
mov dx, word [0x425980]
movsx eax, dx
sub eax, 0x4f9074e3
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fld dword [0x42318c]
fld dword [esp + 0x7c]
inc word [0x425980]
fadd qword [0x41f858]
faddp st(1)
fcompp
fnstsw ax
test ah, 1
jne 0x406650
fld dword [esp + 0x44]
mov ecx, dword [esp + 0x10]
fsub qword [0x41f850]
mov dword [esp + 0x24], ecx
fsub qword [0x41f848]
fild dword [esp + 0x24]
faddp st(1)
call fcn.0040aec0
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x50]
mov eax, dword [edx + esi*4]
mov ecx, dword [esp + 0x64]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x70]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x60]
push ecx
mov edx, ecx
push edx
call fcn.004047f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a24
push eax
lea eax, [esp + 0x84]
push eax
call fcn.00402000
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a24
cmp ebx, 2
jl 0x4066a9
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + ebx*4 - 8]
cmp ebx, 1
mov edx, dword [esp + 0x88]
mov dword [edx], eax
mov ax, word [0x424340]
movzx ecx, word [0x425314]
cwde
lea edx, [ecx + eax - 0x4be0bd62]
mov word [0x425314], dx
jge 0x4066d7
xor eax, eax
jmp 0x4066df
mov eax, dword [esp + 0x40]
mov eax, dword [eax + ebx*4 - 4]
mov ecx, dword [esp + 0x88]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x40]
mov eax, dword [edx + ebx*4]
mov ecx, dword [esp + 0x88]
mov dword [ecx + 8], eax
add dword [esp + 0x10], 0xc20dacee
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x60]
push eax
call fcn.00401870
add esp, 8
test eax, eax
jg 0x406592
fld dword [0x425870]
lea eax, [esp + 0x48]
fld qword [0x425130]
mov ecx, dword [esp + 0x70]
fsubr qword [0x41f840]
fsub qword [0x41f838]
fsubp st(1)
fstp dword [0x425870]
mov edx, dword [edi + ecx - 4]
push edx
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.004047f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a24
mov ebp, dword [esp + 0x30]
lea edx, [esp + 0x5c]
push ebp
push edx
call fcn.00402b10
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a24
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov edx, ecx
push edx
call fcn.00404bd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a24
fld dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
movzx ecx, word [0x42432c]
mov dword [esp + 0x24], eax
movsx edx, cx
fisub dword [esp + 0x24]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
faddp st(1)
call fcn.0040aec0
fldz
mov word [0x42432c], ax
xor ecx, ecx
or eax, 0xffffffff
add dword [esp + 0x10], eax
fstp qword [esp + 0x24]
mov word [esp + 0x20], cx
mov dword [esp + 0x98], ecx
mov ecx, 1
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], ecx
movzx ecx, word [esp + 0x20]
lea edx, [esp + 0x98]
mov dword [esp + 0xb4], edx
movzx edx, word [esp + 0x20]
imul ecx, edx
mov word [esp + 0x20], cx
add dword [esp + 0x20], eax
lea eax, [esp + 0xac]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00401870
add esp, 8
test eax, eax
jge 0x406903
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x60]
push eax
call fcn.00401be0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a24
lea ecx, [esp + 0x5c]
push ebp
push ecx
call fcn.00402b10
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a24
fld dword [esp + 0x1c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x1c]
fadd qword [0x425258]
fstp qword [0x425258]
fld qword [0x4250e0]
fld dword [esp + 0x1c]
fsub qword [0x425258]
fsub qword [0x41f830]
fcompp
fnstsw ax
test ah, 1
jne 0x4068c4
mov edx, dword [0x425ea8]
mov dword [esp + 0x24], edx
fild dword [esp + 0x24]
fmul dword [0x4250a4]
fstp dword [0x4250a4]
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov edx, ecx
push edx
call fcn.00404dd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a24
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fadd qword [0x423138]
mov eax, dword [esp + 0x70]
fstp qword [0x423138]
dec dword [edi + eax - 4]
movzx ecx, word [esp + 0x58]
add ecx, 0x3ae4fd92
dec ebx
sub ebp, 0x20
sub edi, 4
cmp ebx, dword [esp + 0x54]
mov word [esp + 0x18], cx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], edi
jg 0x4063d0
mov edi, dword [esp + 0xc8]
test edi, edi
je 0x40695e
lea edx, [esp + 0x68]
push edx
push edi
call fcn.00401be0
mov eax, dword [esp + 0xd8]
mov ecx, dword [eax]
mov edx, dword [esp + 0xdc]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
mov edi, dword [esp + 0xcc]
test edi, edi
je 0x406a24
mov eax, dword [esp + 0x14]
mov dword [esp + 0x74], eax
fild dword [esp + 0x74]
fmul dword [0x425864]
call fcn.0040aec0
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
fld dword [0x425864]
fadd qword [0x41f350]
push ecx
lea edx, [esp + 0x3c]
push edx
fstp dword [0x425864]
call fcn.00401720
lea eax, [esp + 0x40]
push eax
push edi
call fcn.00401be0
fldz
mov ecx, dword [esp + 0xe0]
mov edx, dword [ecx]
mov dword [edi], edx
fstp qword [esp + 0x9c]
xor eax, eax
mov word [esp + 0x24], ax
movzx edx, word [esp + 0x24]
mov dword [esp + 0xac], eax
movzx eax, word [esp + 0x24]
imul edx, eax
lea ecx, [esp + 0xac]
mov dword [esp + 0xd0], ecx
mov ebx, 1
lea ecx, [esp + 0xc8]
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xcc], ebx
push ecx
mov word [esp + 0x28], dx
dec dword [esp + 0x28]
push edi
call fcn.00401870
add esp, 0x18
test eax, eax
jne 0x406a24
mov dword [edi], ebx
xor ebp, ebp
push ebp
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.004025e0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xb4
ret