Function at 0x140166e20
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x140264330]
xor rax, rsp
mov qword [rsp + 0x48], rax
lea edi, [rdx - 1]
mov ebx, r9d
mov rsi, r8
lea eax, [rdi - 0x29]
cmp r9d, eax
jle 0x140166e6f
mov edx, 0x79
lea r9, [0x1402b4b18]
mov dword [rsp + 0x20], 0x2d
lea ecx, [rdx - 0x75]
lea r8d, [rdx - 0xb]
call fcn.1400dabf0
xor eax, eax
jmp 0x1401670fb
cmp edi, 0x29
jge 0x140166e9b
mov edx, 0x79
lea r9, [0x1402b4b78]
mov dword [rsp + 0x20], 0x33
lea ecx, [rdx - 0x75]
lea r8d, [rdx - 1]
call fcn.1400dabf0
xor eax, eax
jmp 0x1401670fb
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x60], r12
mov byte [rcx], 0
lea rbp, [rcx + 1]
mov qword [rsp + 0x58], r14
lea r14, [rcx + 0x15]
lea r12, [0x1402339a0]
xor r9d, r9d
xor edx, edx
mov r8, r14
xor ecx, ecx
mov qword [rsp + 0x20], r12
call fcn.1400fc8e0
test eax, eax
je 0x140166f6c
mov eax, edi
lea rcx, [r14 + 0x14]
xor edx, edx
sub eax, ebx
sub eax, 0x29
movsxd r8, eax
call sub.MSVCR120.dll_memset
movsxd rax, ebx
movsxd rcx, edi
sub rcx, rax
mov r8, rbx
mov rdx, rsi
mov byte [rcx + r14 - 0x15], 1
add rcx, 0xffffffffffffffec
add rcx, r14
call sub.MSVCR120.dll_memcpy
call fcn.1400d9c50
test rax, rax
je 0x140166f6c
mov rax, qword [rax + 8]
test rax, rax
je 0x140166f6c
mov ebx, setsockopt
mov rcx, rbp
mov edx, ebx
call rax
test eax, eax
jle 0x140166f6c
add edi, 0xffffffec
lea r8d, [rbx + 0x35]
lea rdx, [0x1402b4b48]
mov ecx, edi
call fcn.1400ede70
mov rsi, rax
test rax, rax
jne 0x140166f73
lea r9, [0x1402b4bd8]
lea edx, [rbx + 0x65]
lea ecx, [rbx - 0x10]
lea r8d, [rbx + 0x2d]
mov dword [rsp + 0x20], 0x4c
call fcn.1400dabf0
xor eax, eax
jmp 0x1401670ec
mov r9d, ebx
mov r8, rbp
mov edx, edi
mov rcx, rax
mov qword [rsp + 0x20], r12
call fcn.140167540
test eax, eax
js 0x140166f6c
mov qword [rsp + 0x50], r15
xor r15d, r15d
mov edx, r15d
test edi, edi
jle 0x140166fef
cmp edi, 0x10
jb 0x140166fef
lea eax, [rdi - 1]
movsxd rcx, eax
lea rax, [rcx + rsi]
lea r8, [rcx + r14]
cmp r14, rax
ja 0x140166fb8
cmp r8, rsi
jae 0x140166fef
mov eax, edi
and eax, 0x8000000f
jge 0x140166fc8
dec eax
or eax, 0xfffffff0
inc eax
mov ecx, edi
sub ecx, eax
nop dword [rax]
movsxd rax, edx
add edx, 0x10
movdqu xmm1, xmmword [rax + rsi]
movdqu xmm0, xmmword [rax + r14]
pxor xmm1, xmm0
movdqu xmmword [rax + r14], xmm1
cmp edx, ecx
jl 0x140166fd0
movsxd rax, edx
movsxd rdx, edi
cmp rax, rdx
jge 0x140167021
mov r9, rsi
lea rcx, [rax + r14]
sub r9, r14
sub rdx, rax
nop word [rax + rax]
movzx eax, byte [r9 + rcx]
lea rcx, [rcx + 1]
xor byte [rcx - 1], al
dec rdx
jne 0x140167010
lea rcx, [rsp + 0x30]
mov r9d, edi
mov r8, r14
mov edx, ebx
mov qword [rsp + 0x20], r12
call fcn.140167540
test eax, eax
jns 0x140167043
xor eax, eax
jmp 0x1401670e7
lea rcx, [rsp + 0x43]
lea rax, [rbp + 0x13]
cmp rbp, rcx
ja 0x140167060
lea rcx, [rsp + 0x30]
cmp rax, rcx
jae 0x14016707a
nop dword [rax + rax]
movdqu xmm1, xmmword [rbp]
movdqu xmm0, xmmword [rsp + 0x30]
mov r15d, reloc.WS2_32.dll_recv
pxor xmm1, xmm0
movdqu xmmword [rbp], xmm1
movsxd rax, r15d
cmp rax, rbx
jge 0x1401670b0
lea rdx, [rsp + 0x30]
lea rcx, [rax + rbp]
sub rdx, rbp
sub rbx, rax
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
lea rcx, [rcx + 1]
xor byte [rcx - 1], al
dec rbx
jne 0x1401670a0
mov rax, qword [0x1402eae88]
test rax, rax
je 0x1401670c3
xor edx, edx
mov rcx, rsi
call rax
mov rcx, rsi
call qword [sub.MSVCR120.dll_free]
mov r8, qword [0x1402eae88]
test r8, r8
je 0x1401670e2
mov edx, 1
xor ecx, ecx
call r8
mov eax, 1
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov r14, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401bb2c0
add rsp, 0x70
pop rdi
pop rsi
pop rbx
ret