Function at 0x10058660
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [0x1017dbe8]
sub esp, 0x58
push esi
push edi
test ecx, ecx
je 0x10058a4b
cmp dword [0x100f95f4], 1
mov esi, dword [ebp + 8]
jne 0x100586d3
call fcn.1000e7d0
test al, al
jne 0x100586d3
mov ecx, dword [0x1017dbe8]
call fcn.10057ff0
test al, al
jne 0x100586d3
mov ecx, dword [0x1017dbe8]
call fcn.10014530
test al, 1
jne 0x100586d3
movzx eax, word [esi + 0x38]
cmp ax, 1
jg 0x100586c6
cmp ax, 0xffff
jge 0x100586d3
movss xmm0, dword [0x100f0950]
jmp 0x100586ce
movss xmm0, dword [0x100f0860]
movss dword [esi + 0x1c], xmm0
cmp dword [0x100f95f4], 2
jne 0x10058a4b
mov eax, dword [esi + 0x24]
mov ecx, dword [0x1017dbe8]
shr eax, 1
and eax, 0xffffff01
mov dword [esp + 8], eax
call fcn.10014530
test eax, 0x201
mov eax, dword [esp + 8]
jne 0x10058a46
test al, al
je 0x10058719
cmp byte [0x1017d99c], 0
je 0x10058a46
mov ecx, dword [0x1017dbe8]
call fcn.10057ff0
test al, al
jne 0x10058a42
mov ecx, dword [0x1017dbe8]
lea eax, [esp + 0x20]
push eax
call fcn.10014620
movss xmm1, dword [eax + 4]
movss xmm0, dword [eax]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm0, xmm1
call fcn.1000fd60
mov ecx, dword [0x1017dbe8]
lea eax, [esp + 0x30]
push eax
movss dword [esp + 0x1c], xmm0
call fcn.10014620
movss xmm0, dword [0x100f0700]
movss xmm1, dword [esp + 0x18]
comiss xmm0, xmm1
ja 0x10058a4b
call fcn.10058a60
ucomiss xmm0, dword [0x100f0528]
movss dword [esp + 0x18], xmm0
lahf
test ah, 0x44
jnp 0x10058a42
fld dword [esp + 0x34]
fld dword [esp + 0x30]
fpatan
push ecx
movss xmm0, dword [esi + 0x10]
mulss xmm0, dword [0x100f05a0]
fstp dword [esp + 0x18]
movss xmm1, dword [esp + 0x18]
subss xmm1, xmm0
movss xmm0, dword [esi + 0x1c]
xorps xmm0, xmmword [0x100f0ed0]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
fld dword [esi + 0x18]
fpatan
movaps xmm0, xmm1
movss dword [esp + 0x18], xmm1
fstp dword [esp + 0x10]
subss xmm0, dword [esp + 0x10]
movss dword [esp + 0x14], xmm0
fld dword [esp + 0x14]
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll__fdclass
add esp, 4
test ax, ax
jg 0x10058841
movsd xmm0, qword [0x100f0718]
sub esp, 0x10
movsd qword [esp + 8], xmm0
movss xmm0, dword [esp + 0x20]
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_remainder]
fstp qword [esp + 0x30]
movsd xmm0, qword [esp + 0x30]
add esp, 0x10
jmp 0x10058844
xorps xmm0, xmm0
cvtpd2ps xmm2, xmm0
movss xmm0, dword [esp + 0x14]
comiss xmm0, dword [esp + 0xc]
movss dword [esp + 0x10], xmm2
cvtps2pd xmm1, xmm2
jbe 0x10058872
comisd xmm1, xmmword [0x100f0708]
jb 0x10058892
subsd xmm1, qword [0x100f0718]
jmp 0x10058888
movsd xmm0, qword [0x100f0910]
comisd xmm0, xmm1
jb 0x10058892
addsd xmm1, qword [0x100f0718]
cvtpd2ps xmm0, xmm1
movss dword [esp + 0x10], xmm0
movzx edx, byte [0x1017d99c]
xor ecx, ecx
mov dword [esp + 0x3e], 0x4a8049f
mov dword [esp + 0x42], 0x4eb04b9
mov dword [esp + 0x46], 0x4b804a6
mov dword [esp + 0x4a], 0x4bf04a3
mov dword [esp + 0x4e], 0x4bf04b9
mov dword [esp + 0x52], 0x4e904b5
mov dword [esp + 0x56], 0x4f004f4
mov dword [esp + 0x5a], 0x4bf
mov byte [esp + 0x5e], 1
lea eax, [ecx + 0x4c8]
xor word [esp + ecx*2 + 0x3e], ax
inc ecx
cmp ecx, 0xf
jb 0x100588e0
push edx
lea eax, [esp + 0x42]
mov byte [esp + 0x62], 0
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 3
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0xff4040ff
push eax
mov eax, dword [0x100fc3ec]
cdq
sub eax, edx
mov dword [esp + 0x30], 8
sar eax, 1
sub eax, 0x32
push eax
push dword [0x100fc3f0]
lea eax, [esp + 0x38]
push eax
push 0x1017dbc8
call fcn.100cd120
xor eax, eax
mov dword [esp + 0x5e], 0x4ba0481
add esp, 0x20
mov dword [esp + 0x42], 0x4a104ea
mov dword [esp + 0x46], 0x4a004b9
xor ecx, ecx
mov dword [esp + 0x4a], 0x4a604be
mov dword [esp + 0x4e], 0x4b604be
mov dword [esp + 0x52], 0x4f304e8
mov dword [esp + 0x56], 0x4bc04f1
mov word [esp + 0x5a], ax
mov byte [esp + 0x5c], 1
nop word [eax + eax]
lea eax, [ecx + 0x4c8]
xor word [esp + ecx*2 + 0x3e], ax
inc ecx
cmp ecx, 0xe
jb 0x10058990
mov eax, dword [esp + 8]
movzx eax, al
push eax
lea eax, [esp + 0x42]
mov byte [esp + 0x60], 0
push eax
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 3
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0xff4040ff
push eax
mov eax, dword [0x100fc3ec]
cdq
sub eax, edx
mov dword [esp + 0x2c], 8
sar eax, 1
sub eax, 0x46
push eax
push dword [0x100fc3f0]
lea eax, [esp + 0x34]
push eax
push 0x1017dbc8
call fcn.100cd120
movss xmm1, dword [esp + 0x34]
xorps xmm0, xmm0
add esp, 0x20
comiss xmm0, dword [esp + 0x10]
jbe 0x10058a13
addss xmm1, dword [esp + 0x18]
jmp 0x10058a19
subss xmm1, dword [esp + 0x18]
movaps xmm0, xmm1
call fcn.100d24c0
movaps xmm1, xmm0
shufps xmm1, xmm0, 1
mulss xmm1, dword [0x100f0860]
mulss xmm0, dword [0x100f0950]
movss dword [esi + 0x18], xmm1
movss dword [esi + 0x1c], xmm0
mov eax, dword [esp + 8]
mov byte [0x1017d99c], al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4