Function at 0x140020f20
Capabilities:
Encode data using xor

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov rsi, rcx
mov edx, dword [rcx + 0x14]
mov ecx, dword [rcx + 0x20]
cmp edx, ecx
jbe 0x14002112b
mov eax, dword [rsi + 0x24]
test eax, eax
je 0x14002112b
mov r10, qword [rsi]
lea r9d, [rcx + 1]
mov dword [rsi + 0x20], r9d
mov r8d, dword [rsi + 0x1c]
cmp eax, 0x3f
ja 0x140021119
mov r10, qword [r10 + rcx*8]
mov ecx, 0x38
sub ecx, eax
mov r11d, r8d
shl r11d, 8
movzx ebp, r11w
mov r11, r10
shr r11, cl
shr r8d, 8
xor edi, edi
cmp ecx, 0x40
movzx ecx, r11b
cmovae ecx, edi
xor ecx, r8d
lea r11, [0x140098720]
movzx ebx, word [r11 + rcx*2]
mov r8d, ebp
xor r8d, ebx
cmp eax, 0x37
ja 0x140021119
mov ecx, 0x30
sub ecx, eax
shl ebx, 8
movzx ebx, bx
shr r8d, 8
mov r14, r10
shr r14, cl
cmp ecx, 0x40
movzx ecx, r14b
cmovb edi, ecx
xor edi, r8d
movzx edi, word [r11 + rdi*2]
mov r8d, ebx
xor r8d, edi
cmp eax, 0x2f
ja 0x140021119
mov ecx, 0x28
sub ecx, eax
shl edi, 8
mov rbx, r10
shr rbx, cl
movzx ebp, di
shr r8d, 8
xor edi, edi
cmp ecx, 0x40
movzx ecx, bl
cmovae ecx, edi
xor ecx, r8d
movzx ebx, word [r11 + rcx*2]
mov r8d, ebp
xor r8d, ebx
cmp eax, 0x27
ja 0x140021119
mov ecx, 0x20
sub ecx, eax
shl ebx, 8
movzx ebx, bx
shr r8d, 8
mov r14, r10
shr r14, cl
cmp ecx, 0x40
movzx ecx, r14b
cmovb edi, ecx
xor edi, r8d
movzx edi, word [r11 + rdi*2]
mov r8d, ebx
xor r8d, edi
cmp eax, 0x1f
ja 0x140021119
mov ecx, 0x18
sub ecx, eax
shl edi, 8
mov rbx, r10
shr rbx, cl
movzx ebp, di
shr r8d, 8
xor edi, edi
cmp ecx, 0x40
movzx ecx, bl
cmovae ecx, edi
xor ecx, r8d
movzx ebx, word [r11 + rcx*2]
mov r8d, ebp
xor r8d, ebx
cmp eax, 0x17
ja 0x140021119
mov ecx, 0x10
sub ecx, eax
shl ebx, 8
movzx ebx, bx
shr r8d, 8
mov r14, r10
shr r14, cl
cmp ecx, 0x40
movzx ecx, r14b
cmovb edi, ecx
xor edi, r8d
movzx edi, word [r11 + rdi*2]
mov r8d, ebx
xor r8d, edi
cmp eax, 0xf
ja 0x140021119
mov ecx, 8
sub ecx, eax
shl edi, 8
mov rbx, r10
shr rbx, cl
movzx ebp, di
shr r8d, 8
xor edi, edi
cmp ecx, 0x40
movzx ecx, bl
cmovae ecx, edi
xor ecx, r8d
movzx ebx, word [r11 + rcx*2]
mov r8d, ebp
xor r8d, ebx
cmp eax, 7
ja 0x140021119
neg eax
shl ebx, 8
shr r8d, 8
mov ecx, eax
shr r10, cl
cmp eax, 0x40
movzx eax, r10b
cmovb edi, eax
movzx eax, bx
xor edi, r8d
movzx r8d, word [r11 + rdi*2]
xor r8d, eax
mov dword [rsi + 0x1c], r8d
mov dword [rsi + 0x24], 0
sub edx, r9d
ja 0x140021133
jmp 0x14002114d
mov r9d, ecx
sub edx, r9d
jbe 0x14002114d
movzx r8d, word [rsi + 0x1c]
mov ecx, r9d
shl rcx, 3
add rcx, qword [rsi]
call fcn.140024440
movzx eax, ax
mov dword [rsi + 0x1c], eax
mov dword [rsi + 0x20], 0
mov eax, dword [rsi + 0x18]
test eax, eax
je 0x1400211b5
mov edx, dword [rsi + 0x24]
cmp edx, eax
jae 0x1400211b5
mov rcx, qword [rsi]
mov r8d, dword [rsi + 0x14]
mov r8, qword [rcx + r8*8]
mov r9d, dword [rsi + 0x1c]
mov ecx, 0x38
sub ecx, edx
lea r10, [0x140098720]
nop
mov r11d, r9d
shl r11d, 8
movzx r11d, r11w
shr r9d, 8
mov rdi, r8
shr rdi, cl
movzx edi, dil
xor edi, r9d
movzx r9d, word [r10 + rdi*2]
xor r9d, r11d
mov dword [rsi + 0x1c], r9d
add edx, 8
mov dword [rsi + 0x24], edx
add ecx, 0xfffffff8
cmp edx, eax
jb 0x140021180
movzx eax, word [rsi + 0x1c]
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret