Function at 0x14016aaa0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push r13
push r15
mov eax, reloc.WS2_32.dll_WSASetLastError
call fcn.140189b00
sub rsp, rax
mov rcx, r9
mov r13, r9
mov r15, r8
mov rbx, rdx
xor esi, esi
call fcn.1400ff510
mov rcx, r13
call fcn.1400ff690
test rax, rax
mov rbp, rax
mov qword [rsp + 0x50], rax
je 0x14016aeeb
mov rcx, r13
call fcn.1400ff690
test rax, rax
mov qword [rsp + 0x28], rax
je 0x14016aeeb
mov rcx, r13
mov qword [rsp + 0x60], r14
call fcn.1400ff690
test rax, rax
mov r14, rax
mov qword [rsp + 0x48], rax
je 0x14016aee6
mov rcx, r13
mov qword [rsp + 0xa8], rdi
call fcn.1400ff690
test rax, rax
mov rdi, rax
mov qword [rsp + 0x30], rax
je 0x14016aede
mov r8, r15
mov rdx, rbx
mov rcx, r14
call fcn.14016a590
test eax, eax
je 0x14016aede
cmp dword [r14 + 8], esi
je 0x14016aede
mov rdx, r15
mov rcx, rdi
call fcn.1400bb720
test rax, rax
je 0x14016aede
mov rcx, r14
mov qword [rsp + 0x68], r12
call fcn.1400bb3d0
mov rcx, rdi
mov r12d, eax
call fcn.1400bb3d0
movsxd rdi, dword [r15 + 8]
cmp edi, dword [r14 + 0xc]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x24], edi
jg 0x14016aba2
mov rax, r14
jmp 0x14016abac
mov edx, edi
mov rcx, r14
call fcn.1400bb6b0
test rax, rax
je 0x14016aed9
movsxd rax, dword [r14 + 8]
mov rbx, qword [r14]
cmp rax, rdi
jge 0x14016abd6
mov r8, rdi
lea rcx, [rbx + rax*8]
xor edx, edx
sub r8, rax
shl r8, 3
call fcn.140041940
mov dword [r14 + 8], edi
cmp edi, dword [rbp + 0xc]
jg 0x14016abe4
mov rax, rbp
jmp 0x14016abee
mov edx, edi
mov rcx, rbp
call fcn.1400bb6b0
test rax, rax
je 0x14016aed9
mov r13, qword [rbp]
mov eax, 1
mov r8, rdi
cmp rdi, rax
mov qword [r13], rax
jle 0x14016ac1f
add r8, 0xffffffffffffffff
lea rcx, [r13 + 8]
xor edx, edx
shl r8, 3
call fcn.140041940
mov rcx, qword [rsp + 0x28]
mov dword [rbp + 8], edi
cmp edi, dword [rcx + 0xc]
jg 0x14016ac31
mov rax, rcx
jmp 0x14016ac3d
mov edx, edi
call fcn.1400bb6b0
mov rcx, qword [rsp + 0x28]
test rax, rax
je 0x14016aed1
test edi, edi
mov r9, qword [rcx]
mov qword [rsp + 0x40], r9
jle 0x14016ac68
mov r8, rdi
xor edx, edx
mov rcx, r9
shl r8, 3
call fcn.140041940
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x30]
mov dword [rcx + 8], edi
mov r9, qword [rdx]
mov qword [rsp + 0x38], r9
nop
nop
test r12d, r12d
je 0x14016ad66
nop
nop
mov r9, qword [rbx]
test r9b, 1
jne 0x14016ad4d
mov r8, qword [r13]
mov rax, qword [r15]
mov r11, rsi
mov rcx, qword [rax]
mov r10b, r8b
lea eax, [rdi - 1]
and r10d, 1
neg r10
and rcx, r10
xor r8, rcx
test eax, eax
jle 0x14016ad34
mov rdi, rbx
mov rsi, 0xfffffffffffffff8
lea rbp, [r13 + 8]
sub rdi, r13
sub rsi, r13
mov r14d, eax
nop
nop
mov rcx, qword [rdi + rbp]
shr r9, 1
shr r8, 1
mov rax, rcx
add r11, 1
shl rax, 0x3f
or rax, r9
mov r9, rcx
lea rcx, [rsi + rbp]
mov qword [rbx + r11*8 - 8], rax
mov rax, qword [r15]
add rbp, 8
mov rdx, qword [rcx + rax + 8]
and rdx, r10
xor rdx, qword [rbp - 8]
mov rax, rdx
shl rax, 0x3f
or rax, r8
sub r14, 1
mov r8, rdx
mov qword [rbp - 0x10], rax
jne 0x14016ace0
mov edi, dword [rsp + 0x24]
xor esi, esi
shr r9, 1
shr r8, 1
sub r12d, 1
mov qword [rbx + r11*8], r9
mov qword [r13 + r11*8], r8
jne 0x14016ac90
mov rbp, qword [rsp + 0x50]
mov r14, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
cmp r12d, 0x40
jg 0x14016ad82
mov rax, qword [rbx]
test rax, rax
je 0x14016aed1
cmp rax, 1
je 0x14016ae8b
mov r11d, dword [rsp + 0x20]
cmp r12d, r11d
jge 0x14016add9
mov r13, qword [rsp + 0x40]
mov eax, r12d
mov r12d, r11d
mov r11d, eax
mov dword [rsp + 0x20], eax
mov rax, r14
mov qword [rsp + 0x48], rdx
mov r14, rdx
mov rdx, rax
mov qword [rsp + 0x30], rax
mov rax, rbp
mov rbx, r9
mov r8, qword [rax]
mov r9, qword [rdx]
mov rbp, rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x40], r8
mov rcx, rax
mov qword [rsp + 0x38], r9
jmp 0x14016adde
mov r8, qword [rsp + 0x40]
test edi, edi
movsxd rax, edi
jle 0x14016ae2b
mov r10, r8
mov rdx, r13
sub r9, rbx
sub r10, rbx
mov rcx, rbx
mov r8, rax
sub rdx, rbx
nop
nop
mov rax, qword [r9 + rcx]
add rcx, 8
xor qword [rcx - 8], rax
mov rax, qword [r10 + rcx - 8]
xor qword [rdx + rcx - 8], rax
sub r8, 1
jne 0x14016ae00
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
cmp r12d, r11d
jne 0x14016ac80
lea eax, [r12 - 1]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
movsxd rdi, eax
mov rax, rdi
mov rcx, qword [rbx + rdi*8]
test rcx, rcx
jne 0x14016ae67
test rax, rax
je 0x14016ae67
mov rcx, qword [rbx + rax*8 - 8]
sub rax, 1
sub edi, 1
test rcx, rcx
je 0x14016ae51
call fcn.1400bb2c0
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
shl edi, 6
lea r12d, [rdi + rax]
mov edi, dword [rsp + 0x24]
jmp 0x14016ac80
mov edx, dword [rbp + 8]
test edx, edx
jle 0x14016aeb6
lea eax, [rdx - 1]
movsxd rcx, eax
mov rax, qword [rbp]
lea r8, [rax + rcx*8]
mov rax, qword [r8]
sub r8, 8
test rax, rax
jne 0x14016aeb3
sub edx, 1
test edx, edx
jg 0x14016aea0
mov dword [rbp + 8], edx
mov rcx, qword [rsp + 0xa0]
mov rdx, rbp
call fcn.1400bb720
test rax, rax
mov eax, 1
cmovne esi, eax
mov r13, qword [rsp + 0xb8]
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0xa8]
mov r14, qword [rsp + 0x60]
mov rcx, r13
call fcn.1400ff610
mov eax, esi
add rsp, 0x70
pop r15
pop r13
pop rsi
pop rbp
pop rbx
ret