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

Disassembly:
sub esp, 0xb8
fldz
push ebx
xor ebx, ebx
mov dword [esp + 0x24], ebx
fst dword [esp + 8]
fldz
xor eax, eax
mov word [esp + 0x18], ax
mov dword [esp + 0x74], ebx
xor ecx, ecx
mov word [esp + 0x40], cx
fst qword [esp + 0x90]
fxch st(1)
xor edx, edx
fstp dword [esp + 0x64]
mov word [esp + 0x78], dx
push esi
fstp qword [esp + 0x80]
mov word [esp + 0x14], ax
mov dword [esp + 0x10], ebx
mov word [esp + 0x14], cx
mov dword [esp + 0x20], ebx
fld qword [0x424c98]
fsubr qword [0x41f428]
push edi
call fcn.0040b420
mov edi, dword [esp + 0xd4]
mov dword [esp + 0x24], eax
lea eax, [esp + 0xa0]
push eax
mov esi, 1
lea edx, [esp + 0x98]
push edi
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], esi
mov dword [esp + 0xb0], edx
call fcn.00401890
add esp, 8
test eax, eax
jne 0x405d5c
pop edi
pop esi
lea eax, [ebx - 0xc]
pop ebx
add esp, 0xb8
ret
push ebp
push ebx
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00402670
mov ebp, dword [esp + 0xec]
push edi
push ebp
call fcn.004015c0
add esp, 0x20
test eax, eax
jge 0x405e49
mov ax, word [0x424bd4]
mov edi, dword [esp + 0xcc]
movsx ecx, ax
add ecx, 0xe09aa13
mov dword [esp + 0x28], ecx
fild dword [esp + 0x28]
fadd qword [esp + 0x88]
fstp qword [esp + 0x88]
add word [0x424bd4], si
cmp edi, ebx
je 0x405e13
xor edx, edx
push esi
mov dword [esp + 0x14], ebx
push edi
mov word [esp + 0x24], dx
call fcn.004016f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
add eax, eax
add eax, eax
push eax
push ebx
push ecx
call fcn.0040b840
mov edx, dword [edi + 8]
add esp, 0xc
mov dword [edx], ebx
mov dword [edi], 1
cmp esi, ebx
jne 0x40680e
mov eax, dword [esp + 0xd0]
cmp eax, ebx
je 0x405e32
push ebp
push eax
call fcn.00402880
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
pop ebp
pop edi
mov eax, 0xffffbc33
pop esi
mov word [esp + 0x18], ax
xor eax, eax
pop ebx
add esp, 0xb8
ret
lea ecx, [esp + 0x34]
push ebp
push ecx
call fcn.00402880
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
lea edx, [esp + 0x5c]
push edi
push edx
call fcn.00402880
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
mov eax, dword [ebp + 4]
add eax, 2
push eax
lea ecx, [esp + 0x54]
mov edi, 1
push ecx
mov dword [esp + 0x64], edi
mov dword [esp + 0x3c], edi
call fcn.004016f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
lea eax, [esp + 0x50]
xor edx, edx
push edi
mov dword [esp + 0x14], ebx
push eax
mov word [esp + 0x24], dx
call fcn.004016f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
lea edx, [ecx*4]
push edx
push ebx
push eax
call fcn.0040b840
mov ecx, dword [esp + 0x64]
add esp, 0xc
mov dword [ecx], ebx
mov dword [esp + 0x50], edi
cmp esi, ebx
jne 0x40680e
lea edx, [esp + 0x40]
push 2
push edx
call fcn.004016f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
lea eax, [esp + 0x74]
push 3
push eax
call fcn.004016f0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
lea ecx, [esp + 0x5c]
push ecx
call fcn.004027c0
add esp, 4
and eax, 0x8000001f
jns 0x405f3e
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
fld dword [0x425d9c]
fsub qword [0x41f798]
fstp dword [0x425d9c]
jge 0x405f92
mov edi, 0x1f
sub edi, eax
lea edx, [esp + 0x34]
push edi
push edx
mov dword [esp + 0x30], edi
call fcn.004042d0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
lea eax, [esp + 0x5c]
push edi
push eax
call fcn.004042d0
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40680e
jmp 0x405f96
mov dword [esp + 0x28], ebx
fld dword [0x4257f8]
mov cx, word [0x423398]
mov ebx, dword [esp + 0x38]
movsx edx, cx
mov dword [esp + 0x2c], edx
dec ebx
mov edi, ebx
fild dword [esp + 0x2c]
faddp st(1)
fstp qword [esp + 0x9c]
dec word [0x423398]
mov eax, dword [esp + 0x60]
dec eax
sub edi, eax
mov ebp, edi
mov dword [esp + 0x6c], eax
shl ebp, 5
lea eax, [esp + 0x5c]
push ebp
push eax
call fcn.004042d0
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00401890
add esp, 0x10
test eax, eax
jl 0x406057
jmp 0x406000
fld dword [0x423334]
lea ecx, [esp + 0x34]
fsub qword [0x41f340]
mov edx, ecx
fstp dword [0x423334]
fld dword [0x423334]
fsub qword [0x423208]
mov eax, dword [esp + 0x58]
inc dword [eax + edi*4]
lea eax, [esp + 0x5c]
fsub qword [0x41f790]
push eax
push ecx
push edx
fstp dword [esp + 0x7c]
call fcn.00404e60
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401890
add esp, 0x14
test eax, eax
jge 0x406000
lea edx, [esp + 0x5c]
push ebp
push edx
call fcn.00401eb0
mov ax, word [esp + 0x2c]
movsx ecx, ax
mov edx, 0x5ceb3f57
sub edx, ecx
mov dword [esp + 0x34], edx
add esp, 8
mov dword [esp + 0x68], ebx
fild dword [esp + 0x2c]
fadd qword [str.Ys_Y]
fstp qword [str.Ys_Y]
inc dword [esp + 0x24]
cmp ebx, dword [esp + 0x6c]
jle 0x40669e
lea eax, [edi*4]
add ebp, 0xffffffe0
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ebp
jmp 0x4060b4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x68]
lea ebp, [ecx + edx*4]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x64]
lea ecx, [ecx + edx*4]
mov edx, dword [ebp]
mov dword [esp + 0x10], ebp
cmp edx, dword [ecx]
jb 0x4060ed
mov ecx, dword [esp + 0x58]
or ebx, 0xffffffff
mov dword [eax + ecx - 4], ebx
mov ecx, dword [esp + 0x58]
inc dword [eax + ecx - 4]
jmp 0x406284
fld qword [esp + 0x88]
fld dword [0x42331c]
fcompp
fnstsw ax
test ah, 1
jne 0x40614e
fld dword [0x4230ec]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x4230ec]
fld dword [0x4230ec]
fsub qword [0x41f788]
fsub dword [0x4230ec]
fcomp qword [0x41f780]
fnstsw ax
test ah, 0x41
jne 0x40613e
fld dword [0x423108]
fstp st(0)
jmp 0x406150
fld dword [esp + 0x70]
fmul qword [0x41f778]
fstp dword [esp + 0x70]
jmp 0x406150
fld1
mov edi, dword [ecx]
mov esi, dword [ebp]
xor edx, edx
mov eax, esi
mov ebx, edi
shr ebx, 0x10
div ebx
movzx ecx, di
mov edx, eax
imul edx, ebx
sub esi, edx
movzx edx, word [ebp - 2]
mov ebp, eax
imul ebp, ecx
shl esi, 0x10
or esi, edx
mov dword [esp + 0x1c], eax
cmp esi, ebp
jae 0x4061d6
mov eax, dword [0x4232f8]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fld qword [0x425d10]
fsubr qword [0x41f770]
fsub qword [0x41f768]
fsubp st(1)
call fcn.0040b420
mov dword [0x4232f8], eax
fld qword [0x425d10]
fadd st(1)
mov eax, 1
sub dword [esp + 0x1c], eax
add esi, edi
fstp qword [0x425d10]
cmp esi, edi
jb 0x4061d6
cmp esi, ebp
jae 0x4061d6
sub dword [esp + 0x1c], eax
add esi, edi
cmp esi, edi
jae 0x4061c8
dec dword [esp + 0x30]
fadd dword [esp + 0x14]
sub esi, ebp
xor edx, edx
mov eax, esi
fstp dword [esp + 0x14]
mov ecx, dword [esp + 0x30]
div ebx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fsub dword [esp + 0x14]
mov ebp, eax
call fcn.0040b420
mov edx, ebp
imul edx, ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
movzx ecx, word [eax - 4]
sub esi, edx
mov dx, word [esp + 0x24]
movsx eax, dx
shl esi, 0x10
sub eax, 0x2cd8168c
or esi, ecx
mov dword [esp + 0x10], eax
movzx ecx, di
fild dword [esp + 0x10]
mov eax, ebp
imul eax, ecx
fadd qword [esp + 0x9c]
fstp qword [esp + 0x9c]
cmp esi, eax
jae 0x40625b
add esi, edi
dec ebp
cmp esi, edi
jb 0x40625b
nop
cmp esi, eax
jae 0x40625b
add esi, edi
dec ebp
cmp esi, edi
jae 0x406250
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x20]
shl eax, 0x10
or eax, ebp
mov dword [edx + ecx - 4], eax
mov ecx, dword [esp + 0x58]
mov eax, edx
or ebx, 0xffffffff
inc dword [eax + ecx - 4]
jmp 0x406284
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x58]
add dword [eax + ecx - 4], ebx
lea ecx, [esp + 0x40]
xor eax, eax
push 1
mov dword [esp + 0x14], 0
push ecx
mov word [esp + 0x24], ax
call fcn.004016f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40680c
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
lea eax, [edx*4]
push eax
push esi
push ecx
call fcn.0040b840
mov edx, dword [esp + 0x54]
add esp, 0xc
mov dword [edx], esi
mov dword [esp + 0x40], 1
test esi, esi
jne 0x40680c
mov ecx, dword [esp + 0x6c]
cmp ecx, 1
jge 0x4062f1
xor eax, eax
jmp 0x4062f9
mov eax, dword [esp + 0x64]
mov eax, dword [eax + ecx*4 - 4]
mov edx, dword [esp + 0x48]
mov dword [edx], eax
mov eax, dword [esp + 0x64]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x48]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + eax - 4]
push edx
lea eax, [esp + 0x44]
push eax
mov ecx, eax
push ecx
call fcn.00404d10
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40680c
mov dword [esp + 0x10], eax
lea eax, [esp + 0x74]
xor edx, edx
push 1
push eax
mov word [esp + 0x24], dx
call fcn.004016f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40680c
mov ecx, dword [esp + 0x78]
lea edx, [ecx*4]
push edx
push eax
mov eax, dword [esp + 0x84]
push eax
call fcn.0040b840
mov ecx, dword [esp + 0x88]
add esp, 0xc
mov dword [ecx], esi
mov dword [esp + 0x74], 1
test esi, esi
jne 0x40680c
fld dword [0x4230dc]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x4230dc]
fld dword [0x4230dc]
fld dword [esp + 0x70]
fld dword [esp + 0x14]
fadd qword [0x41f760]
fsubp st(2)
fucompp
fnstsw ax
fld dword [esp + 0x14]
fadd st(1)
fstp dword [esp + 0x14]
test ah, 0x44
jnp 0x4063d7
mov edx, dword [esp + 0x18]
imul edx, edx, 0x2399b9aa
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x68]
cmp eax, 2
jge 0x4063e4
xor ecx, ecx
jmp 0x4063ec
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, 1
mov edx, dword [esp + 0x7c]
mov dword [edx], ecx
jge 0x4063fb
xor ecx, ecx
jmp 0x406403
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x7c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x7c]
mov dword [eax + 8], edx
mov ecx, dword [0x4232f4]
mov edx, dword [esp + 0x18]
add ecx, 0x7d7b226e
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov eax, 0x44185d88
sub eax, edx
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fld qword [0x425d00]
add dword [0x4232f4], ebx
faddp st(2)
fcompp
fnstsw ax
test ah, 5
jp 0x40649c
fld qword [0x4233b8]
mov ecx, dword [esp + 0x18]
fsub qword [0x41f758]
mov edx, dword [0x424c80]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov dword [esp + 0x10], edx
faddp st(1)
fild dword [esp + 0x10]
faddp st(1)
call fcn.0040b420
mov dword [0x424c80], eax
add dword [esp + 0x18], ebx
fsubr qword [0x4233b8]
fstp qword [0x4233b8]
jmp 0x40649e
fstp st(0)
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00401890
add esp, 8
test eax, eax
jg 0x406280
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x20]
mov eax, dword [edi + edx - 4]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00404d10
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40680c
fld qword [0x425d90]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x425d90]
fld qword [0x425d10]
fsub qword [0x425d90]
fsub qword [0x41f750]
fcomp qword [0x41f748]
fnstsw ax
test ah, 0x44
jp 0x406538
fld dword [esp + 0x14]
fsub qword [0x41f740]
fsub qword [0x41f738]
fadd dword [0x4230b8]
fstp dword [0x4230b8]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
jmp 0x406561
mov ax, word [esp + 0x4c]
fstp st(0)
mov edx, dword [esp + 0x18]
movsx ecx, ax
lea eax, [ecx + edx + 0x56bd23df]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fmul dword [esp + 0x14]
fstp dword [esp + 0x14]
add dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x2c]
lea ecx, [esp + 0x40]
push ebx
push ecx
call fcn.004042d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40680c
fld dword [0x4257f8]
lea edx, [esp + 0x40]
fadd qword [0x41f730]
push edx
lea eax, [esp + 0x38]
push eax
mov ecx, eax
fstp dword [0x4231bc]
push ecx
call fcn.00404e60
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40680c
xor edx, edx
mov word [esp + 0x1c], dx
xor ebp, ebp
mov dword [esp + 0x10], ebp
fld qword [0x424c98]
fsubr qword [0x41f428]
call fcn.0040b420
mov dword [esp + 0x10], eax
mov eax, 1
lea ecx, [esp + 0xb0]
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
push ecx
lea edx, [esp + 0x38]
lea eax, [esp + 0x98]
push edx
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xc0], eax
call fcn.00401890
add esp, 8
test eax, eax
jge 0x40667d
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x20], 0x29149fbf
call fcn.00402880
mov esi, eax
add esp, 8
cmp esi, ebp
jne 0x40680c
lea edx, [esp + 0x40]
push ebx
push edx
call fcn.004042d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40680c
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x38]
push ecx
mov edx, ecx
push edx
call fcn.00405100
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40680c
mov eax, dword [esp + 0x18]
mov word [esp + 0x4c], ax
mov eax, dword [esp + 0x58]
dec dword [edi + eax - 4]
mov eax, dword [esp + 0x68]
dec eax
sub ebx, 0x20
sub edi, 4
cmp eax, dword [esp + 0x6c]
mov dword [esp + 0x68], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], edi
jg 0x4060b0
mov ecx, dword [0x4232f8]
mov edx, dword [esp + 0x80]
inc dword [esp + 0x80]
cmp ecx, edx
jl 0x4066f6
fld dword [esp + 0x14]
fadd qword [esp + 0x88]
fld dword [esp + 0x14]
fcompp
fnstsw ax
fld dword [esp + 0x14]
fsub qword [0x41f340]
fstp dword [esp + 0x14]
test ah, 0x41
jne 0x4066f6
movzx eax, word [esp + 0x84]
movzx ecx, word [esp + 0x24]
sub ecx, eax
sub ecx, 0x23003f2a
mov word [esp + 0x24], cx
mov edi, dword [esp + 0xcc]
test edi, edi
je 0x40672c
lea edx, [esp + 0x50]
push edx
push edi
call fcn.00402880
mov eax, dword [esp + 0xdc]
mov ecx, dword [eax]
mov edx, dword [esp + 0xe0]
imul ecx, dword [edx]
add esp, 8
mov dword [edi], ecx
add dword [esp + 0x30], 0x55a75e1f
mov edi, dword [esp + 0xd0]
test edi, edi
je 0x40680c
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00401eb0
mov edx, dword [0x4230e0]
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fld dword [esp + 0x1c]
fsubr qword [0x41f728]
fsubp st(1)
call fcn.0040b420
mov dword [0x4230e0], eax
lea eax, [esp + 0x3c]
push eax
push edi
call fcn.00402880
mov ecx, dword [esp + 0xe4]
mov edx, dword [ecx]
mov dword [edi], edx
xor eax, eax
mov word [esp + 0x2c], ax
xor ebx, ebx
mov dword [esp + 0x20], ebx
fld qword [0x424c98]
fsubr qword [0x41f428]
call fcn.0040b420
lea edx, [esp + 0xcc]
mov dword [esp + 0xa0], ebx
push edx
mov ebx, 1
lea ecx, [esp + 0xa4]
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], ecx
call fcn.00401890
add esp, 0x18
test eax, eax
jne 0x4067e5
mov dword [edi], ebx
fld qword [0x4244e0]
fadd qword [0x41f340]
fstp qword [0x4244e0]
fld qword [0x4244e0]
fsubr qword [0x41f720]
call fcn.0040b420
mov dword [esp + 0x30], eax
xor ebx, ebx
push ebx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.004022f0
add esp, 0x18
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0xb8
ret