Function at 0x1400ba580
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x18
movzx eax, byte [rcx + 0x10]
mov rbp, r8
mov r15d, dword [rcx]
mov rsi, rdx
mov dword [rsp + 0x68], r15d
mov rbx, rcx
test al, al
jne 0x1400ba860
test r8, r8
je 0x1400ba5b6
movzx edi, word [r8 + 8]
jmp 0x1400ba5b8
xor edi, edi
movzx eax, byte [rcx + 0x11]
cmp al, 8
jae 0x1400ba74d
mov ecx, eax
sub ecx, 1
je 0x1400ba6df
sub ecx, 1
je 0x1400ba661
cmp ecx, 2
jne 0x1400ba739
lea eax, [r15 - 1]
and edi, 0xf
mov r8d, eax
lea r10, [rdx - 1]
and eax, 1
shr r8, 1
shl eax, 2
mov r14d, 4
mov r9d, r14d
imul edi, edi, 0x11
sub r9d, eax
add r8, rsi
add r10, r15
mov r11, r15
test r15d, r15d
je 0x1400ba739
nop dword [rax]
movzx edx, byte [r8]
lea r10, [r10 - 1]
movzx ecx, r9b
shr dl, cl
movzx eax, dl
shl dl, 4
and al, 0xf
xor al, dl
mov byte [r10 + 1], al
cmp r9d, r14d
lea rax, [r8 - 1]
cmovne rax, r8
mov r8, rax
xor eax, eax
cmp r9d, r14d
cmovne eax, r14d
mov r9d, eax
sub r11, 1
jne 0x1400ba620
jmp 0x1400ba739
lea eax, [r15 - 1]
and edi, 3
mov r9d, eax
lea r10, [rdx - 1]
and eax, 3
shr r9, 2
add eax, eax
imul edi, edi, 0x55
mov r8d, 6
add r9, rsi
sub r8d, eax
add r10, r15
mov r11, r15
test r15d, r15d
je 0x1400ba739
nop word [rax + rax]
movzx edx, byte [r9]
movzx ecx, r8b
shr dl, cl
and dl, 3
movzx eax, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
mov byte [r10], al
cmp r8d, 6
jne 0x1400ba6d0
xor r8d, r8d
dec r9
jmp 0x1400ba6d4
add r8d, 2
dec r10
sub r11, 1
jne 0x1400ba6a0
jmp 0x1400ba739
lea r9, [rdx - 1]
and edi, 1
lea eax, [r15 - 1]
imul edi, edi, 0xff
mov r8d, eax
mov edx, 7
shr r8, 3
and eax, 7
add r8, rsi
add r9, r15
sub edx, eax
mov r10, r15
test r15d, r15d
je 0x1400ba739
nop
movzx eax, byte [r8]
movzx ecx, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [r9], al
cmp edx, 7
jne 0x1400ba72e
xor edx, edx
dec r8
jmp 0x1400ba730
inc edx
dec r9
sub r10, 1
jne 0x1400ba710
lea r11, [rbx + 0x13]
mov byte [rbx + 0x11], 8
mov byte [r11], 8
mov al, 8
mov qword [rbx + 8], r15
jmp 0x1400ba751
lea r11, [rcx + 0x13]
mov r10, r15
test rbp, rbp
je 0x1400baa3b
cmp al, 8
jne 0x1400ba7b8
lea r8, [rsi - 1]
movzx ebp, dil
add r8, r15
lea r9, [rsi - 1]
lea r9, [r9 + r15*2]
test r15d, r15d
je 0x1400ba831
mov rdi, r15
mov esi, 0xff
nop word [rax + rax]
movzx eax, byte [r8]
lea r9, [r9 - 2]
xor ecx, ecx
lea r8, [r8 - 1]
cmp eax, ebp
cmovne ecx, esi
mov byte [r9 + 2], cl
movzx eax, byte [r8 + 1]
mov byte [r9 + 1], al
sub rdi, 1
jne 0x1400ba790
jmp 0x1400ba831
cmp al, 0x10
jne 0x1400ba831
mov rax, qword [rbx + 8]
lea rdx, [rsi - 1]
mov ebp, edi
movzx r14d, dil
shr ebp, 8
lea rcx, [rsi - 1]
add rdx, rax
lea rcx, [rcx + rax*2]
test r15d, r15d
je 0x1400ba831
mov rsi, r10
movzx eax, byte [rdx - 1]
mov rdi, rcx
cmp eax, ebp
jne 0x1400ba7fa
movzx eax, byte [rdx]
cmp eax, r14d
jne 0x1400ba7fa
dec rcx
xor al, al
jmp 0x1400ba7ff
dec rcx
mov al, 0xff
mov byte [rdi], al
mov r9, 0xffffffffffffffff
mov byte [rcx], al
mov r8, rcx
movzx eax, byte [rdx]
mov byte [r9 + rcx], al
lea rcx, [r9 + rcx]
movzx eax, byte [rdx - 1]
add rdx, 0xfffffffffffffffe
mov byte [rcx - 1], al
sub rcx, 2
sub rsi, 1
jne 0x1400ba7e0
lea r11, [rbx + 0x13]
movzx eax, byte [rbx + 0x11]
add al, al
mov byte [rbx + 0x10], 4
movzx ecx, al
mov byte [rbx + 0x12], 2
mov byte [r11], cl
cmp cl, 8
jb 0x1400ba857
shr rcx, 3
imul rcx, r10
jmp 0x1400baa37
imul rcx, r10
jmp 0x1400baa2f
cmp al, 2
jne 0x1400baa3b
test rbp, rbp
je 0x1400baa3b
movzx eax, byte [rcx + 0x11]
cmp al, 8
jne 0x1400ba908
mov rcx, qword [rcx + 8]
dec rdx
movzx edi, byte [r8 + 2]
dec rcx
movzx r14d, byte [r8 + 4]
add rcx, rsi
movzx ebp, byte [r8 + 6]
mov r11, r15
lea rdx, [rdx + r15*4]
test r15d, r15d
je 0x1400baa04
nop dword [rax]
cmp byte [rcx - 2], dil
jne 0x1400ba8c9
cmp byte [rcx - 1], r14b
lea r8, [rcx - 1]
jne 0x1400ba8c9
cmp byte [rcx], bpl
jne 0x1400ba8c9
xor al, al
jmp 0x1400ba8cf
mov al, 0xff
lea r8, [rcx - 1]
mov byte [rdx], al
mov r10, 0xffffffffffffffff
movzx eax, byte [rcx]
mov r9, rdx
lea rcx, [r8 - 2]
mov byte [r10 + rdx], al
lea rdx, [r10 + rdx]
movzx eax, byte [r8]
mov byte [rdx - 1], al
movzx eax, byte [r8 - 1]
mov byte [rdx - 2], al
sub rdx, 3
sub r11, 1
jne 0x1400ba8b0
jmp 0x1400baa04
cmp al, 0x10
jne 0x1400baa04
mov rcx, qword [rcx + 8]
dec rdx
movzx ebp, word [r8 + 6]
dec rcx
mov qword [rsp + 0x58], r12
add rcx, rsi
movzx r12d, word [r8 + 2]
mov qword [rsp + 0x10], r13
lea rdx, [rdx + r15*8]
movzx r13d, word [r8 + 4]
movzx edi, r12w
movzx r14d, r13w
mov word [rsp + 0x50], bp
shr r14w, 8
shr di, 8
shr bp, 8
mov qword [rsp], r15
test r15d, r15d
je 0x1400ba9fa
movzx r15d, word [rsp + 0x50]
mov r11, rdx
cmp byte [rcx - 5], dil
jne 0x1400ba998
cmp byte [rcx - 4], r12b
jne 0x1400ba998
cmp byte [rcx - 3], r14b
jne 0x1400ba998
cmp byte [rcx - 2], r13b
jne 0x1400ba998
cmp byte [rcx - 1], bpl
lea r8, [rcx - 1]
jne 0x1400ba998
cmp byte [rcx], r15b
jne 0x1400ba998
dec rdx
xor al, al
jmp 0x1400ba9a1
dec rdx
lea r8, [rcx - 1]
mov al, 0xff
mov byte [r11], al
mov r10, 0xffffffffffffffff
mov byte [rdx], al
mov r9, rdx
movzx eax, byte [rcx]
lea rcx, [r8 - 5]
mov byte [r10 + rdx], al
lea rdx, [r10 + rdx]
movzx eax, byte [r8]
mov byte [rdx - 1], al
movzx eax, byte [r8 - 1]
mov byte [rdx - 2], al
movzx eax, byte [r8 - 2]
mov byte [rdx - 3], al
movzx eax, byte [r8 - 3]
mov byte [rdx - 4], al
movzx eax, byte [r8 - 4]
mov byte [rdx - 5], al
sub rdx, 6
sub qword [rsp], 1
jne 0x1400ba967
mov r15d, dword [rsp + 0x68]
mov r12, qword [rsp + 0x58]
mov r13, qword [rsp + 0x10]
movzx eax, byte [rbx + 0x11]
shl al, 2
movzx ecx, al
mov byte [rbx + 0x10], 6
mov byte [rbx + 0x12], 4
mov byte [rbx + 0x13], cl
mov eax, r15d
cmp cl, 8
jb 0x1400baa2b
shr rcx, 3
imul rcx, rax
jmp 0x1400baa37
imul rcx, rax
add rcx, 7
shr rcx, 3
mov qword [rbx + 8], rcx
add rsp, 0x18
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret