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

Disassembly:
sub esp, 0x358
fldz
xor eax, eax
mov word [esp + 0x2c], ax
xor ecx, ecx
mov word [esp + 0x24], cx
xor edx, edx
mov word [esp + 4], dx
fst dword [esp + 0x20]
fstp dword [esp]
push esi
fldz
mov esi, dword [esp + 0x36c]
mov word [esp + 0x10], ax
mov dword [esp + 0x2c], eax
fst qword [esp + 0x4c]
push edx
fstp qword [esp + 0x58]
push esi
call fcn.004028f0
add esp, 8
test eax, eax
jl 0x4065a8
mov ecx, dword [esi + 8]
test byte [ecx], 1
je 0x4065a8
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.00401c40
push 0
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401b90
mov edx, dword [esp + 0x40]
imul edx, edx, 0xec8cf57b
push 0x300
lea eax, [esp + 0x74]
push 0
push eax
mov dword [esp + 0x4c], edx
call fcn.0040af10
mov ecx, dword [esp + 0x388]
push ecx
call fcn.00402160
add esp, 0x24
cmp eax, 0x29f
jle 0x405e39
mov dword [esp + 0x20], 6
jmp 0x405e69
cmp eax, 0xef
jle 0x405e4a
mov dword [esp + 0x20], 5
jmp 0x405e69
cmp eax, 0x4f
jle 0x405e59
mov dword [esp + 0x20], 4
jmp 0x405e69
xor edx, edx
cmp eax, 0x17
setg dl
lea edx, [edx + edx + 1]
mov dword [esp + 0x20], edx
fld qword [esp + 0x54]
mov eax, dword [0x424dd8]
push ebx
push ebp
mov ebp, dword [esp + 0x368]
add eax, 0x6b86f78a
push edi
mov edi, dword [esi + 4]
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
inc edi
push edi
push ebp
fsubp st(1)
fstp qword [esp + 0x68]
call fcn.004012c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
lea ecx, [esp + 0x74]
push edi
push ecx
call fcn.004012c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
lea edx, [edi + edi]
push edx
lea eax, [esp + 0x50]
push eax
call fcn.004012c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
mov ebx, dword [esp + 0x37c]
test ebx, ebx
je 0x405f09
cmp dword [ebx + 8], eax
je 0x405f09
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
jmp 0x405fd9
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
lea edx, [esp + 0x40]
fld qword [esp + 0x58]
push 1
fadd qword [0x41f7b0]
push edx
fsubp st(1)
fadd dword [esp + 0x18]
fstp dword [esp + 0x18]
dec dword [esp + 0x40]
fldz
fst qword [esp + 0x28]
fstp qword [esp + 0x28]
call fcn.004012c0
mov edi, eax
add esp, 8
test edi, edi
jne 0x405f78
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
lea ecx, [eax*4]
push ecx
push edi
push edx
call fcn.0040af10
mov eax, dword [esp + 0x54]
mov dword [eax], 1
add esp, 0xc
mov dword [esp + 0x40], 1
mov dword [esp + 0x18], edi
test edi, edi
jne 0x4064f9
mov ecx, dword [esi + 4]
shl ecx, 6
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00403000
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f9
lea eax, [esp + 0x40]
push esi
push eax
mov ecx, eax
push ecx
call fcn.00405a00
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f9
test ebx, ebx
je 0x405fd9
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [ebx], edx
mov dword [ebx + 4], eax
mov dword [ebx + 8], ecx
mov edi, dword [esp + 0x370]
push esi
push edi
call fcn.00401980
add esp, 8
test eax, eax
jl 0x405fff
push esi
lea edx, [esp + 0x78]
push edi
push edx
call fcn.00405a00
add esp, 0xc
jmp 0x40600d
lea eax, [esp + 0x74]
push edi
push eax
call fcn.004025f0
add esp, 8
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x4c]
push ecx
push edx
push esi
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.00404340
fld dword [esp + 0x24]
fsub qword [0x41f7a8]
add esp, 0x14
fsub qword [0x41f7a0]
fcomp qword [0x41f798]
fnstsw ax
test ah, 0x44
jp 0x406068
mov dx, word [esp + 0x14]
movsx eax, dx
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fsub dword [esp + 0x10]
call fcn.0040b420
mov word [esp + 0x14], ax
lea ecx, [esp + 0x40]
push ecx
push ebp
call fcn.004025f0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f9
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x4c]
push edx
push eax
push esi
push ebp
call fcn.00404680
mov ebx, dword [esp + 0x3c]
add esp, 0x10
cmp ebx, 1
jle 0x406205
dec ebx
mov ecx, ebx
mov ebp, 1
shl ebp, cl
mov cx, word [0x423bd0]
movsx edx, cx
mov eax, 0x3ccb0a22
sub eax, edx
cmp eax, 0x5c141f57
jge 0x4060dd
mov cx, word [esp + 0x34]
movsx edx, cx
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fstp dword [esp + 0x10]
inc dword [esp + 0x34]
mov eax, dword [esi + 4]
inc eax
lea edi, [ebp + ebp*2]
push eax
lea edi, [esp + edi*4 + 0x6c]
push edi
call fcn.004012c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
lea ecx, [esp + 0x74]
push ecx
push edi
call fcn.004025f0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
mov dx, word [0x425254]
movsx eax, dx
mov dword [esp + 0x20], eax
fild dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x30]
fsubr dword [esp + 0x20]
call fcn.0040b420
mov word [0x425254], ax
test ebx, ebx
jle 0x406160
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x4c]
push ecx
push edx
push esi
push edi
push edi
call fcn.00404340
add esp, 0x14
sub ebx, 1
jne 0x406146
mov ecx, dword [esp + 0x2c]
mov ebx, 1
shl ebx, cl
inc ebp
cmp ebp, ebx
jge 0x406205
lea edi, [ebp + ebp*2]
lea edi, [esp + edi*4 + 0x68]
lea esp, [esp]
fld dword [0x425e68]
fsub qword [0x423ce8]
fsub dword [esp + 0x30]
fadd dword [0x424164]
fstp dword [0x424164]
fld dword [esp + 0x30]
mov eax, dword [esi + 4]
fadd qword [0x41f358]
inc eax
push eax
push edi
fstp dword [esp + 0x38]
call fcn.004012c0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
lea ecx, [edi - 0xc]
push ecx
push edi
call fcn.004025f0
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4064f2
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x4c]
push edx
push eax
push esi
lea ecx, [esp + 0x80]
push ecx
push edi
call fcn.00404340
inc ebp
add esp, 0x14
add edi, 0xc
cmp ebp, ebx
jl 0x406180
mov edx, dword [esp + 0x374]
mov eax, dword [edx + 4]
dec dword [esp + 0x14]
fld qword [esp + 0x60]
movzx ecx, word [esp + 0x34]
fsub qword [0x41f790]
mov dword [esp + 0x20], eax
movsx edx, cx
movzx ecx, word [esp + 0x14]
mov eax, 0x89ff7a5f
sub eax, edx
movsx edx, cx
sub eax, edx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fucompp
fnstsw ax
fld qword [esp + 0x60]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [esp + 0x60]
test ah, 0x44
jnp 0x406274
mov eax, dword [0x4242fc]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd dword [0x425fb0]
fmul dword [esp + 0x30]
fstp dword [esp + 0x30]
mov cx, word [esp + 0x1c]
movsx edx, cx
mov dword [esp + 0x14], edx
xor ebx, ebx
mov dword [esp + 0x10], ebx
fild dword [esp + 0x14]
xor edi, edi
xor ebp, ebp
fadd dword [esp + 0x30]
call fcn.0040b420
mov word [esp + 0x1c], ax
fsubr dword [esp + 0x30]
fstp dword [esp + 0x30]
fld dword [0x424164]
fsub qword [0x41f788]
fadd qword [0x41f780]
call fcn.0040b420
cmp dword [esp + 0x10], 0
mov word [esp + 0x34], ax
jne 0x4062e2
mov eax, dword [esp + 0x20]
mov ecx, eax
dec eax
mov dword [esp + 0x20], eax
test ecx, ecx
je 0x406478
mov dword [esp + 0x10], 0x20
fld qword [esp + 0x58]
mov edx, dword [esp + 0x374]
fsubr qword [0x41f778]
mov ecx, dword [esp + 0x10]
dec ecx
mov dword [esp + 0x10], ecx
fstp dword [0x424e00]
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x20]
mov eax, dword [eax + edx*4]
shr eax, cl
and eax, 1
jne 0x406351
test ebx, ebx
je 0x4062a4
cmp ebx, 1
jne 0x406351
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x370]
push ecx
push esi
push eax
push eax
call fcn.00404340
movzx edx, word [0x4251e0]
add esp, 0x14
add edx, 0x7deb4fc8
mov word [0x4251e0], dx
jmp 0x4062a4
mov edx, dword [esp + 0x2c]
inc edi
mov ecx, edx
sub ecx, edi
shl eax, cl
mov ebx, 2
or ebp, eax
cmp edi, edx
jne 0x4062a4
mov ax, word [esp + 0x3c]
movsx ecx, ax
mov edx, 0xcf51c9c6
sub edx, ecx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fld qword [esp + 0x58]
fsub qword [0x41f770]
fcompp
fnstsw ax
fld qword [esp + 0x58]
fadd qword [0x41f358]
fstp qword [esp + 0x58]
inc dword [esp + 0x3c]
test ah, 5
jp 0x4063b1
add dword [0x425f00], 0x92e01867
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
test ebx, ebx
jle 0x4063dd
lea ecx, [ecx]
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x370]
push edi
push esi
push eax
push eax
call fcn.00404340
add esp, 0x14
sub ebx, 1
jne 0x4063c0
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x370]
push edi
lea edx, [ebp + ebp*2]
push esi
lea eax, [esp + edx*4 + 0x74]
push eax
push ecx
call fcn.00404340
mov edx, dword [str.6M]
sub edx, 0x6e78ffd8
mov word [esp + 0x30], dx
mov eax, dword [esp + 0x4c]
mov ecx, dword [0x425e74]
add eax, 0x24d2ca0b
add ecx, 0x710fba12
add esp, 0x14
xor edi, edi
cmp eax, ecx
mov ebx, 1
jl 0x406440
movzx edx, word [esp + 0x1c]
add edx, 0x6784277d
mov word [esp + 0x1c], dx
jmp 0x40644a
mov eax, 0xffff9ed3
mov word [esp + 0x14], ax
mov cx, word [str.Mt6xYX6z___r]
movsx edx, cx
sub edx, 0x63c80071
mov dword [esp + 0x14], edx
xor ebp, ebp
fild dword [esp + 0x14]
fadd qword [esp + 0x58]
fstp qword [esp + 0x58]
inc word [str.Mt6xYX6z___r]
jmp 0x4062a4
mov ecx, dword [esp + 0x2c]
mov ebx, 1
rol ebx, cl
test edi, edi
jle 0x4064d7
mov dword [esp + 0x20], edi
jmp 0x406490
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x36c]
lea eax, [esp + 0x4c]
push eax
push ecx
push esi
push edi
push edi
call fcn.00404340
add ebp, ebp
add esp, 0x14
test ebp, ebx
je 0x4064ce
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x4c]
push edx
push eax
push esi
lea ecx, [esp + 0x80]
push ecx
push edi
call fcn.00404340
add esp, 0x14
sub dword [esp + 0x20], 1
jne 0x406490
jmp 0x4064de
mov edi, dword [esp + 0x36c]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x4c]
push edx
push eax
push esi
push edi
call fcn.00404680
add esp, 0x10
mov ebx, 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 0x406533
lea esi, [eax + eax*2]
sub edx, eax
lea esi, [esp + esi*4 + 0x68]
mov edi, edx
nop
push 0
push esi
call fcn.004011f0
add esp, 8
add esi, 0xc
sub edi, 1
jne 0x406520
pop edi
pop ebp
test ebx, ebx
pop ebx
push 0
lea ecx, [esp + 0x44]
lea edx, [esp + 0x6c]
je 0x406550
push ecx
push edx
call fcn.004011f0
add esp, 0xc
jmp 0x40655f
lea eax, [esp + 0x38]
push eax
push ecx
push edx
call fcn.004011f0
add esp, 0x10
inc word [0x424f1c]
movzx eax, word [0x424f1c]
mov cx, word [esp + 0x28]
cwde
movsx edx, cx
sub edx, eax
movzx eax, word [0x425e44]
movsx ecx, ax
add edx, ecx
cmp edx, 0xd9f5ce04
jge 0x40659c
movzx edx, word [esp + 0x30]
imul edx, edx, 0xa03f8ad2
mov word [esp + 0x30], dx
mov eax, dword [esp + 0xc]
pop esi
add esp, 0x358
ret
mov eax, 0xfffffffc
pop esi
add esp, 0x358
ret