Function at 0x140021c70
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x28
movzx eax, byte [rdx + 1]
mov r13, rdx
movsx ebx, byte [rdx]
movzx r10d, cx
mov r9d, 1
cmp al, 0x30
jl 0x140021cd6
mov ecx, 0xff
nop word [rax + rax]
movsx eax, al
add bx, bx
xor bx, ax
inc r9w
movzx eax, bx
and bx, cx
shr ax, 8
xor bx, ax
movsx rax, r9w
movzx eax, byte [rax + rdx]
cmp al, 0x30
jge 0x140021cb0
movzx edi, r10w
lea rcx, [0x14007a390]
and edi, 0x7fff
mov eax, 0xaaaaaaab
mul edi
mov esi, edx
shr esi, 1
lea eax, [rsi + rsi*2]
add si, si
sub edi, eax
mov word [rbp - 0x24], si
movzx r8d, si
movzx r9d, dil
test di, di
je 0x140021d35
mov eax, r8d
shr eax, 1
lea edx, [rax + rax*2]
add rdx, rcx
movzx ecx, byte [rdx + 2]
movzx eax, byte [rdx + 1]
shl ecx, 8
add ecx, eax
movzx eax, byte [rdx]
shl ecx, 8
add ecx, eax
mov dword [rbp - 0x28], ecx
lea rcx, [0x14007a390]
xor r11d, r11d
test r9b, r9b
jne 0x140021d68
shr r8d, 1
lea edx, [r8 + r8*2]
add rdx, rcx
movzx eax, byte [rdx + 1]
movzx ecx, byte [rdx + 2]
shl ecx, 8
add ecx, eax
movzx eax, byte [rdx]
shl ecx, 8
add ecx, eax
inc di
mov dword [rbp - 0x28], ecx
mov word [rbp - 0x22], di
jmp 0x140021d88
cmp r9b, 2
jae 0x140021d77
inc di
mov word [rbp - 0x22], di
jmp 0x140021d88
add si, 2
mov word [rbp - 0x22], r11w
mov word [rbp - 0x24], si
movzx edi, r11w
movzx eax, r9b
lea r14d, [r10 + 1]
lea r9, [0x14007a390]
movzx r8d, byte [rbp + rax - 0x28]
mov eax, 0xaaaaaaab
add r14d, r8d
and r14d, 0x7fff
mul r14d
mov r15d, edx
shr r15d, 1
lea eax, [r15 + r15*2]
add r15w, r15w
sub r14d, eax
mov word [rbp - 0x1c], r15w
mov word [rbp - 0x1a], r14w
test r14w, r14w
je 0x140021df9
movzx eax, r15w
shr eax, 1
lea eax, [rax + rax*2]
movzx ecx, byte [rax + r9 + 2]
shl ecx, 8
mov edx, eax
movzx eax, byte [rax + r9 + 1]
add ecx, eax
shl ecx, 8
movzx eax, byte [rdx + r9]
add ecx, eax
mov dword [rbp - 0x20], ecx
mov eax, r8d
movzx r12d, r11w
mov dword [rbp + 0x50], eax
mov r10d, 0xffffffff
test r8d, r8d
je 0x14002204d
movzx r8d, byte [rbp - 0x22]
test r8b, r8b
jne 0x140021e4d
movzx eax, si
shr eax, 1
lea eax, [rax + rax*2]
movzx ecx, byte [rax + r9 + 2]
shl ecx, 8
mov edx, eax
movzx eax, byte [rax + r9 + 1]
add ecx, eax
shl ecx, 8
movzx eax, byte [rdx + r9]
add ecx, eax
inc di
mov dword [rbp - 0x28], ecx
mov word [rbp - 0x22], di
jmp 0x140021e6d
cmp r8b, 2
jae 0x140021e5c
inc di
mov word [rbp - 0x22], di
jmp 0x140021e6d
add si, 2
mov word [rbp - 0x22], r11w
mov word [rbp - 0x24], si
movzx edi, r11w
movzx eax, r8b
movzx r8d, byte [rbp - 0x1a]
movzx edx, byte [rbp + rax - 0x28]
mov word [rbp + 0x48], dx
test r8b, r8b
jne 0x140021eb7
movzx eax, r15w
shr eax, 1
lea edx, [rax + rax*2]
add rdx, r9
movzx eax, byte [rdx + 1]
movzx ecx, byte [rdx + 2]
shl ecx, 8
add ecx, eax
movzx eax, byte [rdx]
movzx edx, word [rbp + 0x48]
shl ecx, 8
add ecx, eax
inc r14w
mov dword [rbp - 0x20], ecx
mov word [rbp - 0x1a], r14w
jmp 0x140021edb
cmp r8b, 2
jae 0x140021ec8
inc r14w
mov word [rbp - 0x1a], r14w
jmp 0x140021edb
add r15w, 2
mov word [rbp - 0x1a], r11w
mov word [rbp - 0x1c], r15w
movzx r14d, r11w
movzx eax, r8b
movzx ecx, byte [rbp + rax - 0x20]
cmp cx, bx
jne 0x14002201d
lea eax, [rdx + 0x29]
add ax, ax
movzx eax, ax
shr eax, 1
lea eax, [rax + rax*2]
movzx ecx, byte [rax + r9 + 2]
shl ecx, 8
mov edx, eax
movzx eax, byte [rax + r9 + 1]
add ecx, eax
shl ecx, 8
movzx eax, byte [rdx + r9]
add ecx, eax
mov eax, 0xaaaaaaab
mov dword [rbp + 0x60], ecx
and ecx, 0x7fff
mul ecx
mov r10d, edx
shr r10d, 1
lea eax, [r10 + r10*2]
add r10w, r10w
sub ecx, eax
mov word [rbp - 0x14], r10w
movzx r9d, cl
test cx, cx
je 0x140021f75
movzx eax, r10w
shr eax, 1
lea r8d, [rax + rax*2]
lea rax, [0x14007a390]
add r8, rax
movzx eax, byte [r8 + 1]
movzx edx, byte [r8 + 2]
shl edx, 8
add edx, eax
movzx eax, byte [r8]
shl edx, 8
add edx, eax
mov dword [rbp - 0x18], edx
mov r11d, 0xffffffff
nop dword [rax + rax]
inc r11w
test r9b, r9b
jne 0x140021fc5
movzx eax, r10w
shr eax, 1
lea r8d, [rax + rax*2]
lea rax, [0x14007a390]
add r8, rax
movzx eax, byte [r8 + 1]
movzx edx, byte [r8 + 2]
shl edx, 8
add edx, eax
movzx eax, byte [r8]
shl edx, 8
add edx, eax
inc cx
mov dword [rbp - 0x18], edx
mov word [rbp - 0x12], cx
movzx r8d, cl
jmp 0x140021fee
cmp r9b, 2
jae 0x140021fd8
inc cx
mov word [rbp - 0x12], cx
movzx r8d, cl
jmp 0x140021fee
xor eax, eax
add r10w, 2
mov word [rbp - 0x14], r10w
movzx ecx, ax
mov word [rbp - 0x12], ax
xor r8b, r8b
movzx eax, r9b
movzx edx, byte [rbp + rax - 0x18]
movsx rax, r11w
movzx eax, byte [rax + r13]
cmp dl, al
jne 0x140022012
movzx r9d, r8b
test dl, dl
jne 0x140021f80
jmp 0x140022016
test dl, dl
jne 0x14002201a
cmp al, 0x30
jl 0x140022036
xor r11d, r11d
inc r12w
movsx eax, r12w
cmp eax, dword [rbp + 0x50]
jge 0x140022047
lea r9, [0x14007a390]
jmp 0x140021e12
mov rax, qword [rbp + 0x58]
movzx ecx, word [rbp + 0x62]
mov word [rax], cx
movzx eax, word [rbp + 0x48]
jmp 0x140022051
mov r10d, 0xffffffff
movzx eax, r10w
add rsp, 0x28
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret