Function at 0x140020840
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 0x14002089b
lea r11, [0x140056cf0]
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 0x140020880
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 0x14002095d
mov edx, 2
mov qword [rbx + 0xa8], rdx
movzx r11d, byte [rbx + 0xb9]
test r11b, 0x3f
jne 0x140020b4c
xor esi, esi
lea r8, [rdx - 3]
test r11b, 0x40
je 0x14002097d
mov ecx, dword [rbx + 4]
test ecx, ecx
jne 0x140020913
mov qword [rbx + 8], rsi
cmp r10, rdx
jbe 0x14002095d
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 0x140020972
add ecx, 7
mov dword [rbx + 4], ecx
cmp ecx, 0x3f
je 0x14002095d
cmp rdx, r10
jb 0x140020920
mov eax, 7
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
jne 0x140020978
test ecx, ecx
jne 0x14002095d
mov dword [rbx + 4], esi
jmp 0x140020980
mov rax, r8
mov qword [rbx + 0x30], rax
test r11b, r11b
jns 0x1400209f0
mov ecx, dword [rbx + 4]
test ecx, ecx
jne 0x140020994
mov qword [rbx + 8], rsi
cmp rdx, r10
jae 0x14002095d
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 0x1400209e3
add ecx, 7
mov dword [rbx + 4], ecx
cmp ecx, 0x3f
je 0x14002095d
cmp rax, r10
jb 0x1400209a0
jmp 0x14002095d
jne 0x1400209ed
test ecx, ecx
jne 0x14002095d
mov dword [rbx + 4], esi
mov rax, r10
mov qword [rbx + 0x38], r8
sub rax, rdx
mov rcx, r10
cmp rax, 2
jb 0x14002095d
movzx eax, byte [rdx + rbx + 0xb8]
inc rdx
mov qword [rbx + 0xa8], rdx
cmp al, 0x21
jne 0x140020b4c
movzx eax, byte [rdx + rbx + 0xb8]
inc rdx
mov qword [rbx + 0xa8], rdx
cmp al, 1
jne 0x140020b4c
sub rcx, rdx
cmp rcx, 1
jb 0x14002095d
movzx ecx, byte [rdx + rbx + 0xb8]
lea rax, [rdx + 1]
mov rdi, qword [rbx + 0x4b8]
mov qword [rbx + 0xa8], rax
cmp cl, 0x27
ja 0x140020b4c
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 0x140020ae7
cmp edx, dword [rdi + 0x5c]
jbe 0x140020a9e
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 0x140020ae7
cmp dword [rdi + 0x60], edx
jae 0x140020ae7
mov rcx, qword [rdi + 0x28]
test rcx, rcx
je 0x140020abf
call fcn.1400284f4
mov edx, dword [rdi + 0x58]
mov ecx, edx
call fcn.1400286b8
mov qword [rdi + 0x28], rax
test rax, rax
jne 0x140020ae7
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 0x140020b2b
nop dword [rax]
movzx eax, byte [rcx + rbx + 0xb8]
inc rcx
mov qword [rbx + 0xa8], rcx
test al, al
jne 0x140020b4c
cmp rcx, rdx
jb 0x140020b10
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