Function at 0x1801e6570
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov rax, qword [0x18050a0d0]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0xd0]
mov r13, qword [rbp + 0xe8]
mov rdi, qword [rbp + 0xc0]
mov qword [rbp - 0x48], rax
mov rax, qword [rbp + 0xe0]
mov qword [rbp - 0x50], rcx
mov rcx, qword [rbp + 0xd8]
mov r12, r8
mov qword [rbp - 0x58], rax
shr r12, 3
mov qword [rbp - 0x60], rcx
xor ecx, ecx
lea eax, [r12 - 0x14]
mov r14, r9
mov qword [rbp - 0x80], r9
mov rbx, rdx
mov qword [rsp + 0x68], r13
mov dword [rsp + 0x38], ecx
mov qword [rsp + 0x50], rcx
mov dword [rsp + 0x48], ecx
mov dword [rsp + 0x3c], 2
test eax, 0xfffffff3
jne 0x1801e6d9a
cmp r12d, 0x18
je 0x1801e6d9a
mov qword [rsp + 0x160], rsi
test r9, r9
jne 0x1801e6629
call fcn.1801821c0
xor ecx, ecx
mov r14, rax
mov qword [rbp - 0x80], rax
mov eax, 0x200
movsxd rsi, r12d
cmp rbx, rax
cmovb rbx, rax
lea rax, [rbx + 0x3f]
and rax, 0xffffffffffffffc0
mov qword [rbp - 0x70], rax
mov rax, qword [rbp + 0xc8]
cmp rax, rsi
jae 0x1801e6659
mov rdi, rcx
mov rax, rcx
cmp rcx, rsi
cmova rax, rsi
mov qword [rbp + 0xc8], rax
test rdi, rdi
je 0x1801e667a
lea rcx, [rbp]
mov r8, rax
mov rdx, rdi
call fcn.180230800
jmp 0x1801e6683
test rax, rax
jne 0x1801e6d82
call fcn.1801dbb20
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1801e6d82
mov qword [rsp + 0x158], r15
call fcn.18018f580
mov r15, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x1801e6d7a
mov rcx, rax
call fcn.18018f5e0
mov rcx, r15
call fcn.18018f500
mov rdi, rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rsp + 0x70], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rsp + 0x78], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rsp + 0x40], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rbp - 0x68], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov qword [rsp + 0x60], rax
test rax, rax
je 0x1801e6d6a
mov rcx, r15
call fcn.18018f500
mov rbx, rax
mov qword [rbp - 0x78], rax
test rax, rax
je 0x1801e6d6a
call fcn.18018a260
mov r8, qword [rbp - 0x70]
mov rcx, rbx
dec r8d
mov rdx, rax
call fcn.18018e730
test eax, eax
je 0x1801e6d6a
nop word [rax + rax]
mov ebx, dword [rsp + 0x48]
xor edx, edx
mov rcx, r13
mov r8d, ebx
call fcn.1801f0030
inc ebx
mov dword [rsp + 0x48], ebx
test eax, eax
je 0x1801e6d6a
cmp qword [rbp + 0xc8], 0
jne 0x1801e67cc
lea rcx, [rbp]
mov rdx, rsi
call fcn.1801a3cb0
mov ebx, 1
jmp 0x1801e67d5
xor ebx, ebx
mov qword [rbp + 0xc8], rbx
lea rdx, [rbp]
lea rcx, [rbp - 0x20]
mov r8, rsi
call fcn.180230800
lea rdx, [rbp]
lea rcx, [rbp + 0x20]
mov r8, rsi
call fcn.180230800
lea rax, [rsi - 1]
test rax, rax
js 0x1801e680b
nop
inc byte [rbp + rax - 0x20]
jne 0x1801e680b
dec rax
jns 0x1801e6800
lea r8, [rbp - 0x40]
lea rcx, [rbp]
xor r9d, r9d
mov rdx, rsi
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], r14
call fcn.18016fd10
test eax, eax
je 0x1801e6d6a
lea r8, [rbp + 0x20]
lea rcx, [rbp - 0x20]
xor r9d, r9d
mov rdx, rsi
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], r14
call fcn.18016fd10
test eax, eax
je 0x1801e6d6a
xor edx, edx
test r12d, r12d
jle 0x1801e68d3
cmp r12d, 0x20
jb 0x1801e68d3
mov eax, r12d
xor r8d, r8d
and eax, 0x8000001f
jge 0x1801e687e
dec eax
or eax, 0xffffffe0
inc eax
mov r9d, r12d
sub r9d, eax
nop dword [rax]
nop dword [rax + rax]
movsxd rax, r8d
add rdx, 0x20
movdqu xmm0, xmmword [rbp + rax - 0x40]
movdqu xmm1, xmmword [rbp + rax + 0x20]
pxor xmm1, xmm0
movdqu xmmword [rbp + rax - 0x40], xmm1
lea eax, [r8 + 0x10]
add r8d, 0x20
movsxd rcx, eax
movdqu xmm0, xmmword [rbp + rcx - 0x40]
movdqu xmm1, xmmword [rbp + rcx + 0x20]
pxor xmm1, xmm0
movdqu xmmword [rbp + rcx - 0x40], xmm1
cmp r8d, r9d
jl 0x1801e6890
cmp rdx, rsi
jge 0x1801e68f1
nop dword [rax + rax]
movzx eax, byte [rbp + rdx + 0x20]
inc rdx
xor byte [rbp + rdx - 0x41], al
cmp rdx, rsi
jl 0x1801e68e0
or byte [rbp - 0x40], 0x80
mov r8, qword [rsp + 0x40]
or byte [rbp + rsi - 0x41], 1
lea rcx, [rbp - 0x40]
mov edx, r12d
call fcn.180189980
test rax, rax
je 0x1801e6d6a
mov rcx, qword [rsp + 0x40]
mov r9d, ebx
mov r8, r15
mov edx, getprotobyname
mov qword [rsp + 0x20], r13
call fcn.1801f03e0
test eax, eax
jg 0x1801e693d
je 0x1801e6790
jmp 0x1801e6d6a
xor r8d, r8d
mov rcx, r13
lea edx, [r8 + 2]
call fcn.1801f0030
test eax, eax
je 0x1801e6d6a
xor r8d, r8d
mov rcx, r13
lea edx, [r8 + 3]
call fcn.1801f0030
test eax, eax
je 0x1801e6d6a
mov rcx, qword [rbp - 0x70]
mov rbx, qword [rsp + 0x78]
movabs rax, 0xcccccccccccccccd
dec rcx
xor r13d, r13d
lea r14, [rsi - 1]
mul rcx
mov r15, rdx
shr r15, 7
test r13d, r13d
je 0x1801e69ae
mov rcx, qword [rsp + 0x68]
mov r8d, r13d
xor edx, edx
call fcn.1801f0030
test eax, eax
je 0x1801e6d65
xor edx, edx
mov rcx, rbx
call fcn.18018a060
xor ebx, ebx
test r15d, r15d
js 0x1801e6a62
mov rax, r14
test r14, r14
js 0x1801e69db
nop dword [rax + rax]
inc byte [rbp + rax - 0x20]
jne 0x1801e69db
dec rax
jns 0x1801e69d0
mov rax, qword [rbp - 0x80]
lea r8, [rbp - 0x40]
lea rcx, [rbp - 0x20]
xor r9d, r9d
mov rdx, rsi
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call fcn.18016fd10
test eax, eax
je 0x1801e6d65
lea rcx, [rbp - 0x40]
mov r8, rdi
mov edx, r12d
call fcn.180189980
test rax, rax
je 0x1801e6d65
lea r8d, [r12*8]
mov rdx, rdi
mov rcx, rdi
imul r8d, ebx
call fcn.18018e730
test eax, eax
je 0x1801e6d65
mov rdx, qword [rsp + 0x78]
mov r8, rdi
mov rcx, rdx
call fcn.1801d9b80
test eax, eax
je 0x1801e6d65
inc ebx
cmp ebx, r15d
jle 0x1801e69c3
mov rdx, qword [rbp - 0x70]
mov rbx, qword [rsp + 0x78]
dec edx
mov rcx, rbx
call fcn.180189e00
test eax, eax
je 0x1801e6d65
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
call fcn.180189c40
test rax, rax
je 0x1801e6d65
mov rdx, qword [rsp + 0x58]
mov r8, qword [rbp - 0x78]
mov rcx, rdx
call fcn.1801d9b80
test eax, eax
je 0x1801e6d65
mov rdx, qword [rsp + 0x40]
mov rcx, rdi
call fcn.18018e8a0
test eax, eax
je 0x1801e6d65
mov rax, qword [rsp + 0x30]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rbp - 0x68]
mov r9, rdi
xor ecx, ecx
mov qword [rsp + 0x20], rax
call fcn.1801d9eb0
test eax, eax
je 0x1801e6d65
call fcn.18018a260
mov rdx, qword [rbp - 0x68]
mov rcx, rdi
mov r8, rax
call fcn.1801d9c20
test eax, eax
je 0x1801e6d65
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
mov r8, rdi
call fcn.1801d9c20
test eax, eax
je 0x1801e6d65
mov rdx, qword [rbp - 0x78]
mov rcx, qword [rsp + 0x60]
call fcn.180189ba0
test eax, eax
js 0x1801e6b5b
mov rax, qword [rsp + 0x68]
mov r8, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x60]
mov r9d, 1
mov qword [rsp + 0x20], rax
lea edx, [r9 + 0x31]
call fcn.1801f03e0
test eax, eax
jg 0x1801e6b7e
jne 0x1801e6d65
inc r13d
cmp r13d, 0x1000
jl 0x1801e6992
mov r14, qword [rbp - 0x80]
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x68]
jmp 0x1801e6790
mov rbx, qword [rsp + 0x68]
mov edx, 2
lea r8d, [rdx - 1]
mov rcx, rbx
call fcn.1801f0030
test eax, eax
je 0x1801e6d65
call fcn.18018a260
mov r14, qword [rsp + 0x60]
mov r12, qword [rbp - 0x78]
mov rdx, r14
mov rcx, r12
mov r8, rax
call fcn.1801d9c20
mov r15, qword [rsp + 0x30]
test eax, eax
je 0x1801e6d6a
mov r9, qword [rsp + 0x40]
mov r8, r12
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], r15
call fcn.1801d9eb0
test eax, eax
je 0x1801e6d6a
mov edx, 2
mov rcx, r12
call fcn.18018a060
test eax, eax
je 0x1801e6d6a
mov rcx, qword [rsp + 0x50]
mov r8, r15
mov rdx, r14
call fcn.1801dbb80
test eax, eax
je 0x1801e6d6a
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x70]
mov r9, r14
mov qword [rsp + 0x28], rax
mov r8, rdi
mov rdx, r12
mov qword [rsp + 0x20], r15
call fcn.1801dc870
test eax, eax
je 0x1801e6d6a
nop dword [rax + rax]
mov rcx, qword [rsp + 0x70]
cmp dword [rcx + 8], 1
jne 0x1801e6ca3
mov rax, qword [rcx]
cmp dword [rax], 1
jne 0x1801e6ca3
cmp dword [rcx + 0x10], 0
jne 0x1801e6ca3
call fcn.18018a260
mov rdx, r12
mov rcx, r12
mov r8, rax
call fcn.1801d9b80
test eax, eax
je 0x1801e6d6a
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x70]
inc dword [rsp + 0x3c]
mov qword [rsp + 0x28], rax
mov r9, r14
mov r8, rdi
mov rdx, r12
mov qword [rsp + 0x20], r15
call fcn.1801dc870
test eax, eax
jne 0x1801e6c40
jmp 0x1801e6d6a
mov edx, 3
mov rcx, rbx
lea r8d, [rdx - 2]
call fcn.1801f0030
test eax, eax
je 0x1801e6d6a
mov rbx, qword [rbp - 0x50]
mov dword [rsp + 0x38], 1
nop dword [rax + rax]
mov rcx, qword [rbx + 0x10]
call fcn.180189b40
mov rcx, qword [rbx + 0x18]
call fcn.180189b40
mov rcx, qword [rbx + 0x20]
call fcn.180189b40
mov rcx, r14
call fcn.180189d10
mov rcx, qword [rsp + 0x40]
mov qword [rbx + 0x10], rax
call fcn.180189d10
mov rcx, qword [rsp + 0x70]
mov qword [rbx + 0x18], rax
call fcn.180189d10
cmp qword [rbx + 0x10], 0
mov qword [rbx + 0x20], rax
je 0x1801e6d5b
cmp qword [rbx + 0x18], 0
je 0x1801e6d5b
test rax, rax
je 0x1801e6d5b
mov rax, qword [rbp - 0x60]
test rax, rax
je 0x1801e6d32
mov dword [rax], r13d
mov rdx, qword [rbp - 0x58]
test rdx, rdx
je 0x1801e6d41
mov eax, dword [rsp + 0x3c]
mov dword [rdx], eax
mov rax, qword [rbp - 0x48]
test rax, rax
je 0x1801e6d6a
lea rdx, [rbp]
mov r8, rsi
mov rcx, rax
call fcn.180230800
jmp 0x1801e6d6a
mov dword [rsp + 0x38], 0
jmp 0x1801e6d6a
mov r15, qword [rsp + 0x30]
mov rcx, r15
call fcn.18018f440
mov rcx, r15
call fcn.18018f4c0
mov r15, qword [rsp + 0x158]
mov rcx, qword [rsp + 0x50]
call fcn.1801dbae0
mov eax, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x160]
jmp 0x1801e6d9c
xor eax, eax
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.180243450
add rsp, 0x168
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret