Function at 0x140168660
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rdi
push r12
sub rsp, 0x90
mov eax, dword [r9 + 0x34]
xor ebx, ebx
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x70], r15
mov r12, r9
mov r14, r8
mov rdi, rdx
mov dword [rsp + 0x30], ebx
test eax, eax
jne 0x1401686d9
cmp dword [r9 + 0x38], ebx
jne 0x1401686d9
mov edx, dword [r9 + 0x30]
lea rcx, [r9 + 0x20]
call fcn.14010b800
test eax, eax
jne 0x1401686df
lea r9, [0x14027cac8]
lea ecx, [rbx + 3]
lea r8d, [rbx + 0x6d]
mov edx, 0x81
mov dword [rsp + 0x20], 0x108
call fcn.1400d9be0
inc dword [r12 + 0x34]
jmp 0x1401686df
inc eax
mov dword [r9 + 0x34], eax
mov rcx, r12
call fcn.14010b730
mov r15, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140168b62
mov rcx, r12
call fcn.14010b730
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140168b62
mov rcx, r12
mov qword [rsp + 0x88], rsi
call fcn.14010b730
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140168b5a
mov rcx, r12
call fcn.14010b730
mov rbx, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140168b56
mov r8, r14
mov rdx, rdi
mov rcx, rsi
call fcn.140167e40
test eax, eax
je 0x140168b56
cmp dword [rsi + 8], 0
je 0x140168b56
mov rdx, r14
mov rcx, rbx
call fcn.1400d4c10
test rax, rax
je 0x140168b56
mov rcx, rsi
mov qword [rsp + 0xb8], rbp
mov qword [rsp + 0x80], r13
call fcn.1400d47d0
mov rcx, rbx
mov ebp, eax
call fcn.1400d47d0
movsxd r13, dword [r14 + 8]
mov dword [rsp + 0x34], eax
cmp r13d, dword [rsi + 0xc]
jle 0x1401687b7
mov edx, r13d
mov rcx, rsi
call fcn.1400d4b50
movsxd rdx, dword [rsi + 8]
mov rbx, qword [rsi]
cmp rdx, r13
jge 0x1401687d2
mov rcx, r13
lea rdi, [rbx + rdx*8]
sub rcx, rdx
xor eax, eax
rep stosq qword [rdi], rax
mov dword [rsi + 8], r13d
cmp r13d, dword [r15 + 0xc]
jle 0x1401687e7
mov edx, r13d
mov rcx, r15
call fcn.1400d4b50
mov rsi, qword [r15]
mov eax, 1
mov qword [rsi], rax
cmp r13d, eax
jle 0x140168807
lea eax, [r13 - 1]
lea rdi, [rsi + 8]
movsxd rcx, eax
xor eax, eax
rep stosq qword [rdi], rax
mov r8, qword [rsp + 0x38]
mov dword [r15 + 8], r13d
cmp r13d, dword [r8 + 0xc]
jle 0x140168826
mov edx, r13d
mov rcx, r8
call fcn.1400d4b50
mov r8, qword [rsp + 0x38]
mov r11, qword [r8]
mov qword [rsp + 0x60], r11
test r13d, r13d
jle 0x14016883e
mov rdi, r11
xor eax, eax
mov rcx, r13
rep stosq qword [rdi], rax
mov rdx, qword [rsp + 0x40]
mov dword [r8 + 8], r13d
mov r15, qword [rdx]
mov qword [rsp + 0x58], r15
nop
test ebp, ebp
je 0x14016893b
nop dword [rax + rax]
mov rdi, qword [rbx]
test dil, 1
jne 0x140168927
mov rax, qword [rsi]
mov rcx, qword [r14]
xor r15d, r15d
mov rdx, qword [rcx]
mov r9, rax
lea ecx, [r13 - 1]
and r9d, 1
movsxd r10, ecx
neg r9
and rdx, r9
xor rax, rdx
test ecx, ecx
jle 0x140168911
mov r12, qword [rsp + 0xc0]
mov r11, rbx
mov r14, 0xfffffffffffffff8
sub r11, rsi
lea r8, [rsi + 8]
mov r15, r10
sub r14, rsi
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [r11 + r8]
shr rdi, 1
shr rax, 1
shl rcx, 0x3f
lea rdx, [r14 + r8]
lea r8, [r8 + 8]
or rcx, rdi
mov rdi, qword [r11 + r8 - 8]
mov qword [r11 + r8 - 0x10], rcx
mov rcx, qword [r12]
mov rdx, qword [rdx + rcx + 8]
and rdx, r9
xor rdx, qword [r8 - 8]
mov rcx, rdx
shl rcx, 0x3f
or rcx, rax
mov rax, rdx
mov qword [r8 - 0x10], rcx
dec r10
jne 0x1401688c0
mov r14, qword [rsp + 0xc0]
shr rdi, 1
shr rax, 1
mov qword [rbx + r15*8], rdi
mov qword [rsi + r15*8], rax
dec ebp
jne 0x140168860
mov r11, qword [rsp + 0x60]
mov r15, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
cmp ebp, 0x40
jg 0x14016894a
cmp qword [rbx], 1
je 0x140168ae9
mov r12d, dword [rsp + 0x34]
cmp ebp, r12d
jge 0x140168994
mov rcx, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov eax, ebp
mov rbx, r15
mov r15, qword [rcx]
mov rsi, r11
mov r11, qword [rdi]
mov ebp, r12d
mov dword [rsp + 0x34], eax
mov qword [rsp + 0x58], r15
mov r12d, eax
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x60], r11
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x38], rdi
xor r10d, r10d
test r13d, r13d
jle 0x140168a46
cmp r13d, 2
jb 0x140168a46
lea eax, [r13 - 1]
xor edx, edx
movsxd rcx, eax
lea r9, [r11 + rcx*8]
lea rax, [rsi + rcx*8]
cmp rsi, r9
ja 0x1401689c9
cmp rax, r11
jae 0x140168a46
lea rdi, [rbx + rcx*8]
cmp rsi, rdi
ja 0x1401689d7
cmp rax, rbx
jae 0x140168a46
lea r8, [r15 + rcx*8]
cmp rsi, r8
ja 0x1401689e5
cmp rax, r15
jae 0x140168a46
cmp rbx, r9
ja 0x1401689ef
cmp rdi, r11
jae 0x140168a46
cmp rbx, r8
ja 0x1401689f9
cmp rdi, r15
jae 0x140168a46
mov eax, r13d
and eax, 0x80000001
jge 0x140168a0a
dec eax
or eax, 0xfffffffe
inc eax
mov ecx, r13d
sub ecx, eax
nop
movsxd rax, edx
add edx, 2
add r10, 2
movdqu xmm0, xmmword [rbx + rax*8]
movdqu xmm1, xmmword [r15 + rax*8]
pxor xmm1, xmm0
movdqu xmmword [rbx + rax*8], xmm1
movdqu xmm1, xmmword [r11 + rax*8]
movdqu xmm0, xmmword [rsi + rax*8]
pxor xmm1, xmm0
movdqu xmmword [rsi + rax*8], xmm1
cmp edx, ecx
jl 0x140168a10
cmp r10, r13
jge 0x140168a8b
mov rdi, r15
mov r8, r11
mov r9, rsi
mov rdx, r13
sub rdi, rbx
sub r8, rbx
sub r9, rbx
lea rcx, [rbx + r10*8]
sub rdx, r10
nop word [rax + rax]
mov rax, qword [rdi + rcx]
lea rcx, [rcx + 8]
xor qword [rcx - 8], rax
mov rax, qword [r8 + rcx - 8]
xor qword [r9 + rcx - 8], rax
dec rdx
jne 0x140168a70
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
cmp ebp, r12d
jne 0x140168850
lea eax, [rbp - 1]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
movsxd rdi, eax
mov rdx, rdi
mov rcx, qword [rbx + rdi*8]
test rcx, rcx
jne 0x140168ad4
nop dword [rax]
test rdx, rdx
je 0x140168ad4
mov rcx, qword [rbx + rdx*8 - 8]
dec rdx
dec edi
test rcx, rcx
je 0x140168ac0
call fcn.1400d46c0
mov rdx, qword [rsp + 0x40]
shl edi, 6
lea ebp, [rdi + rax]
jmp 0x140168850
mov rdi, qword [rsp + 0x48]
mov r13, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xb8]
mov edx, dword [rdi + 8]
mov r12, qword [rsp + 0xc8]
test edx, edx
jle 0x140168b35
lea eax, [rdx - 1]
movsxd rcx, eax
mov rax, qword [rdi]
lea rcx, [rax + rcx*8]
nop word [rax + rax]
mov rax, qword [rcx]
lea rcx, [rcx - 8]
test rax, rax
jne 0x140168b32
dec edx
test edx, edx
jg 0x140168b20
mov dword [rdi + 8], edx
mov rcx, qword [rsp + 0xb0]
mov rdx, rdi
call fcn.1400d4c10
mov ebx, dword [rsp + 0x30]
test rax, rax
mov eax, 1
cmovne ebx, eax
jmp 0x140168b5a
mov ebx, dword [rsp + 0x30]
mov rsi, qword [rsp + 0x88]
mov ecx, dword [r12 + 0x34]
mov r15, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
test ecx, ecx
je 0x140168b8a
dec ecx
mov eax, ebx
mov dword [r12 + 0x34], ecx
add rsp, 0x90
pop r12
pop rdi
pop rbx
ret
dec dword [r12 + 0x28]
mov rax, qword [r12 + 0x20]
mov ecx, dword [r12 + 0x28]
mov r8d, dword [rax + rcx*4]
mov edi, dword [r12 + 0x30]
cmp r8d, edi
jae 0x140168be4
mov eax, dword [r12 + 0x18]
sub edi, r8d
lea edx, [rax - 1]
sub eax, edi
and edx, 0xf
mov dword [r12 + 0x18], eax
test edi, edi
je 0x140168be4
dec edi
test edx, edx
jne 0x140168bde
mov rax, qword [r12 + 8]
mov edx, reloc.WS2_32.dll_ntohs
mov rcx, qword [rax + 0x180]
mov qword [r12 + 8], rcx
jmp 0x140168be0
dec edx
test edi, edi
jne 0x140168bc0
mov dword [r12 + 0x30], r8d
mov dword [r12 + 0x38], 0
mov eax, ebx
add rsp, 0x90
pop r12
pop rdi
pop rbx
ret