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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
push ebx
push esi
push edi
fldz
fst qword [esp + 0xa0]
xor eax, eax
mov word [esp + 0x10], ax
fst qword [esp + 0x88]
fst qword [esp + 0x80]
fst qword [esp + 0x38]
xor esi, esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x18], esi
fst qword [esp + 0x20]
mov dword [esp + 0x5c], esi
fst qword [esp + 0x80]
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
mov word [esp + 0xc], cx
fstp qword [esp + 0x50]
fldz
mov eax, 1
fstp dword [esp + 0x1c]
mov dword [esp + 0xac], eax
fld qword [esp + 0x50]
mov dword [esp + 0xa8], esi
fld dword [esp + 0x1c]
fsub qword [0x41f520]
lea edx, [esp + 0xa8]
fsubp st(1)
fstp qword [esp + 0x50]
fld dword [esp + 0x1c]
mov dword [esp + 0xb0], eax
fsub qword [0x41f340]
lea eax, [esp + 0xac]
push eax
mov dword [esp + 0xb8], edx
fstp dword [esp + 0x20]
push ebx
mov dword [0x423618], 0xa522bdf
call fcn.00401610
add esp, 8
test eax, eax
jne 0x406121
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00402980
mov edi, dword [ebp + 0x10]
push ebx
push edi
call fcn.00402020
add esp, 0x20
test eax, eax
jge 0x4061be
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x406172
push esi
push eax
call fcn.00403760
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x40618d
push edi
push eax
call fcn.004028c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
mov ax, word [esp + 0x10]
movsx ecx, ax
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fld dword [0x423544]
fadd qword [0x41f7c0]
fsubp st(1)
call fcn.0040aeb0
mov word [esp + 0x10], ax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x2c]
push edi
push edx
call fcn.004028c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
movzx eax, word [0x425870]
lea ecx, [esp + 0x44]
add eax, 0x54cae030
push ebx
push ecx
mov word [0x425870], ax
call fcn.004028c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
fld qword [esp + 0xa0]
mov eax, 1
fadd qword [0x41f340]
fstp qword [esp + 0xa0]
fld qword [esp + 0xa0]
fsub qword [0x41f7b8]
fmul qword [0x423548]
mov dword [esp + 0x44], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x74]
fstp qword [0x423548]
mov edx, dword [edi + 4]
add edx, 2
push edx
push eax
call fcn.004026d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.00403760
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
lea edx, [esp + 0x64]
push 2
push edx
call fcn.004026d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
lea eax, [esp + 0x94]
push 3
push eax
call fcn.004026d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
lea edx, [esp + 0x44]
push edx
fstp dword [0x4235ec]
call fcn.00401ec0
add esp, 4
and eax, 0x8000001f
jns 0x4062d0
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x406361
fld qword [str.2A_n]
mov edi, 0x1f
fadd qword [esp + 0x20]
sub edi, eax
lea eax, [esp + 0x2c]
push edi
fadd dword [0x423b04]
push eax
mov dword [esp + 0x30], edi
fstp dword [0x423b04]
call fcn.004042e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
fld qword [0x423a68]
mov ecx, dword [esp + 0x5c]
fadd qword [0x41f7b0]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
faddp st(1)
call fcn.0040aeb0
mov dword [esp + 0x5c], eax
fld qword [0x423a68]
fsub qword [0x41f340]
lea edx, [esp + 0x44]
push edi
push edx
fstp qword [0x423a68]
call fcn.004042e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
jmp 0x406369
mov dword [esp + 0x28], 0
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x48]
dec eax
dec edi
mov dword [esp + 0x60], edi
sub edi, eax
mov ebx, edi
mov dword [esp + 0x1c], eax
shl ebx, 5
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.004042e0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.00401610
add esp, 0x10
test eax, eax
jl 0x4063ee
mov eax, dword [esp + 0x7c]
inc dword [eax + edi*4]
fld qword [0x425e10]
fld qword [esp + 0x20]
lea eax, [esp + 0x44]
fsub qword [esp + 0x20]
push eax
lea ecx, [esp + 0x30]
push ecx
fsub qword [0x41f7a8]
mov edx, ecx
push edx
fsubp st(1)
fstp qword [0x425e10]
call fcn.00404530
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00401610
add esp, 0x14
test eax, eax
jge 0x4063a3
lea edx, [esp + 0x44]
push ebx
push edx
call fcn.00401ba0
mov ax, word [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x1c], ecx
add esp, 8
fild dword [esp + 0x14]
fsub qword [esp + 0x38]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmulp st(1)
call fcn.0040aeb0
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x60]
inc dword [esp + 0xc]
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jle 0x40693d
lea eax, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], ebx
jmp 0x406455
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
lea ecx, [ecx + edx*4]
mov edx, dword [esp + 0x4c]
mov edi, dword [edx + esi*4]
mov dword [esp + 0x60], ecx
cmp dword [ecx], edi
jb 0x40648b
mov ecx, dword [esp + 0x7c]
or edi, 0xffffffff
mov dword [eax + ecx - 4], edi
mov ecx, dword [esp + 0x7c]
inc dword [eax + ecx - 4]
jmp 0x406674
fld qword [esp + 0xa0]
fsub qword [0x41f7a0]
fsub qword [0x41f798]
fadd qword [esp + 0x88]
fstp qword [esp + 0x88]
fld qword [esp + 0x20]
fld qword [esp + 0x80]
fsub qword [0x424718]
fsub qword [0x41f790]
fcompp
fnstsw ax
fld qword [0x424718]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x424718]
test ah, 5
jp 0x406506
dec dword [0x425cfc]
mov edx, dword [0x425cfc]
add edx, 0x185745bf
mov dword [esp + 0x70], edx
fild dword [esp + 0x70]
fmul qword [esp + 0x88]
fstp qword [esp + 0x88]
fld qword [0x425dc8]
xor edx, edx
fadd qword [0x41f788]
mov ebx, edi
shr ebx, 0x10
fmul qword [esp + 0x20]
mov esi, dword [ecx]
mov eax, esi
div ebx
fstp qword [esp + 0x20]
mov edx, dword [esp + 0x60]
mov ecx, eax
imul eax, ebx
sub esi, eax
movzx eax, word [edx - 2]
add dword [esp + 0x5c], 0xa8377342
shl esi, 0x10
fld qword [0x425db8]
or esi, eax
fsub st(1)
movzx eax, di
fstp qword [0x425db8]
mov edx, ecx
fld qword [0x425db8]
imul edx, eax
fcomp qword [0x41f780]
fnstsw ax
mov dword [esp + 0x70], edx
test ah, 1
jne 0x406580
mov eax, dword [0x42361c]
imul eax, eax, 0x631bb0f5
mov dword [0x42361c], eax
cmp esi, edx
jae 0x4065ed
fld qword [0x425d08]
dec ecx
fsub dword [0x4247e0]
mov dword [esp + 0x90], ecx
add esi, edi
fstp qword [0x425d08]
fld qword [0x423a80]
mov cx, word [0x4235d0]
fsub qword [0x41f778]
movsx edx, cx
mov dword [esp + 0x50], edx
fild dword [esp + 0x50]
faddp st(1)
call fcn.0040aeb0
mov word [0x4235d0], ax
cmp esi, edi
jb 0x4065e2
cmp esi, dword [esp + 0x70]
jae 0x4065e2
dec dword [esp + 0x90]
add esi, edi
cmp esi, edi
jae 0x4065cf
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x90]
sub esi, edx
fsubr qword [esp + 0x38]
xor edx, edx
mov eax, esi
div ebx
mov edx, eax
imul edx, ebx
sub esi, edx
mov edx, dword [esp + 0x60]
movzx edx, word [edx - 4]
fstp qword [esp + 0x38]
fld qword [esp + 0x38]
shl esi, 0x10
fsub qword [0x41f770]
or esi, edx
movzx ebx, di
fsub qword [0x41f768]
mov edx, eax
imul edx, ebx
fadd qword [0x424748]
fstp qword [0x424748]
cmp esi, edx
jae 0x40664b
add esi, edi
dec eax
cmp esi, edi
jb 0x40664b
cmp esi, edx
jae 0x40664b
add esi, edi
dec eax
cmp esi, edi
jae 0x406640
mov edx, dword [esp + 0xc]
shl ecx, 0x10
or ecx, eax
mov eax, dword [esp + 0x7c]
mov dword [edx + eax - 4], ecx
mov ecx, dword [esp + 0x7c]
mov eax, edx
or edi, 0xffffffff
inc dword [eax + ecx - 4]
jmp 0x406674
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x7c]
add dword [eax + ecx - 4], edi
lea eax, [esp + 0x64]
push 0
push eax
call fcn.00403760
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
mov ecx, dword [esp + 0x1c]
cmp ecx, 1
jl 0x4066a6
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x6c]
mov dword [edx], eax
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x6c]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x68]
push eax
mov ecx, eax
push ecx
call fcn.00405c70
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a2a
fld qword [esp + 0x20]
push eax
fsub qword [0x41f760]
lea edx, [esp + 0x98]
push edx
fmul dword [0x4257f4]
fstp dword [0x4257f4]
fld qword [esp + 0x28]
fsub qword [0x41f340]
fstp qword [esp + 0x28]
call fcn.00403760
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
mov eax, dword [esp + 0x18]
cmp eax, 2
jge 0x40672d
xor ecx, ecx
jmp 0x406735
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0x9c]
mov dword [edx], ecx
jge 0x406747
xor ecx, ecx
jmp 0x40674f
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x9c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x9c]
lea ecx, [esp + 0x94]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x68]
push edx
call fcn.00401610
add esp, 8
test eax, eax
jg 0x406670
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0xc]
mov ecx, dword [edi + eax - 4]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x6c]
push eax
call fcn.00405c70
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a2a
fld qword [esp + 0x80]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x80]
fld qword [esp + 0x88]
fadd st(1)
fstp qword [esp + 0x88]
fld qword [esp + 0x80]
fadd qword [0x41f758]
fld qword [esp + 0x88]
fadd qword [0x41f750]
fadd qword [0x423138]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x40683c
fld dword [0x425d9c]
fcomp qword [0x41f748]
fnstsw ax
test ah, 5
jp 0x40683c
fld dword [0x425bc0]
fld qword [esp + 0x38]
fsubp st(1)
fsubr qword [esp + 0x20]
fstp qword [esp + 0x20]
fld qword [esp + 0x38]
fadd st(1)
fstp qword [esp + 0x38]
fsubr dword [0x425bc0]
fstp dword [0x425bc0]
jmp 0x40683e
fstp st(0)
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x64]
push ebx
push ecx
call fcn.004042e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, eax
push ecx
call fcn.00404530
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a2a
fld qword [esp + 0x80]
mov dx, word [esp + 0x10]
fsub qword [0x41f740]
movsx eax, dx
mov dword [esp + 0x50], eax
fild dword [esp + 0x50]
faddp st(1)
call fcn.0040aeb0
lea ecx, [esp + 0x2c]
push esi
push ecx
mov word [esp + 0x18], ax
call fcn.00403910
add esp, 8
test eax, eax
jge 0x40691c
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x68]
push eax
call fcn.004028c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
lea ecx, [esp + 0x64]
push ebx
push ecx
call fcn.004042e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x406a2a
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, eax
push ecx
call fcn.00403e60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406a2a
mov eax, dword [esp + 0x7c]
fld qword [0x41f738]
dec dword [edi + eax - 4]
fstp qword [esp + 0x80]
mov eax, dword [esp + 0x18]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], edi
jg 0x406451
mov edi, dword [ebp + 8]
test edi, edi
je 0x4069be
fld qword [esp + 0x20]
fcomp qword [0x41f730]
fnstsw ax
fld qword [esp + 0x20]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x20]
test ah, 0x41
jp 0x406997
fsubr qword [esp + 0x38]
fstp qword [esp + 0x38]
fld qword [esp + 0x38]
mov edx, dword [0x4258b8]
fsub qword [0x41f728]
mov dword [esp + 0x50], edx
fadd qword [0x41f720]
fild dword [esp + 0x50]
fmulp st(1)
call fcn.0040aeb0
mov dword [0x4258b8], eax
jmp 0x4069a3
fstp st(0)
fld qword [0x41f718]
fstp qword [esp + 0x38]
lea eax, [esp + 0x74]
push eax
push edi
call fcn.004028c0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0x14]
add esp, 8
imul edx, dword [eax]
mov dword [edi], edx
mov ecx, dword [0x423ac4]
mov edx, dword [0x423524]
inc dword [0x423ac4]
mov eax, 0x76cb9709
sub eax, ecx
cmp edx, eax
jle 0x4069ed
fld dword [0x423ad0]
fsub qword [0x41f710]
fstp dword [0x423ad0]
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x406a2a
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00401ba0
lea edx, [esp + 0x34]
push edx
push edi
call fcn.004028c0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push 0
push edi
mov dword [edi], ecx
call fcn.00403910
add esp, 0x18
test eax, eax
jne 0x406a2a
mov dword [edi], 1
push 0
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x40]
push eax
call fcn.00403b70
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret