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

Disassembly:
sub esp, 0x364
fldz
push ebx
fst qword [esp + 0x34]
push ebp
fldz
xor ebp, ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0xc], ebp
fst dword [esp + 0x10]
fxch st(1)
xor eax, eax
fstp qword [esp + 0x2c]
mov ecx, 0x609d
push esi
mov esi, dword [esp + 0x380]
fst dword [esp + 0x24]
mov word [esp + 0x38], ax
mov dword [esp + 0x2c], ebp
fst dword [esp + 0x1c]
mov word [0x42360c], cx
lea ecx, [esp + 0x64]
xor edx, edx
push ecx
mov ebx, 1
lea eax, [esp + 0x64]
mov word [esp + 0x1c], dx
fstp dword [esp + 0x18]
push esi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], eax
call fcn.00402310
add esp, 8
test eax, eax
jl 0x4067fa
mov edx, dword [esi + 8]
test byte [edx], bl
je 0x4067fa
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fsub qword [esp + 0x30]
call fcn.0040b5d0
mov dword [esp + 0x2c], eax
fld qword [esp + 0x30]
fsub qword [0x41f340]
lea ecx, [esp + 0x28]
push esi
push ecx
fstp qword [esp + 0x38]
call fcn.00401b70
fld dword [0x4230d0]
mov edx, dword [0x424b28]
mov dword [esp + 0x14], edx
fisub dword [esp + 0x14]
push ebp
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x60]
push ecx
fsub qword [0x41f728]
fadd dword [esp + 0x38]
fstp dword [esp + 0x38]
call fcn.004011f0
push 0x300
lea edx, [esp + 0x88]
push ebp
push edx
call fcn.0040b710
fld dword [esp + 0x44]
fld1
add esp, 0x20
fsub st(1), st(0)
fxch st(1)
fstp dword [esp + 0x24]
mov eax, dword [esp + 0x10]
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fadd qword [esp + 0x3c]
fld dword [esp + 0x24]
fadd qword [0x41f720]
fadd qword [0x4244e0]
fcompp
fnstsw ax
fld qword [0x4244e0]
fadd st(1)
fstp qword [0x4244e0]
fadd qword [esp + 0x3c]
fstp qword [esp + 0x3c]
test ah, 0x41
jne 0x405fd3
mov ecx, dword [esp + 0x2c]
add ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x37c]
push edx
call fcn.00401740
fld dword [esp + 0x20]
add esp, 4
fstp qword [esp + 0x30]
cmp eax, 0x29f
jle 0x405ffc
mov dword [esp + 0x20], 6
jmp 0x40602c
cmp eax, 0xef
jle 0x40600d
mov dword [esp + 0x20], 5
jmp 0x40602c
cmp eax, 0x4f
jle 0x40601c
mov dword [esp + 0x20], 4
jmp 0x40602c
xor ecx, ecx
cmp eax, 0x17
setg cl
lea ecx, [ecx + ecx + 1]
mov dword [esp + 0x20], ecx
fld qword [esp + 0x30]
push edi
fld qword [0x4230c8]
mov edi, dword [esi + 4]
fadd qword [0x41f718]
add edi, ebx
mov ebx, dword [esp + 0x378]
push edi
fsubp st(1)
push ebx
fstp qword [esp + 0x3c]
call fcn.004019b0
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x40676f
lea edx, [esp + 0x80]
push edi
push edx
call fcn.004019b0
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x40676f
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
lea ecx, [edi + edi]
push ecx
lea edx, [esp + 0x4c]
fadd qword [esp + 0x44]
push edx
fstp qword [esp + 0x48]
call fcn.004019b0
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebp
jne 0x40676f
mov ebp, dword [esp + 0x388]
test ebp, ebp
je 0x4060de
cmp dword [ebp + 8], 0
je 0x4060de
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], edx
jmp 0x4061af
mov ax, word [0x424450]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fstp dword [esp + 0x10]
fld dword [0x425388]
fadd dword [esp + 0x10]
call fcn.0040b5d0
lea edx, [esp + 0x54]
push 1
push edx
mov word [0x424450], ax
call fcn.00401af0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x406776
mov eax, dword [esi + 4]
shl eax, 6
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.00403390
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x406776
lea edx, [esp + 0x54]
push esi
push edx
mov eax, edx
push eax
call fcn.00405d10
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x406776
test ebp, ebp
je 0x406179
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [ebp], ecx
mov dword [ebp + 4], edx
mov dword [ebp + 8], eax
dec dword [esp + 0x3c]
fld qword [esp + 0x34]
mov cx, word [esp + 0x3c]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fsubp st(1)
fsub qword [0x41f710]
fadd qword [esp + 0x34]
fstp qword [esp + 0x34]
fld qword [esp + 0x34]
fadd qword [0x41f340]
fstp qword [esp + 0x34]
mov ax, word [0x424990]
mov edx, dword [esp + 0x14]
movsx ecx, ax
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fld dword [0x4242a4]
inc word [0x424990]
fsubp st(2)
fcompp
fnstsw ax
test ah, 0x41
jp 0x4061f1
mov eax, dword [0x4244c8]
sub dword [0x424348], eax
jmp 0x40623b
fld qword [0x425088]
fsub qword [0x41f340]
fstp qword [0x425088]
fld qword [0x425088]
mov cx, word [0x42310c]
mov eax, dword [esp + 0x30]
movsx edx, cx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
mov dword [esp + 0x10], eax
fsubp st(1)
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040b5d0
mov dword [esp + 0x30], eax
dec word [0x42310c]
mov edi, dword [esp + 0x37c]
push esi
push edi
call fcn.00402310
add esp, 8
test eax, eax
jl 0x406264
push esi
lea ecx, [esp + 0x84]
push edi
push ecx
call fcn.00405d10
add esp, 0xc
jmp 0x406275
lea edx, [esp + 0x80]
push edi
push edx
call fcn.00402f10
add esp, 8
mov edi, dword [esp + 0x2c]
lea eax, [esp + 0x48]
push eax
push edi
push esi
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x90]
push edx
call fcn.00403210
lea eax, [esp + 0x68]
push eax
push ebx
call fcn.00402f10
add esp, 0x1c
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x406776
lea ecx, [esp + 0x48]
push ecx
push edi
push esi
push ebx
call fcn.004045e0
fld qword [0x424448]
add esp, 0x10
call fcn.0040b5d0
mov ebx, dword [esp + 0x24]
cmp ebx, 1
mov word [0x4249d4], ax
jle 0x40644f
mov edx, dword [esi + 4]
dec ebx
mov ecx, ebx
mov ebp, 1
shl ebp, cl
inc edx
push edx
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x78]
push edi
call fcn.004019b0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40676f
fld qword [0x423118]
lea eax, [esp + 0x80]
fmul qword [0x41f708]
push eax
push edi
fstp qword [0x423118]
call fcn.00402f10
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40676f
test ebx, ebx
jle 0x40635a
lea esp, [esp]
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x48]
push ecx
push edx
push esi
push edi
push edi
call fcn.00403210
add esp, 0x14
sub ebx, 1
jne 0x406340
mov ecx, dword [esp + 0x24]
mov ebx, 1
shl ebx, cl
inc ebp
cmp ebp, ebx
jge 0x4063f9
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x74]
jmp 0x406380
mov eax, dword [0x423104]
imul eax, eax, 0x55c3ae4f
mov dword [0x423104], eax
mov ecx, dword [esi + 4]
inc ecx
push ecx
push edi
call fcn.004019b0
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40676f
fld dword [0x4235c0]
lea edx, [edi - 0xc]
fadd qword [0x41f700]
push edx
push edi
fstp dword [0x4235c0]
call fcn.00402f10
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40676f
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x48]
push eax
push ecx
push esi
lea edx, [esp + 0x8c]
push edx
push edi
call fcn.00403210
inc ebp
add esp, 0x14
add edi, 0xc
cmp ebp, ebx
jl 0x406380
fld dword [0x42447c]
fadd qword [0x41f340]
fstp dword [0x42447c]
fld dword [0x42447c]
mov eax, dword [0x424b30]
fsub qword [0x41f6f8]
mov dword [esp + 0x10], eax
fisub dword [esp + 0x10]
fcomp qword [0x41f6f0]
fnstsw ax
test ah, 5
jp 0x40644f
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fadd dword [0x425070]
fmul qword [0x4244f0]
fstp qword [0x4244f0]
mov edx, dword [esp + 0x380]
fld dword [esp + 0x20]
mov eax, dword [edx + 4]
fsub qword [0x41f6e8]
xor ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
xor edi, edi
fstp dword [esp + 0x20]
xor ebp, ebp
cmp dword [esp + 0x14], 0
jne 0x4064b6
mov eax, dword [esp + 0x10]
mov ecx, eax
dec eax
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x40662d
mov dx, word [0x425390]
movsx eax, dx
add eax, 0x29ac60e0
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
mov dword [esp + 0x14], 0x20
fmul dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [0x425380]
mov edx, dword [esp + 0x380]
mov eax, dword [edx + 8]
fsub qword [0x41f340]
mov edx, dword [esp + 0x10]
mov edx, dword [eax + edx*4]
mov ecx, dword [esp + 0x14]
fstp dword [0x425380]
fld dword [0x425380]
mov eax, dword [0x4249d0]
fsub qword [0x41f6e0]
mov dword [esp + 0x18], eax
dec ecx
shr edx, cl
fisub dword [esp + 0x18]
mov dword [esp + 0x14], ecx
and edx, 1
fcomp qword [0x41f6d8]
fnstsw ax
test ah, 0x41
jne 0x406525
inc dword [esp + 0x30]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
test edx, edx
jne 0x406571
test ebx, ebx
je 0x406475
cmp ebx, 1
jne 0x406571
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x48]
push edx
push eax
mov eax, dword [esp + 0x380]
push esi
push eax
push eax
call fcn.00403210
mov cx, word [0x42448c]
movsx edx, cx
mov dword [esp + 0x2c], edx
add esp, 0x14
fild dword [esp + 0x18]
fadd qword [esp + 0x40]
fstp qword [esp + 0x40]
jmp 0x406475
mov eax, dword [esp + 0x24]
inc edi
mov ecx, eax
sub ecx, edi
shl edx, cl
mov ebx, 2
or ebp, edx
cmp edi, eax
jne 0x406475
mov edi, dword [esp + 0x2c]
mov ebx, eax
test ebx, ebx
jle 0x4065bd
jmp 0x4065a0
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x37c]
push edi
push esi
push eax
push eax
call fcn.00403210
add esp, 0x14
sub ebx, 1
jne 0x4065a0
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x37c]
push edi
lea edx, [ebp + ebp*2]
push esi
lea eax, [esp + edx*4 + 0x80]
push eax
push ecx
call fcn.00403210
fld qword [esp + 0x54]
fsub qword [esp + 0x48]
mov ebx, 1
add esp, 0x14
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
add word [0x42449c], bx
mov dx, word [0x42449c]
movsx eax, dx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fsub dword [esp + 0x20]
fsub qword [0x41f6d0]
fstp dword [0x424a78]
fld dword [esp + 0x20]
fadd qword [0x41f340]
jmp 0x40646d
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x2c]
mov eax, 1
rol eax, cl
mov dword [esp + 0x14], eax
test edi, edi
jle 0x406758
mov dword [esp + 0x10], edi
lea esp, [esp]
mov edi, dword [esp + 0x378]
lea ecx, [esp + 0x48]
push ecx
push ebx
push esi
push edi
push edi
call fcn.00403210
mov dx, word [esp + 0x50]
movsx eax, dx
mov dword [esp + 0x2c], eax
add esp, 0x14
add ebp, ebp
fild dword [esp + 0x18]
fsub qword [esp + 0x40]
fsub qword [0x424a58]
mov ecx, dword [esp + 0x60]
dec dword [esp + 0x60]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fcompp
fnstsw ax
test ah, 0x41
jne 0x4066f8
fld qword [esp + 0x34]
fsubr qword [0x41f6c8]
fld qword [0x4250b8]
fcompp
fnstsw ax
fld qword [esp + 0x34]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [esp + 0x34]
test ah, 5
jp 0x406727
fld dword [esp + 0x20]
fadd qword [0x4244c0]
fsub qword [0x41f6c0]
fadd qword [0x4230f0]
fstp qword [0x4230f0]
fld qword [0x4244c0]
fsub st(1)
fstp qword [0x4244c0]
fsubr dword [esp + 0x20]
fstp dword [esp + 0x20]
jmp 0x406729
mov dx, word [0x4250cc]
mov cx, word [0x424208]
movsx eax, dx
movsx edx, cx
add eax, 0x952c7691
cmp eax, edx
jl 0x406729
movzx eax, word [esp + 0x3c]
imul eax, eax, 0x83125fdc
mov word [esp + 0x3c], ax
jmp 0x406729
fstp st(0)
mov ebx, dword [esp + 0x2c]
test dword [esp + 0x14], ebp
je 0x40674b
lea ecx, [esp + 0x48]
push ecx
push ebx
push esi
lea edx, [esp + 0x8c]
push edx
push edi
call fcn.00403210
add esp, 0x14
sub dword [esp + 0x10], 1
jne 0x406650
jmp 0x40675f
mov edi, dword [esp + 0x378]
lea eax, [esp + 0x48]
push eax
push ebx
push esi
push edi
call fcn.004045e0
add esp, 0x10
mov ebp, dword [esp + 0x388]
mov esi, dword [esp + 0x24]
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
mov edx, 1
mov ecx, esi
shl edx, cl
cmp eax, edx
jge 0x4067b3
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x74]
mov edi, edx
lea esp, [esp]
push 0
push esi
call fcn.00401420
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x4067a0
pop edi
push 0
lea ecx, [esp + 0x48]
lea edx, [esp + 0x80]
test ebp, ebp
je 0x4067dd
push ecx
push edx
call fcn.00401420
mov eax, dword [esp + 0x24]
add esp, 0xc
pop esi
pop ebp
pop ebx
add esp, 0x364
ret
lea eax, [esp + 0x54]
push eax
push ecx
push edx
call fcn.00401420
mov eax, dword [esp + 0x28]
add esp, 0x10
pop esi
pop ebp
pop ebx
add esp, 0x364
ret
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x364
ret