Function at 0x180021e40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push r12
push r14
lea rbp, [rsp - 0x88]
sub rsp, 0x188
mov rax, qword [0x180094010]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rax, qword [rbp + 0xe8]
xorps xmm0, xmm0
mov r12, qword [rbp + 0xf8]
mov r11d, edx
mov rbx, qword [rbp + 0xe0]
mov r10, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rbp + 0xf0]
mov qword [rsp + 0x30], rax
xor eax, eax
mov dword [rsp + 0x1c], r8d
xor r14d, r14d
mov r8, qword [rbp + 0xd8]
mov qword [rbp + 0x18], r14
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], r12
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp + 0x10], rax
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
nop word [rax + rax]
mov eax, dword [rcx]
lea rcx, [rcx + 4]
inc dword [rbp + rax*4 - 0x20]
add edx, 0xffffffff
jne 0x180021ed0
cmp dword [rbp - 0x20], r11d
jne 0x180021ef2
mov qword [r8], r14
xor eax, eax
mov dword [rbx], r14d
jmp 0x1800222b9
mov edx, dword [rbx]
mov ecx, 1
mov qword [rsp + 0x1c0], rsi
mov qword [rsp + 0x170], r15
nop dword [rax]
mov eax, ecx
cmp dword [rbp + rax*4 - 0x20], r14d
jne 0x180021f20
inc ecx
cmp ecx, 0xf
jbe 0x180021f10
cmp edx, ecx
mov r8d, ecx
mov r15d, ecx
cmovae r8d, edx
mov edx, reloc.WS2_32.dll_ntohs
mov eax, edx
cmp dword [rbp + rax*4 - 0x20], r14d
jne 0x180021f3f
add edx, 0xffffffff
jne 0x180021f31
cmp r8d, edx
mov qword [rsp + 0x180], rdi
mov esi, edx
mov qword [rsp + 0x178], r13
cmovbe esi, r8d
mov dword [rsp + 8], edx
mov r8d, 1
mov dword [rbx], esi
shl r8d, cl
cmp ecx, edx
jae 0x180021f86
nop dword [rax + rax]
mov eax, ecx
sub r8d, dword [rbp + rax*4 - 0x20]
js 0x180022294
inc ecx
add r8d, r8d
cmp ecx, edx
jb 0x180021f70
mov eax, edx
mov ecx, r8d
sub r8d, dword [rbp + rax*4 - 0x20]
mov dword [rsp + 0x20], r8d
js 0x180022294
mov dword [rbp + rax*4 - 0x20], ecx
mov ecx, r14d
mov dword [rbp + 0x24], r14d
lea r8, [rbp - 0x1c]
lea r9, [rbp + 0x28]
add edx, 0xffffffff
je 0x180021fc9
mov eax, dword [r8]
lea r9, [r9 + 4]
add ecx, eax
lea r8, [r8 + 4]
mov dword [r9 - 4], ecx
add edx, 0xffffffff
jne 0x180021fb3
mov edx, r14d
nop dword [rax]
mov eax, dword [r10]
lea r10, [r10 + 4]
test eax, eax
je 0x180021fed
lea rcx, [rbp + 0x20]
lea rcx, [rcx + rax*4]
mov eax, dword [rcx]
mov dword [r12 + rax*4], edx
inc eax
mov dword [rcx], eax
inc edx
cmp edx, r11d
jb 0x180021fd0
movsxd rcx, dword [rsp + 8]
mov r11d, esi
neg r11d
mov qword [rsp + 0x60], r14
mov rdx, r12
mov edi, r14d
mov qword [rsp + 0x10], rdx
mov r9, r14
mov eax, dword [rbp + rcx*4 + 0x20]
mov r10d, r14d
mov dword [rsp + 0x18], eax
mov dword [rbp + 0x20], r14d
cmp r15d, ecx
jg 0x18002227d
mov rbx, 0xffffffffffffffff
movsxd rax, r15d
lea r8, [rbp - 0x20]
mov r13d, dword [r8 + rax*4]
lea r8, [r8 + rax*4]
mov qword [rsp + 0x28], r8
test r13d, r13d
je 0x180022271
nop
mov r12d, r13d
lea eax, [rsi + r11]
dec r13d
cmp r15d, eax
jle 0x18002215b
nop dword [rax]
nop word [rax + rax]
mov r9d, ecx
inc rbx
mov r14d, r11d
mov edx, r15d
add r11d, esi
mov eax, 1
sub r9d, r11d
cmp r9d, esi
cmova r9d, esi
sub edx, r11d
mov ecx, edx
shl eax, cl
cmp eax, r12d
jbe 0x1800220c7
mov ecx, 0xffffffff
sub ecx, r13d
add eax, ecx
cmp edx, r9d
jae 0x1800220c7
inc edx
cmp edx, r9d
jae 0x1800220c7
mov ecx, dword [r8 + 4]
lea r8, [r8 + 4]
add eax, eax
cmp eax, ecx
jbe 0x1800220c7
sub eax, ecx
inc edx
cmp edx, r9d
jb 0x1800220b0
mov ecx, edx
mov r10d, 1
shl r10d, cl
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx]
lea r8d, [rax + r10]
cmp r8d, 0x5a0
ja 0x180022294
mov r9, qword [rsp + 0x38]
mov dword [rcx], r8d
lea r9, [r9 + rax*8]
mov qword [rsp + rbx*8 + 0x60], r9
test rbx, rbx
je 0x180022135
mov byte [rsp], dl
mov r8d, edi
mov rdx, qword [rsp + rbx*8 + 0x58]
mov rax, r9
sub rax, rdx
mov byte [rsp + 1], sil
sar rax, 3
mov ecx, r14d
shr r8d, cl
sub eax, r8d
mov dword [rbp + rbx*4 + 0x20], edi
mov dword [rsp + 4], eax
mov rax, qword [rsp]
mov qword [rdx + r8*8], rax
jmp 0x18002213d
mov rax, qword [rsp + 0x40]
mov qword [rax], r9
mov r8, qword [rsp + 0x28]
lea eax, [rsi + r11]
mov ecx, dword [rsp + 8]
cmp r15d, eax
jg 0x180022070
mov rdx, qword [rsp + 0x10]
xor r14d, r14d
mov r12, qword [rsp + 0x48]
movzx eax, r15b
sub al, r11b
mov byte [rsp + 1], al
mov eax, dword [rsp + 0x18]
lea rcx, [r12 + rax*4]
cmp rdx, rcx
jb 0x18002217e
mov byte [rsp], 0xc0
jmp 0x1800221d7
mov ecx, dword [rdx]
add rdx, 4
mov r12d, dword [rsp + 0x1c]
mov qword [rsp + 0x10], rdx
cmp ecx, r12d
jae 0x1800221ab
cmp ecx, 0x100
mov dword [rsp + 4], ecx
mov eax, 0x60
cmovb eax, r14d
mov byte [rsp], al
jmp 0x1800221d7
mov rax, qword [rbp + 0xd0]
sub ecx, r12d
mov qword [rsp + 0x10], rdx
lea rcx, [rcx*4]
movzx eax, byte [rcx + rax]
add al, 0x50
mov byte [rsp], al
mov rax, qword [rsp + 0x50]
mov eax, dword [rcx + rax]
mov dword [rsp + 4], eax
mov ecx, r15d
mov r8d, 1
sub ecx, r11d
mov edx, edi
shl r8d, cl
mov ecx, r11d
shr edx, cl
cmp edx, r10d
jae 0x18002220c
mov rax, qword [rsp]
nop word [rax + rax]
mov qword [r9 + rdx*8], rax
add edx, r8d
cmp edx, r10d
jb 0x180022200
lea ecx, [r15 - 1]
mov eax, 1
shl eax, cl
test edi, eax
je 0x180022228
nop dword [rax + rax]
xor edi, eax
shr eax, 1
test edi, eax
jne 0x180022220
xor edi, eax
mov ecx, r11d
mov eax, 1
shl eax, cl
dec eax
and eax, edi
cmp eax, dword [rbp + rbx*4 + 0x20]
je 0x18002225a
nop
sub r11d, esi
mov eax, 1
mov ecx, r11d
dec rbx
shl eax, cl
dec eax
and eax, edi
cmp eax, dword [rbp + rbx*4 + 0x20]
jne 0x180022240
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x28]
mov ecx, dword [rsp + 8]
test r13d, r13d
jne 0x180022050
inc r15d
cmp r15d, ecx
jle 0x180022031
cmp dword [rsp + 0x20], 0
je 0x18002228f
cmp ecx, 1
je 0x18002228f
mov r14d, 0xfffffffb
mov eax, r14d
jmp 0x180022299
mov eax, 0xfffffffd
mov r13, qword [rsp + 0x178]
mov rdi, qword [rsp + 0x180]
mov rsi, qword [rsp + 0x1c0]
mov r15, qword [rsp + 0x170]
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.180026070
add rsp, 0x188
pop r14
pop r12
pop rbx
pop rbp
ret