Function at 0x406830
Capabilities:
Packed with generic packer

Disassembly:
push ebx
push ecx
push ebp
push esi
push edi
mov esi, esp
sub esp, 0xc
mov eax, esp
mov edx, eax
add edx, 0xc
mov dword [eax], 0
add eax, 4
cmp eax, edx
jne 0x406841
call fcn.0040f459
push eax
call fcn.0040933d
mov dword [esp], 1
mov eax, 0x562550
call fcn.005a3170
mov eax, 0x562550
call fcn.005a3190
and eax, eax
je 0x406b08
mov ebx, dword [esp]
cmp ebx, 1
jne 0x406897
mov ebp, dword [0x562554]
fld dword [ebp + 0x10]
fmul dword [0x562484]
fstp dword [esp + 4]
mov ebp, dword [0x562554]
fld dword [ebp + 8]
fld dword [0x5624c4]
fld dword [0x562428]
mov dword [esp - 4], 0x43b40000
fdiv dword [esp - 4]
fmulp st(1)
fcos
fmul dword [esp + 4]
faddp st(1)
fstp dword [ebp + 8]
fld dword [ebp + 0xc]
fld dword [0x5624c4]
fld dword [0x562428]
mov dword [esp - 4], 0x43b40000
fdiv dword [esp - 4]
fmulp st(1)
fsin
fmul dword [esp + 4]
faddp st(1)
fstp dword [ebp + 0xc]
fld dword [ebp + 8]
fild dword [0x562420]
fiadd dword [0x562410]
fcompp
fnstsw ax
test ah, 1
je 0x406932
mov ebp, dword [0x562554]
fld dword [ebp + 8]
fisub dword [0x562410]
fstp dword [ebp + 8]
fild dword [0x562424]
mov eax, dword [0x562414]
call fcn.005a32f9
mov dword [esp - 4], eax
fiadd dword [esp - 4]
fstp dword [ebp + 0xc]
mov ebp, dword [0x562554]
fld dword [ebp + 8]
fild dword [0x562420]
fcompp
fnstsw ax
test ah, 0x41
jne 0x406977
mov ebp, dword [0x562554]
fld dword [ebp + 8]
fiadd dword [0x562410]
fstp dword [ebp + 8]
fild dword [0x562424]
mov eax, dword [0x562414]
call fcn.005a32f9
mov dword [esp - 4], eax
fiadd dword [esp - 4]
fstp dword [ebp + 0xc]
mov ebp, dword [0x562554]
fld dword [ebp + 0xc]
fild dword [0x562424]
fiadd dword [0x562414]
fcompp
fnstsw ax
test ah, 1
je 0x4069c2
mov ebp, dword [0x562554]
fld dword [ebp + 0xc]
fisub dword [0x562414]
fstp dword [ebp + 0xc]
fild dword [0x562420]
mov eax, dword [0x562410]
call fcn.005a32f9
mov dword [esp - 4], eax
fiadd dword [esp - 4]
fstp dword [ebp + 8]
mov ebp, dword [0x562554]
fld dword [ebp + 0xc]
fild dword [0x562424]
fcompp
fnstsw ax
test ah, 0x41
jne 0x406a07
mov ebp, dword [0x562554]
fld dword [ebp + 0xc]
fiadd dword [0x562414]
fstp dword [ebp + 0xc]
fild dword [0x562420]
mov eax, dword [0x562410]
call fcn.005a32f9
mov dword [esp - 4], eax
fiadd dword [esp - 4]
fstp dword [ebp + 8]
mov ebp, dword [0x562554]
push dword [ebp + 0x10]
fld dword [esp]
push eax
pushal
push ax
fnstcw word [esp]
mov ax, word [esp]
mov dx, ax
and dh, 8
xor ah, dh
or ah, 4
mov word [esp], ax
fldcw word [esp]
fistp dword [esp + 0x22]
fldcw word [esp]
pop ax
popal
pop eax
add esp, 4
mov ebx, eax
mov ebp, dword [0x5624e0]
shl ebx, 2
mov eax, dword [ebp + ebx]
mov dword [esp + 8], eax
mov ebp, dword [0x562554]
fld dword [ebp + 8]
mov dword [esp - 4], 0x3f800000
fcomp dword [esp - 4]
fnstsw ax
test ah, 0x41
jne 0x406a92
fld dword [ebp + 8]
fild dword [0x562418]
mov dword [esp - 4], 0xbf800000
fadd dword [esp - 4]
fcompp
fnstsw ax
test ah, 0x41
jne 0x406a92
mov eax, 1
jmp 0x406a94
xor eax, eax
and eax, eax
je 0x406ae0
fld dword [ebp + 0xc]
mov dword [esp - 4], 0x3f800000
fcomp dword [esp - 4]
fnstsw ax
test ah, 0x41
jne 0x406ad3
fld dword [ebp + 0xc]
fild dword [0x56241c]
mov dword [esp - 4], 0xbf800000
fadd dword [esp - 4]
fcompp
fnstsw ax
test ah, 0x41
jne 0x406ad3
mov eax, 1
jmp 0x406ad5
xor eax, eax
and eax, eax
je 0x406ae0
mov eax, 1
jmp 0x406ae2
xor eax, eax
and eax, eax
je 0x406b03
push dword [esp + 8]
mov ebp, dword [0x562554]
fld dword [ebp + 0xc]
push eax
fistp dword [esp]
fld dword [ebp + 8]
push eax
fistp dword [esp]
call fcn.00409510
jmp 0x40686a
call fcn.00409458
xor eax, eax
add esp, 0xc
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret