Function at 0x140016750
Capabilities:
Encode data using xor

Disassembly:
push rbx
sub rsp, 0x20
add qword [rcx + 0xb0], 0xfffffffffffffffc
lea r8, [rcx + 0xb8]
mov r10, qword [rcx + 0xb0]
mov rbx, rcx
mov edx, 0xffffffff
mov r9, r10
test r10, r10
je 0x1400167ab
lea r11, [0x14006aec0]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8]
lea r8, [r8 + 1]
movzx ecx, dl
xor rcx, rax
shr edx, 8
xor edx, dword [r11 + rcx*4]
sub r9, 1
jne 0x140016790
movzx eax, byte [r10 + rbx + 0xba]
not edx
movzx ecx, byte [r10 + rbx + 0xbb]
shl ecx, 8
or ecx, eax
mov qword [rsp + 0x30], rsi
movzx eax, byte [r10 + rbx + 0xb9]
shl ecx, 8
or ecx, eax
mov qword [rsp + 0x38], rdi
movzx eax, byte [r10 + rbx + 0xb8]
shl ecx, 8
or ecx, eax
cmp edx, ecx
jne 0x14001686d
mov edx, 2
mov qword [rbx + 0xa8], rdx
movzx r11d, byte [rbx + 0xb9]
test r11b, 0x3f
jne 0x140016a5c
xor esi, esi
lea r8, [rdx - 3]
test r11b, 0x40
je 0x14001688d
mov ecx, dword [rbx + 4]
test ecx, ecx
jne 0x140016823
mov qword [rbx + 8], rsi
cmp r10, rdx
jbe 0x14001686d
nop dword [rax + rax]
movzx r9d, byte [rdx + rbx + 0xb8]
lea rax, [rdx + 1]
mov qword [rbx + 0xa8], rax
mov rdx, rax
mov eax, r9d
and eax, 0x7f
shl rax, cl
or rax, qword [rbx + 8]
mov qword [rbx + 8], rax
test r9b, r9b
jns 0x140016882
add ecx, 7
mov dword [rbx + 4], ecx
cmp ecx, 0x3f
je 0x14001686d
cmp rdx, r10
jb 0x140016830
mov eax, 7
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
jne 0x140016888
test ecx, ecx
jne 0x14001686d
mov dword [rbx + 4], esi
jmp 0x140016890
mov rax, r8
mov qword [rbx + 0x30], rax
test r11b, r11b
jns 0x140016900
mov ecx, dword [rbx + 4]
test ecx, ecx
jne 0x1400168a4
mov qword [rbx + 8], rsi
cmp rdx, r10
jae 0x14001686d
nop dword [rax]
movzx r9d, byte [rdx + rbx + 0xb8]
lea rax, [rdx + 1]
mov r8d, r9d
mov qword [rbx + 0xa8], rax
and r8d, 0x7f
mov rdx, rax
shl r8, cl
or r8, qword [rbx + 8]
mov qword [rbx + 8], r8
test r9b, r9b
jns 0x1400168f3
add ecx, 7
mov dword [rbx + 4], ecx
cmp ecx, 0x3f
je 0x14001686d
cmp rax, r10
jb 0x1400168b0
jmp 0x14001686d
jne 0x1400168fd
test ecx, ecx
jne 0x14001686d
mov dword [rbx + 4], esi
mov rax, r10
mov qword [rbx + 0x38], r8
sub rax, rdx
mov rcx, r10
cmp rax, 2
jb 0x14001686d
movzx eax, byte [rdx + rbx + 0xb8]
inc rdx
mov qword [rbx + 0xa8], rdx
cmp al, 0x21
jne 0x140016a5c
movzx eax, byte [rdx + rbx + 0xb8]
inc rdx
mov qword [rbx + 0xa8], rdx
cmp al, 1
jne 0x140016a5c
sub rcx, rdx
cmp rcx, 1
jb 0x14001686d
movzx ecx, byte [rdx + rbx + 0xb8]
lea rax, [rdx + 1]
mov rdi, qword [rbx + 0x4b8]
mov qword [rbx + 0xa8], rax
cmp cl, 0x27
ja 0x140016a5c
mov edx, ecx
shr ecx, 1
and edx, 1
add ecx, 0xb
add edx, 2
shl edx, cl
mov ecx, dword [rdi + 0x64]
mov dword [rdi + 0x58], edx
test ecx, ecx
je 0x1400169f7
cmp edx, dword [rdi + 0x5c]
jbe 0x1400169ae
mov eax, 4
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov eax, edx
mov qword [rdi + 0x50], rax
cmp ecx, 2
jne 0x1400169f7
cmp dword [rdi + 0x60], edx
jae 0x1400169f7
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x1400169cf
call fcn.14002da28
mov edx, dword [rdi + 0x58]
mov ecx, edx
call fcn.14002da3c
mov qword [rdi + 0x28], rax
test rax, rax
jne 0x1400169f7
mov dword [rdi + 0x60], esi
mov eax, 3
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov dword [rdi + 0x90], esi
mov dword [rdi + 0x68], esi
mov byte [rdi + 0x78], 1
mov dword [rdi + 0x6f0c], esi
mov rdx, qword [rbx + 0xb0]
mov rcx, qword [rbx + 0xa8]
cmp rcx, rdx
jae 0x140016a3b
nop dword [rax]
movzx eax, byte [rcx + rbx + 0xb8]
inc rcx
mov qword [rbx + 0xa8], rcx
test al, al
jne 0x140016a5c
cmp rcx, rdx
jb 0x140016a20
mov qword [rbx + 0xa8], rsi
xor eax, eax
mov qword [rbx + 0x48], rsi
mov qword [rbx + 0x50], rsi
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
mov rdi, qword [rsp + 0x38]
mov eax, 6
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret