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

Disassembly:
sub esp, 0x358
fldz
xor eax, eax
fst dword [esp + 0x18]
xor ecx, ecx
fldz
mov word [esp + 8], ax
mov word [esp + 0x2c], cx
fst qword [esp + 0xc]
fst qword [esp + 0xc]
push ebx
fxch st(1)
push ebp
fst dword [esp + 8]
xor ebp, ebp
fst dword [esp + 0x1c]
xor edx, edx
fxch st(1)
mov dword [esp + 0x50], ebp
mov dword [esp + 0x30], ebp
mov word [esp + 0xc], dx
fstp qword [esp + 0x14]
mov ebx, 1
mov dword [esp + 0x54], ebx
fstp dword [esp + 0x2c]
push esi
fld qword [esp + 0x18]
mov esi, dword [esp + 0x374]
fld dword [esp + 0x30]
lea ecx, [esp + 0x58]
fsub qword [0x41f520]
lea eax, [esp + 0x54]
push ecx
push esi
fsubp st(1)
fstp qword [esp + 0x20]
fld dword [esp + 0x38]
mov dword [esp + 0x64], ebx
fsub qword [0x41f340]
mov dword [esp + 0x68], eax
fstp dword [esp + 0x38]
mov dword [0x423618], 0xa522bdf
call fcn.00401610
add esp, 8
test eax, eax
jl 0x4077f7
mov edx, dword [esi + 8]
test byte [edx], bl
je 0x4077f7
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.00402660
push ebp
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00402980
push 0x300
lea eax, [esp + 0x7c]
push ebp
push eax
call fcn.0040b4d0
fld dword [0x424744]
fadd qword [0x41f340]
mov ecx, dword [esp + 0x390]
push ecx
fstp dword [0x424744]
fld dword [0x424744]
fsubr qword [0x41f808]
fadd dword [0x423ad4]
fstp dword [0x423ad4]
call fcn.00401ec0
add esp, 0x24
cmp eax, 0x29f
jle 0x4070db
mov dword [esp + 0x28], 6
jmp 0x40710b
cmp eax, 0xef
jle 0x4070ec
mov dword [esp + 0x28], 5
jmp 0x40710b
cmp eax, 0x4f
jle 0x4070fb
mov dword [esp + 0x28], 4
jmp 0x40710b
xor edx, edx
cmp eax, 0x17
setg dl
lea edx, [edx + edx + 1]
mov dword [esp + 0x28], edx
mov eax, dword [0x42583c]
mov ecx, 0x698533bc
sub ecx, eax
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
push edi
fld dword [0x4235a8]
fsubp st(1)
fsubr dword [esp + 0x28]
fstp dword [esp + 0x28]
add dword [0x42583c], ebx
mov edi, dword [esi + 4]
add edi, ebx
mov ebx, dword [esp + 0x36c]
push edi
push ebx
call fcn.004026d0
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407770
fld dword [0x42586c]
mov edx, dword [0x4257f0]
sub edx, 0x5ebd8646
mov dword [esp + 0x1c], edx
fisub dword [esp + 0x1c]
lea eax, [esp + 0x74]
push edi
push eax
fstp dword [0x42586c]
call fcn.004026d0
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407770
fld dword [0x4257dc]
lea ecx, [edi + edi]
fsub qword [0x425d08]
push ecx
lea edx, [esp + 0x50]
push edx
fsub qword [0x41f800]
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
call fcn.004026d0
add esp, 8
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x407770
mov ebp, dword [esp + 0x37c]
test ebp, ebp
je 0x4071f1
cmp dword [ebp + 8], 0
je 0x4071f1
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
jmp 0x407262
lea eax, [esp + 0x40]
push 1
push eax
call fcn.00403760
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407777
mov ecx, dword [esi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.004042e0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407777
lea eax, [esp + 0x40]
push esi
push eax
mov ecx, eax
push ecx
call fcn.00406cd0
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407777
test ebp, ebp
je 0x407262
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [ebp], edx
mov dword [ebp + 4], eax
mov dword [ebp + 8], ecx
mov edi, dword [esp + 0x370]
push esi
push edi
call fcn.00401610
add esp, 8
test eax, eax
jl 0x407288
push esi
lea edx, [esp + 0x78]
push edi
push edx
call fcn.00406cd0
add esp, 0xc
jmp 0x407296
lea eax, [esp + 0x74]
push edi
push eax
call fcn.004028c0
add esp, 8
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x4c]
push ecx
push edi
push esi
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x84]
push eax
call fcn.00403070
lea ecx, [esp + 0x54]
push ecx
push ebx
call fcn.004028c0
add esp, 0x1c
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407777
lea edx, [esp + 0x4c]
push edx
push edi
push esi
push ebx
call fcn.00403880
mov ebx, dword [esp + 0x3c]
add esp, 0x10
cmp ebx, 1
jle 0x40740f
mov eax, dword [esi + 4]
dec ebx
mov ecx, ebx
mov ebp, 1
shl ebp, cl
inc eax
push eax
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x6c]
push edi
call fcn.004026d0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407770
lea ecx, [esp + 0x74]
push ecx
push edi
call fcn.004028c0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407770
mov edx, dword [0x4234c0]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fld qword [0x425d30]
fsub qword [0x41f7f8]
fsubp st(1)
call fcn.0040aeb0
mov dword [0x4234c0], eax
test ebx, ebx
jle 0x40737a
lea ebx, [ebx]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x4c]
push eax
push ecx
push esi
push edi
push edi
call fcn.00403070
add esp, 0x14
sub ebx, 1
jne 0x407360
mov ecx, dword [esp + 0x2c]
mov ebx, 1
shl ebx, cl
inc ebp
cmp ebp, ebx
jge 0x40740f
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x68]
mov edx, dword [esi + 4]
inc edx
push edx
push edi
call fcn.004026d0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407770
lea eax, [edi - 0xc]
push eax
push edi
call fcn.004028c0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x407770
dec word [0x425868]
mov cx, word [0x425868]
movsx edx, cx
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x4c]
push eax
fild dword [esp + 0x20]
lea edx, [esp + 0x78]
fadd qword [0x425b60]
mov ecx, dword [esp + 0x34]
push ecx
push esi
push edx
fstp qword [0x425b60]
push edi
call fcn.00403070
inc ebp
add esp, 0x14
add edi, 0xc
cmp ebp, ebx
jl 0x407396
fld dword [esp + 0x28]
mov eax, dword [esp + 0x374]
fsub qword [0x41f7f0]
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ecx, 0xf6ecf84d
fstp dword [esp + 0x28]
mov dx, word [esp + 0x18]
movsx eax, dx
sub ecx, eax
add ecx, dword [0x42472c]
or eax, 0xffffffff
mov dword [esp + 0x18], ecx
xor ebx, ebx
xor ebp, ebp
fild dword [esp + 0x18]
xor edi, edi
mov dword [esp + 0x34], ebx
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
add dword [esp + 0x38], eax
mov edx, dword [0x423a3c]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fsub dword [0x425d9c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], ecx
fisub dword [esp + 0x18]
fadd dword [esp + 0x10]
fstp dword [esp + 0x10]
add dword [0x423a3c], eax
nop
cmp dword [esp + 0x34], 0
jne 0x4074b2
mov eax, dword [esp + 0x1c]
mov edx, eax
dec eax
mov dword [esp + 0x1c], eax
test edx, edx
je 0x4076c0
mov dword [esp + 0x34], 0x20
inc word [0x4247fc]
mov ax, word [0x4247fc]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x374]
cwde
sub eax, ecx
mov ecx, dword [esp + 0x34]
sub eax, 0x3e5db43e
mov word [0x425870], ax
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x1c]
fld dword [esp + 0x10]
mov eax, dword [eax + edx*4]
dec ecx
shr eax, cl
mov dword [esp + 0x34], ecx
mov cx, word [0x42312c]
movsx edx, cx
mov dword [esp + 0x10], edx
and eax, 1
fild dword [esp + 0x10]
fsubp st(1)
fstp dword [esp + 0x10]
dec word [0x42312c]
test eax, eax
jne 0x407565
test ebx, ebx
je 0x407490
cmp ebx, 1
jne 0x407565
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x370]
push ecx
push esi
push eax
push eax
call fcn.00403070
fld dword [esp + 0x3c]
fsub dword [0x423134]
add esp, 0x14
fstp dword [esp + 0x28]
fld dword [0x423134]
fsub qword [0x41f340]
fstp dword [0x423134]
jmp 0x407490
fld dword [esp + 0x10]
mov edx, dword [0x425bc4]
fsub qword [0x41f7e8]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x2c]
inc ebp
fiadd dword [esp + 0x18]
mov ecx, edx
sub ecx, ebp
shl eax, cl
mov ebx, 2
or edi, eax
fmul dword [esp + 0x24]
fstp dword [esp + 0x24]
inc dword [0x425bc4]
cmp ebp, edx
jne 0x407490
fld dword [esp + 0x24]
mov ebx, edx
fadd qword [0x41f340]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fadd qword [0x41f7e0]
fadd dword [esp + 0x10]
mov ebp, dword [esp + 0x30]
fstp dword [esp + 0x10]
test ebx, ebx
jle 0x4075ed
nop
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x370]
push ebp
push esi
push eax
push eax
call fcn.00403070
add esp, 0x14
sub ebx, 1
jne 0x4075d0
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x370]
push ebp
lea edx, [edi + edi*2]
push esi
lea eax, [esp + edx*4 + 0x74]
push eax
push ecx
call fcn.00403070
mov ebx, 1
add word [0x425d5c], bx
mov dx, word [0x425d5c]
mov cx, word [0x425868]
movsx eax, dx
movsx edx, cx
lea eax, [edx + eax - 0x7d10f996]
mov edx, dword [0x42583c]
mov ecx, 0xffffffff
add dword [0x42583c], ecx
add edx, 0x48cb5e50
add esp, 0x14
cmp eax, edx
je 0x4076a7
mov eax, dword [0x4258cc]
mov dx, word [esp + 0x3c]
movsx edx, dx
add eax, 0x47bdab3c
cmp eax, edx
jl 0x4076b7
fld dword [esp + 0x28]
mov ax, word [esp + 0x3c]
fsub qword [0x41f7d8]
movsx edx, ax
mov dword [esp + 0x18], edx
xor ebp, ebp
fild dword [esp + 0x18]
faddp st(1)
fadd dword [0x4257cc]
fstp dword [0x4257cc]
add dword [esp + 0x3c], ecx
fld dword [esp + 0x28]
xor edi, edi
fsub qword [0x41f340]
fstp dword [esp + 0x28]
jmp 0x407490
mov eax, dword [0x4258d8]
mov ecx, dword [esp + 0x38]
imul eax, ecx
mov dword [esp + 0x38], eax
xor ebp, ebp
xor edi, edi
jmp 0x407490
mov ecx, dword [esp + 0x2c]
mov ebx, 1
rol ebx, cl
test ebp, ebp
jle 0x407735
mov dword [esp + 0x1c], ebp
jmp 0x4076e0
mov eax, dword [esp + 0x30]
mov ebp, dword [esp + 0x36c]
lea edx, [esp + 0x4c]
push edx
push eax
push esi
push ebp
push ebp
call fcn.00403070
add edi, edi
add esp, 0x14
test edi, ebx
je 0x40771e
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x4c]
push ecx
push edx
push esi
lea eax, [esp + 0x80]
push eax
push ebp
call fcn.00403070
add esp, 0x14
sub dword [esp + 0x1c], 1
fld dword [esp + 0x24]
fsub qword [0x41f7d0]
fstp dword [esp + 0x24]
jne 0x4076e0
jmp 0x40773c
mov ebp, dword [esp + 0x36c]
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x4c]
push ecx
push edx
push esi
push ebp
call fcn.00403880
inc dword [0x423528]
fld dword [esp + 0x20]
mov eax, dword [0x423528]
add esp, 0x10
sub eax, 0xc824b36
mov dword [esp + 0x1c], eax
fisub dword [esp + 0x1c]
fstp dword [esp + 0x10]
mov ebp, dword [esp + 0x37c]
mov esi, dword [esp + 0x2c]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x4077b3
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x68]
mov edi, edx
lea ecx, [ecx]
push 0
push esi
call fcn.00403b70
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x4077a0
pop edi
push 0
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x74]
test ebp, ebp
je 0x4077da
push ecx
push edx
call fcn.00403b70
mov eax, dword [esp + 0x1c]
add esp, 0xc
pop esi
pop ebp
pop ebx
add esp, 0x358
ret
lea eax, [esp + 0x40]
push eax
push ecx
push edx
call fcn.00403b70
mov eax, dword [esp + 0x20]
add esp, 0x10
pop esi
pop ebp
pop ebx
add esp, 0x358
ret
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x358
ret