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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xec
fldz
push ebx
fst qword [esp + 0x98]
xor eax, eax
fldz
push esi
fst dword [esp + 0x34]
xor esi, esi
fst dword [esp + 0xbc]
push edi
fxch st(1)
mov word [esp + 0x74], ax
fst qword [esp + 0xb0]
mov dword [esp + 0x10], esi
mov dword [esp + 0xbc], esi
fst qword [esp + 0x78]
fxch st(1)
fstp dword [esp + 0xc]
fst qword [esp + 0x90]
fst qword [esp + 0xc8]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x58], ecx
fild dword [esp + 0x58]
fadd qword [esp + 0x78]
call fcn.0040b140
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
fld qword [esp + 0x78]
fadd qword [0x41f358]
mov eax, 1
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
fstp qword [esp + 0x78]
lea eax, [esp + 0xd4]
push eax
lea edx, [esp + 0xc8]
fstp qword [esp + 0x5c]
mov dword [esp + 0xc8], esi
push edi
mov dword [esp + 0xcc], esi
mov dword [esp + 0xe4], edx
call fcn.00401970
add esp, 8
test eax, eax
jne 0x404b76
lea eax, [esi - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004013b0
fld qword [esp + 0xb8]
fld dword [esp + 0xd8]
mov ebx, dword [ebp + 0x10]
fadd qword [0x41f680]
push edi
push ebx
fadd qword [0x41f678]
fsubp st(1)
fstp qword [esp + 0xc0]
call fcn.00402660
add esp, 0x20
test eax, eax
jge 0x404c6d
mov edi, dword [ebp + 8]
cmp edi, esi
je 0x404c23
fldz
push 1
fstp dword [esp + 0x5c]
push edi
fldz
fstp qword [esp + 0xb8]
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
add eax, eax
add eax, eax
push eax
push esi
push ecx
call fcn.0040b0c0
mov edx, dword [edi + 8]
add esp, 0xc
mov dword [edx], esi
mov dword [edi], 1
test esi, esi
jne 0x405512
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x404c3e
push ebx
push eax
call fcn.00401e50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
fld dword [esp + 0xc]
xor eax, eax
fsub qword [0x41f670]
fmul qword [esp + 0xc8]
fstp qword [esp + 0xc8]
fld dword [esp + 0xc]
fadd qword [0x41f358]
fstp dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00401e50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
lea ecx, [esp + 0x40]
push edi
push ecx
call fcn.00401e50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
fld qword [0x424950]
mov edi, 1
fmul qword [0x41f668]
mov dword [esp + 0x40], edi
mov dword [esp + 0x14], edi
lea eax, [esp + 0x4c]
fstp qword [0x424950]
mov edx, dword [ebx + 4]
add edx, 2
push edx
push eax
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
add dword [esp + 0x10], edi
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x10]
lea eax, [edx + ecx - 0x7a4c0054]
mov dword [esp + 0x58], eax
fild dword [esp + 0x58]
lea ecx, [esp + 0x4c]
push edi
push ecx
fadd dword [0x423734]
fstp dword [0x423734]
fldz
fstp dword [esp + 0x60]
fldz
fstp qword [esp + 0x60]
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040b0c0
mov edx, dword [esp + 0x60]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x4c], edi
test esi, esi
jne 0x405512
lea eax, [esp + 0x2c]
push 2
push eax
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
fld qword [esp + 0x90]
lea ecx, [esp + 0x84]
fadd qword [0x41f358]
push 3
push ecx
fstp qword [esp + 0x98]
fld qword [esp + 0x98]
fadd qword [0x41f660]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
lea edx, [esp + 0x40]
push edx
call fcn.004016f0
add esp, 4
and eax, 0x8000001f
jns 0x404dc8
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x404e0a
mov edi, 0x1f
sub edi, eax
lea eax, [esp + 0x14]
push edi
push eax
mov dword [esp + 0x60], edi
call fcn.00402010
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
lea ecx, [esp + 0x40]
push edi
push ecx
call fcn.00402010
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
jmp 0x404e12
mov dword [esp + 0x58], 0
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
dec edi
dec eax
mov dword [esp + 0x60], edi
sub edi, eax
mov ebx, edi
shl ebx, 5
lea edx, [esp + 0x40]
push ebx
push edx
mov dword [esp + 0x78], eax
call fcn.00402010
fld qword [0x424928]
fmul qword [0x41f658]
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x20]
push ecx
fstp qword [0x424928]
call fcn.00401970
add esp, 0x10
test eax, eax
jl 0x404e8f
mov edi, edi
mov eax, dword [esp + 0x54]
inc dword [eax + edi*4]
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x18]
push eax
mov ecx, eax
push ecx
call fcn.004047a0
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00401970
add esp, 0x14
test eax, eax
jge 0x404e60
fld qword [0x4236d0]
lea ecx, [esp + 0x40]
fld dword [esp + 0xc]
push ebx
fadd qword [0x41f650]
push ecx
fsub qword [0x423c50]
fsubp st(1)
fstp qword [0x4236d0]
fld qword [0x423c50]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x423c50]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
call fcn.00401520
mov eax, dword [esp + 0x68]
add esp, 8
cmp eax, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
jle 0x40545e
lea ecx, [edi*4]
add ebx, 0xffffffe0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x60], ebx
jmp 0x404f04
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x70]
lea esi, [edx + eax*4]
mov edx, dword [esp + 0x48]
mov eax, dword [esi]
mov edi, dword [edx + edi*4]
mov dword [esp + 0x20], esi
cmp eax, edi
jb 0x404f34
mov eax, dword [esp + 0x54]
or ebx, 0xffffffff
mov dword [ecx + eax - 4], ebx
jmp 0x405034
xor edx, edx
fld dword [esp + 0x38]
mov ebx, edi
fld dword [esp + 0x38]
shr ebx, 0x10
fsub qword [0x41f648]
div ebx
fsubp st(1)
fstp dword [esp + 0x38]
mov esi, dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x20]
mov edx, ecx
imul edx, ebx
sub esi, edx
movzx edx, word [eax - 2]
shl esi, 0x10
or esi, edx
movzx edx, di
mov eax, ecx
imul eax, edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0xac], eax
cmp esi, eax
jae 0x404fe4
fld qword [esp + 0xb0]
fsub qword [0x41f358]
fstp qword [esp + 0xb0]
fld qword [esp + 0xb0]
mov ax, word [esp + 0x74]
movsx ecx, ax
mov dword [esp + 0x74], ecx
fild dword [esp + 0x74]
fmulp st(1)
call fcn.0040b140
mov word [esp + 0x74], ax
mov eax, 1
sub dword [esp + 0x3c], eax
add esi, edi
cmp esi, edi
jb 0x404fd9
cmp esi, dword [esp + 0xac]
jae 0x404fd9
sub dword [esp + 0x3c], eax
add esi, edi
cmp esi, edi
jae 0x404fc6
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0x3c]
sub esi, eax
xor edx, edx
mov eax, esi
div ebx
mov edx, eax
imul edx, ebx
sub esi, edx
mov edx, dword [esp + 0x20]
movzx edx, word [edx - 4]
shl esi, 0x10
or esi, edx
movzx ebx, di
mov edx, eax
imul edx, ebx
cmp esi, edx
jae 0x40501e
add esi, edi
dec eax
cmp esi, edi
jb 0x40501e
cmp esi, edx
jae 0x40501e
add esi, edi
dec eax
cmp esi, edi
jae 0x405013
mov edx, dword [esp + 0xc]
shl ecx, 0x10
or ecx, eax
mov eax, dword [esp + 0x54]
mov dword [edx + eax - 4], ecx
mov ecx, edx
or ebx, 0xffffffff
mov eax, dword [esp + 0x54]
mov edi, 1
add dword [ecx + eax - 4], edi
mov eax, dword [esp + 0xbc]
imul eax, eax, 0x3b4c6e26
mov dword [esp + 0xbc], eax
jmp 0x405064
mov ecx, dword [esp + 0xc]
add word [0x424a18], bx
mov dx, word [0x424a18]
movsx eax, dx
mov dword [esp + 0x20], eax
push edi
fild dword [esp + 0x24]
fadd qword [esp + 0xa4]
fsub dword [0x4237e0]
fmul qword [0x423720]
fstp qword [0x423720]
fld dword [0x4237e0]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x4237e0]
fsubr qword [esp + 0xa4]
mov eax, dword [esp + 0x58]
add dword [ecx + eax - 4], ebx
lea ecx, [esp + 0x30]
fstp qword [esp + 0xa4]
push ecx
fldz
fstp dword [esp + 0x28]
fldz
fstp qword [esp + 0x28]
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040b0c0
mov edx, dword [esp + 0x40]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x2c], edi
test esi, esi
jne 0x405512
mov ecx, dword [esp + 0x70]
cmp ecx, edi
jge 0x40511a
xor eax, eax
jmp 0x405122
mov eax, dword [esp + 0x48]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x34]
mov dword [edx], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x34]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, eax
push ecx
call fcn.00403740
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405512
fldz
lea edx, [esp + 0x84]
fstp dword [esp + 0x20]
push edi
fldz
push edx
fstp qword [esp + 0x28]
call fcn.00401420
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x8c]
lea ecx, [eax*4]
push ecx
push esi
push edx
call fcn.0040b0c0
mov eax, dword [esp + 0x98]
add esp, 0xc
mov dword [eax], esi
mov dword [esp + 0x84], edi
test esi, esi
jne 0x405512
mov eax, dword [esp + 0x6c]
cmp eax, 2
jge 0x4051c9
xor ecx, ecx
jmp 0x4051d1
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, edi
mov edx, dword [esp + 0x8c]
mov dword [edx], ecx
jge 0x4051e2
xor ecx, ecx
jmp 0x4051ea
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x8c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + eax*4]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
mov dword [eax + 8], edx
fsub qword [esp + 0xc8]
fsub qword [esp + 0x90]
mov edx, dword [0x4230fc]
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
fmulp st(1)
call fcn.0040b140
mov dword [0x4230fc], eax
fld qword [esp + 0x90]
fld1
lea eax, [esp + 0x84]
fadd st(1), st(0)
push eax
fxch st(1)
lea ecx, [esp + 0x30]
push ecx
fstp qword [esp + 0x98]
fsubr qword [esp + 0xd0]
fstp qword [esp + 0xd0]
call fcn.00401970
add esp, 8
test eax, eax
jg 0x405060
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0xc]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00403740
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405512
mov ebx, dword [esp + 0x60]
lea eax, [esp + 0x2c]
push ebx
push eax
call fcn.00402010
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
fld dword [esp + 0x38]
lea ecx, [esp + 0x2c]
fmul qword [0x41f640]
push ecx
lea edx, [esp + 0x18]
push edx
mov eax, edx
fstp dword [esp + 0x40]
push eax
call fcn.004047a0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405512
fldz
lea edx, [esp + 0xe0]
fstp qword [esp + 0x60]
push edx
mov dword [esp + 0x9c], eax
mov dword [esp + 0x9c], eax
mov eax, 1
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x9c]
push eax
mov dword [esp + 0xf0], ecx
call fcn.00401970
add esp, 8
test eax, eax
jge 0x40543d
mov cx, word [0x4255f4]
movsx edx, cx
mov dword [esp + 0x60], edx
fild dword [esp + 0x60]
fadd qword [esp + 0x78]
call fcn.0040b140
mov word [0x4255f4], ax
fld qword [esp + 0x78]
fsub qword [0x41f358]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x30]
push ecx
fstp qword [esp + 0x80]
call fcn.00401e50
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
fld qword [0x423108]
fsub qword [0x41f638]
fadd qword [0x4234e0]
fld dword [0x423cc8]
fsub qword [0x41f630]
fcompp
fnstsw ax
fld dword [0x423cc8]
fadd qword [0x41f358]
fstp dword [0x423cc8]
test ah, 5
jp 0x4053f3
fld dword [0x425730]
mov edx, dword [esp + 0x10]
inc dword [esp + 0x10]
mov eax, 0xe1c5873c
sub eax, edx
mov dword [esp + 0x60], eax
fild dword [esp + 0x60]
fcompp
fnstsw ax
test ah, 5
jp 0x4053f3
fld qword [0x41f628]
fstp qword [esp + 0x78]
lea ecx, [esp + 0x2c]
push ebx
push ecx
call fcn.00402010
mov esi, eax
add esp, 8
test esi, esi
jne 0x405512
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x18]
push eax
mov ecx, eax
push ecx
call fcn.004044e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x405512
mov eax, dword [esp + 0x54]
fld dword [esp + 0xc0]
dec dword [edi + eax - 4]
fstp qword [esp + 0x78]
mov eax, dword [esp + 0x6c]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x70]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0xc], edi
jg 0x404f00
mov edi, dword [ebp + 8]
test edi, edi
je 0x405499
lea edx, [esp + 0x4c]
push edx
push edi
call fcn.00401e50
fld qword [esp + 0x98]
fsub dword [0x424a1c]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
add esp, 8
fadd dword [0x424994]
fstp dword [0x424994]
mov ecx, dword [eax]
imul ecx, dword [edx]
mov dword [edi], ecx
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x405512
mov eax, dword [esp + 0x58]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00401520
lea edx, [esp + 0x1c]
push edx
push edi
call fcn.00401e50
fldz
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
xor eax, eax
mov dword [edi], ecx
fstp qword [esp + 0xc0]
mov dword [esp + 0xac], eax
mov dword [esp + 0xac], eax
lea eax, [esp + 0xfc]
push eax
mov ebx, 1
lea edx, [esp + 0xb0]
push edi
mov dword [esp + 0x104], ebx
mov dword [esp + 0x108], ebx
mov dword [esp + 0x10c], edx
call fcn.00401970
add esp, 0x18
test eax, eax
jne 0x405512
mov dword [edi], ebx
push 0
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.004011b0
add esp, 0x18
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret