Function at 0x14009add0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x18]
sub rsp, 0x118
mov rax, qword [0x1401970d0]
xor rax, rsp
mov qword [rbp + 8], rax
xor r14d, r14d
mov qword [rsp + 0x30], r9
mov rsi, r9
mov dword [rsp + 0x50], r14d
lea r10, [0x140197f18]
mov qword [rbp - 0x40], r8
mov qword [rsp + 0x58], r10
mov r9, rdx
movups xmm0, xmmword [rsp + 0x50]
mov qword [rbp - 0x38], rdx
mov rdi, rcx
mov r13d, r14d
movups xmmword [rsi], xmm0
mov eax, dword [rcx + 0xa0]
cmp eax, 4
je 0x14009b598
lea r12, [rcx + 0x30]
lea ebx, [r14 + 0xa]
mov r11d, 8
cmp eax, 5
je 0x14009b598
cmp r13, r8
jb 0x14009ae62
cmp qword [r12], 0
jne 0x14009b598
test eax, eax
jne 0x14009affb
mov rax, r8
sub rax, r13
je 0x14009aed4
mov rcx, qword [r12]
test rcx, rcx
je 0x14009aed4
movzx edx, byte [r9 + r13]
cmp rax, 1
jbe 0x14009aeb7
cmp rcx, 2
jne 0x14009aea5
mov byte [rdi + 0x18], dl
movzx eax, byte [r9 + r13 + 1]
mov byte [rdi + 0x19], al
lea rax, [rcx - 2]
mov qword [r12], rax
mov rax, rcx
jmp 0x14009aed7
lea rax, [rcx - 1]
mov byte [rdi + 0x19], dl
mov qword [r12], rax
mov eax, 1
jmp 0x14009aed7
lea rax, [rcx - 1]
mov qword [r12], rax
mov eax, 1
cmp rcx, 2
jne 0x14009aecf
mov byte [rdi + 0x18], dl
jmp 0x14009aed7
mov byte [rdi + 0x19], dl
jmp 0x14009aed7
mov rax, r14
add r13, rax
cmp qword [r12], 0
ja 0x14009b5e4
movzx edx, byte [rdi + 0x18]
mov ecx, edx
and ecx, 0xf
cmp ecx, 8
jb 0x14009af07
movzx eax, byte [rdi + 0x19]
and al, 0x7f
cmp al, 0x7d
jbe 0x14009af07
mov dword [rsp + 0x20], r11d
jmp 0x14009af9c
test dl, 0x40
jne 0x14009af94
test dl, 0x30
jne 0x14009af94
lea eax, [rcx - 3]
cmp eax, 4
jbe 0x14009af8a
cmp ecx, 0xb
jae 0x14009af8a
cmp ecx, 8
jb 0x14009af31
test dl, dl
js 0x14009af31
mov dword [rsp + 0x20], ebx
jmp 0x14009af9c
cmp qword [rdi + 0x40], 0
jne 0x14009af46
test ecx, ecx
jne 0x14009af58
mov dword [rsp + 0x20], ntohl
jmp 0x14009af9c
lea eax, [rcx - 1]
cmp eax, 6
ja 0x14009af58
mov dword [rsp + 0x20], ntohl
jmp 0x14009af9c
cmp byte [rdi + 9], 0
movzx eax, byte [rdi + 0x19]
je 0x14009af70
test al, al
js 0x14009af7e
mov dword [rsp + 0x20], ntohl
jmp 0x14009af9c
test al, al
jns 0x14009af7e
mov dword [rsp + 0x20], reloc.WS2_32.dll_listen
jmp 0x14009af9c
mov dword [rsp + 0x20], r14d
mov qword [rsp + 0x28], r10
jmp 0x14009afa6
mov dword [rsp + 0x20], 7
jmp 0x14009af9c
mov dword [rsp + 0x20], 9
call fcn.14007c880
mov qword [rsp + 0x28], rax
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rsi], xmm0
cmp dword [rsi], 0
jne 0x14009b598
mov dword [rdi + 0xa0], 1
mov qword [rdi + 0x38], r14
movzx edx, byte [rdi + 0x19]
movzx eax, dl
and al, 0x7f
cmp al, 0x7e
jne 0x14009afd9
mov ecx, 4
jmp 0x14009afe4
cmp al, 0x7f
mov ecx, 2
cmove rcx, rbx
test dl, dl
lea rax, [rcx + 4]
cmovns rax, rcx
sub rax, 2
mov qword [r12], rax
jmp 0x14009b5e4
cmp eax, 1
jne 0x14009b415
mov rbx, qword [r12]
lea rdx, [r9 + r13]
mov rcx, qword [rdi + 0x38]
mov rax, r8
sub rax, r13
cmp rax, rbx
cmovb rbx, rax
add rcx, 0x88
add rcx, rdi
mov r8, rbx
call fcn.14010e4d0
add qword [rdi + 0x38], rbx
add r13, rbx
sub qword [r12], rbx
cmp qword [r12], 0
ja 0x14009b5df
movzx edx, byte [rdi + 0x19]
lea rbx, [rdi + 0x88]
movsd xmm0, qword [rbx]
and dl, 0x7f
mov eax, dword [rbx + 8]
movsd qword [rbp - 0x50], xmm0
mov dword [rbp - 0x48], eax
cmp dl, 0x7d
jbe 0x14009b0a1
cmp dl, 0x7e
jne 0x14009b08b
movzx ecx, word [rbp - 0x50]
call qword [sym.imp.WS2_32.dll_ntohs]
cmp ax, 0x7d
ja 0x14009b0a1
mov dword [rsp + 0x60], reloc.WS2_32.dll_ntohl
call fcn.14007c880
jmp 0x14009b0ad
mov rcx, qword [rbp - 0x50]
call fcn.140076090
cmp dl, 0x7f
jne 0x14009b0a1
cmp rax, 0xffff
jmp 0x14009b07a
mov dword [rsp + 0x60], r14d
lea rax, [0x140197f18]
mov qword [rsp + 0x68], rax
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rsi], xmm0
cmp dword [rsi], 0
jne 0x14009b598
movzx eax, byte [rdi + 0x19]
and al, 0x7f
mov dword [rdi + 0xa0], 3
cmp al, 0x7d
ja 0x14009b0dc
movzx esi, al
jmp 0x14009b0f9
cmp al, 0x7e
jne 0x14009b0ee
movzx ecx, word [rbx]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
jmp 0x14009b0f9
mov rcx, qword [rbx]
call fcn.140076090
mov rsi, rax
movzx r14d, byte [rdi + 0x18]
and r14d, 0xf
mov qword [r12], rsi
cmp r14d, 8
jb 0x14009b24d
movzx ecx, byte [rdi + 0x19]
test cl, cl
js 0x14009b121
mov dword [rbp - 8], 0
jmp 0x14009b154
and cl, 0x7f
cmp cl, 0x7e
jne 0x14009b130
mov eax, 2
jmp 0x14009b13d
xor eax, eax
mov edx, 8
cmp cl, 0x7f
cmove eax, edx
lea rdx, [rax + rbx]
sub rax, rdx
lea r8, [rbx + 4]
add r8, rax
lea rcx, [rbp - 8]
call fcn.14010e4d0
mov rcx, qword [rdi + 0x20]
lea rdx, [rbp - 0x28]
mov r9, rsi
mov r8d, r14d
call fcn.140095b20
mov rbx, rax
mov rax, qword [rax + 8]
test rax, rax
je 0x14009b177
lock inc dword [rax + 8]
mov rax, qword [rbx]
mov rbx, qword [rbx + 8]
mov qword [rsp + 0x70], rax
mov eax, dword [rbp - 8]
mov ecx, eax
mov qword [rsp + 0x78], rbx
shl rcx, 0x20
or rcx, rax
mov qword [rbp - 0x78], 0
mov qword [rbp - 0x80], rcx
test rbx, rbx
je 0x14009b1d4
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14009b1d4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14009b1d4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
lea r15, [rdi + 0x60]
mov rcx, r15
lea rdx, [rsp + 0x70]
call fcn.140095aa0
mov rax, qword [rbp - 0x80]
mov rcx, qword [rsp + 0x78]
mov qword [r15 + 0x10], rax
mov rax, qword [rbp - 0x78]
mov qword [r15 + 0x18], rax
test rcx, rcx
je 0x14009b409
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14009b409
mov rbx, qword [rsp + 0x78]
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14009b409
mov rcx, qword [rsp + 0x78]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rdi + 0x80], r15
jmp 0x14009b5df
mov rax, qword [rdi + 0x40]
lea r15, [rdi + 0x40]
test rax, rax
jne 0x14009b396
cmp rsi, qword [rdi + 0x10]
ja 0x14009b60b
movzx eax, byte [rdi + 0x19]
test al, al
js 0x14009b279
mov dword [rbp - 4], 0
jmp 0x14009b2a9
and al, 0x7f
cmp al, 0x7e
jne 0x14009b286
mov ecx, 2
jmp 0x14009b292
xor ecx, ecx
mov edx, 8
cmp al, 0x7f
cmove ecx, edx
lea rdx, [rbx + rcx]
lea r8, [rcx + 4]
sub rbx, rdx
add r8, rbx
lea rcx, [rbp - 4]
call fcn.14010e4d0
mov rcx, qword [rdi + 0x20]
lea rdx, [rbp - 0x18]
mov r9, rsi
mov r8d, r14d
call fcn.140095b20
mov rbx, rax
mov rax, qword [rax + 8]
test rax, rax
je 0x14009b2cc
lock inc dword [rax + 8]
mov rax, qword [rbx]
mov rbx, qword [rbx + 8]
mov qword [rbp - 0x70], rax
mov eax, dword [rbp - 4]
mov ecx, eax
mov qword [rbp - 0x68], rbx
shl rcx, 0x20
or rcx, rax
xor eax, eax
mov qword [rbp - 0x60], rcx
mov qword [rbp - 0x58], rax
test rbx, rbx
je 0x14009b325
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x14009b325
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14009b325
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
lea rdx, [rbp - 0x70]
mov rcx, r15
call fcn.140095aa0
mov rax, qword [rbp - 0x60]
mov rcx, qword [rbp - 0x68]
mov qword [r15 + 0x10], rax
mov rax, qword [rbp - 0x58]
mov qword [r15 + 0x18], rax
test rcx, rcx
je 0x14009b409
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14009b409
mov rbx, qword [rbp - 0x68]
mov rcx, rbx
mov rax, qword [rbx]
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14009b409
mov rcx, qword [rbp - 0x68]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rdi + 0x80], r15
jmp 0x14009b5df
mov rcx, qword [rax + 0x60]
lea r14, [rax + 0x50]
add rcx, rsi
cmp rcx, qword [rdi + 0x10]
ja 0x14009b60b
movzx eax, byte [rdi + 0x19]
test al, al
js 0x14009b3ba
xor eax, eax
mov dword [rbp], eax
jmp 0x14009b3ed
and al, 0x7f
cmp al, 0x7e
jne 0x14009b3c7
mov ecx, 2
jmp 0x14009b3d3
xor ecx, ecx
mov edx, 8
cmp al, 0x7f
cmove ecx, edx
lea rdx, [rbx + rcx]
lea r8, [rcx + 4]
sub rbx, rdx
add r8, rbx
lea rcx, [rbp]
call fcn.14010e4d0
mov eax, dword [rbp]
mov edx, eax
mov rcx, r14
shl rax, 0x20
or rax, rdx
mov qword [rdi + 0x50], rax
mov rdx, qword [r14 + 0x10]
add rdx, rsi
call fcn.14009ff00
mov qword [rdi + 0x80], r15
jmp 0x14009b5df
cmp eax, 2
jne 0x14009b42d
mov dword [rdi + 0xa0], 3
lea r12, [rdi + 0x30]
jmp 0x14009b5e4
cmp eax, 3
jne 0x14009b62f
mov rbx, qword [r12]
mov rax, r8
sub rax, r13
cmp rax, rbx
cmovb rbx, rax
test rbx, rbx
je 0x14009b53d
add r9, r13
cmp byte [rdi + 0x19], 0
jge 0x14009b4a0
mov rax, qword [rdi + 0x80]
mov rcx, r14
mov rdx, qword [rax + 0x10]
mov dword [rsp + 0x48], edx
nop dword [rax + rax]
mov rax, rcx
and eax, 3
movzx eax, byte [rsp + rax + 0x48]
xor byte [rcx + r9], al
inc rcx
cmp rcx, rbx
jb 0x14009b470
mov rax, qword [rdi + 0x80]
mov rcx, rbx
and ecx, 3
je 0x14009b49c
shl cl, 3
ror rdx, cl
mov qword [rax + 0x10], rdx
mov rax, qword [rdi + 0x80]
mov r8, rbx
mov rdx, r9
mov rsi, qword [rax]
add rsi, 0x50
mov rcx, rsi
mov r14, qword [rsi + 0x10]
call fcn.14000e820
mov r9, qword [rdi + 0x80]
mov rax, qword [r9]
cmp dword [rax + 0x70], 1
jne 0x14009b522
cmp qword [rsi + 0x18], 0x10
jb 0x14009b4e3
mov r8, qword [rsi]
add r8, qword [rsi + 0x10]
mov rsi, qword [rsi]
jmp 0x14009b4ea
mov r8, qword [rsi + 0x10]
add r8, rsi
lea rdx, [rsi + r14]
lea rcx, [r9 + 0x18]
call fcn.1400a35a0
test al, al
jne 0x14009b522
mov dword [rsp + 0x38], shutdown
call fcn.14007c880
mov rsi, qword [rsp + 0x30]
xor r14d, r14d
mov qword [rsp + 0x40], rax
mov ebx, r14d
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsi], xmm0
jmp 0x14009b52e
sub qword [r12], rbx
mov rsi, qword [rsp + 0x30]
xor r14d, r14d
add r13, rbx
cmp dword [rsi], 0
jne 0x14009b598
lea r10, [0x140197f18]
cmp qword [r12], 0
ja 0x14009b5df
movzx eax, byte [rdi + 0x18]
test al, al
jns 0x14009b5bb
and al, 0xf
cmp al, 1
jne 0x14009b577
mov rax, qword [rdi + 0x80]
cmp dword [rax + 0x18], 0
je 0x14009b577
mov dword [rsp + 0x50], shutdown
call fcn.14007c880
mov qword [rsp + 0x58], rax
jmp 0x14009b58b
mov dword [rdi + 0xa0], 4
mov dword [rsp + 0x50], r14d
mov qword [rsp + 0x58], r10
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [rsi], xmm0
cmp dword [rsi], 0
je 0x14009b5df
mov rax, r13
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.14010a950
add rsp, 0x118
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor eax, eax
mov dword [rdi + 0xa0], r14d
mov qword [r12], 2
mov word [rdi + 0x18], 0
mov qword [rdi + 0x88], rax
mov dword [rdi + 0x90], eax
mov ebx, 0xa
mov eax, dword [rdi + 0xa0]
cmp eax, 4
je 0x14009b598
mov rsi, qword [rsp + 0x30]
lea r10, [0x140197f18]
mov r8, qword [rbp - 0x40]
xor r14d, r14d
mov r9, qword [rbp - 0x38]
jmp 0x14009ae43
mov dword [rsp + 0x38], 4
call fcn.14007c880
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x30]
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rax], xmm0
jmp 0x14009b598
mov dword [rsp + 0x38], 1
call fcn.14007c880
mov qword [rsp + 0x40], rax
xor eax, eax
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsi], xmm0
jmp 0x14009b59b