Function at 0x1400ba764
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov ebx, r9d
mov r15, r8
mov r14d, edx
mov rdi, rcx
mov ecx, edx
sub ecx, 0xe
je 0x1400ba947
sub ecx, 1
je 0x1400ba89b
sub ecx, 1
je 0x1400ba7f6
cmp ecx, 1
je 0x1400ba7cf
test r9d, r9d
je 0x1400ba9f2
mov edx, r14d
mov rcx, r15
call fcn.14008e008
add ebx, 0xffffffff
jne 0x1400ba7ba
jmp 0x1400ba9f2
mov qword [rbp - 0x10], r15
mov byte [rbp - 8], 0
test r9d, r9d
je 0x1400ba7f1
mov byte [rbp - 8], 0
lea rdx, [rbp - 0x18]
mov rcx, r15
call fcn.140095590
add ebx, 0xffffffff
jne 0x1400ba7dc
jmp 0x1400ba9f2
mov qword [rbp - 0x10], r15
mov byte [rbp - 8], 0
and dword [rbp + 0x28], 0
mov r9, rbx
mov rbx, qword [rdi + 8]
mov r14, qword [rdi]
mov rax, rbx
sub rax, r14
sar rax, 2
cmp r9, rax
jae 0x1400ba83b
lea rax, [r14 + r9*4]
cmp rax, r14
jne 0x1400ba82d
mov qword [rdi + 8], r14
mov rbx, r14
jmp 0x1400ba85f
cmp rax, rbx
je 0x1400ba85f
mov rbx, rax
mov qword [rdi + 8], rax
jmp 0x1400ba85f
jbe 0x1400ba85f
sub r9, rax
lea rax, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rbp - 0x18]
mov rcx, rdi
call fcn.1400bd030
mov rbx, qword [rdi + 8]
mov r14, qword [rdi]
cmp r14, rbx
je 0x1400ba896
mov r12d, 1
mov rdi, r14
add r14, 4
mov byte [rbp - 8], 0
lea rdx, [rbp + 0x28]
mov rcx, r15
call fcn.140088c48
mov eax, dword [rbp + 0x28]
mov ecx, eax
shr ecx, 1
and eax, r12d
neg eax
xor ecx, eax
mov dword [rdi], ecx
cmp r14, rbx
jne 0x1400ba86a
jmp 0x1400ba9f2
mov qword [rbp - 0x10], r15
mov byte [rbp - 8], 0
and dword [rbp + 0x28], 0
mov r9, rbx
mov rbx, qword [rdi + 8]
mov r14, qword [rdi]
mov rax, rbx
sub rax, r14
sar rax, 2
cmp r9, rax
jae 0x1400ba8e0
lea rax, [r14 + r9*4]
cmp rax, r14
jne 0x1400ba8d2
mov qword [rdi + 8], r14
mov rbx, r14
jmp 0x1400ba904
cmp rax, rbx
je 0x1400ba904
mov rbx, rax
mov qword [rdi + 8], rax
jmp 0x1400ba904
jbe 0x1400ba904
sub r9, rax
lea rax, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rbp - 0x18]
mov rcx, rdi
call fcn.1400bd030
mov rbx, qword [rdi + 8]
mov r14, qword [rdi]
cmp r14, rbx
je 0x1400ba942
mov r12d, 1
mov rdi, r14
add r14, 4
mov byte [rbp - 8], 0
lea rdx, [rbp + 0x28]
mov rcx, r15
call fcn.14009d900
movzx eax, word [rbp + 0x28]
movzx ecx, ax
shr cx, 1
and ax, r12w
neg ax
xor ax, cx
cwde
mov dword [rdi], eax
cmp r14, rbx
jne 0x1400ba90f
jmp 0x1400ba9f2
mov qword [rbp - 0x10], r15
mov byte [rbp - 8], 0
and dword [rbp + 0x28], 0
mov rdx, rbx
mov rax, qword [rdi + 8]
mov r9, qword [rdi]
mov rcx, rax
sub rcx, r9
sar rcx, 2
cmp rbx, rcx
jae 0x1400ba98c
lea rcx, [r9 + rbx*4]
cmp rcx, r9
jne 0x1400ba97e
mov qword [rdi + 8], r9
mov rax, r9
jmp 0x1400ba9b3
cmp rcx, rax
je 0x1400ba9b3
mov rax, rcx
mov qword [rdi + 8], rcx
jmp 0x1400ba9b3
jbe 0x1400ba9b3
sub rdx, rcx
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x20], rcx
mov r9, rdx
mov r8, rax
lea rdx, [rbp - 0x18]
mov rcx, rdi
call fcn.1400bd030
mov rax, qword [rdi + 8]
mov r9, qword [rdi]
cmp r9, rax
je 0x1400ba9f2
mov r12d, 1
mov r11, r9
add r9, 4
mov byte [rbp - 8], 0
mov ecx, dword [r15 + 0x18]
mov r10d, dword [r15 + 0x20]
sub ecx, r10d
cmp ecx, r12d
jb 0x1400baa0d
mov rdx, qword [r15 + 0x10]
movsx r8d, byte [r10 + rdx]
lea ecx, [r10 + 1]
mov dword [r15 + 0x20], ecx
mov dword [r11], r8d
cmp r9, rax
jne 0x1400ba9be
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov edx, r12d
mov rcx, r15
call fcn.14006d590
int3