Function at 0x1400058f0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
movdqa xmmword [rsp + 0x70], xmm8
movdqa xmmword [rsp + 0x60], xmm7
movaps xmmword [rsp + 0x50], xmm6
mov rdi, r8
mov r14, rdx
mov rbx, rcx
movabs rax, 0x517cc1b727220a95
cmp r8, 8
jb 0x140005954
lea rcx, [rdi - 8]
mov r10, rcx
shr r10, 3
inc r10
mov r8d, r10d
and r8d, 3
cmp rcx, 0x18
jae 0x14000595f
xor r15d, r15d
mov rcx, r14
mov rdx, rdi
jmp 0x1400059ad
xor r15d, r15d
mov rdx, rdi
mov rcx, r14
jmp 0x1400059db
and r10, 0xfffffffffffffffc
xor r15d, r15d
mov rcx, r14
mov rdx, rdi
nop dword [rax]
rol r15, 5
xor r15, qword [rcx]
imul r15, rax
rol r15, 5
xor r15, qword [rcx + 8]
imul r15, rax
rol r15, 5
xor r15, qword [rcx + 0x10]
imul r15, rax
rol r15, 5
xor r15, qword [rcx + 0x18]
imul r15, rax
add rdx, 0xffffffffffffffe0
add rcx, 0x20
add r10, 0xfffffffffffffffc
jne 0x140005970
test r8, r8
je 0x1400059db
shl r8, 3
xor r10d, r10d
nop dword [rax]
rol r15, 5
xor r15, qword [rcx + r10]
imul r15, rax
add r10, 8
cmp r8, r10
jne 0x1400059c0
add rcx, r10
sub rdx, r10
cmp rdx, 3
ja 0x140005b43
cmp rdx, 1
ja 0x140005b63
test rdx, rdx
je 0x140005a02
movzx ecx, byte [rcx]
rol r15, 5
xor r15, rcx
imul r15, rax
mov word [rsp + 0x2e], r9w
rol r15, 5
xor r15, 0xff
imul r15, rax
cmp qword [rbx + 0x10], 0
je 0x140005bf1
mov r12, qword [rbx]
mov qword [rsp + 0x40], rbx
mov rbp, qword [rbx + 8]
mov rax, r15
shr rax, 0x39
mov qword [rsp + 0x38], rax
movd xmm0, eax
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm6, xmm0, 0
xor eax, eax
mov qword [rsp + 0x30], rax
pcmpeqd xmm7, xmm7
xor r13d, r13d
and r15, rbp
movdqu xmm8, xmmword [r12 + r15]
movdqa xmm0, xmm6
pcmpeqb xmm0, xmm8
pmovmskb esi, xmm0
test esi, esi
jne 0x140005adc
cmp r13, 1
mov r13d, 1
je 0x140005a9d
pmovmskb eax, xmm8
xor r13d, r13d
test eax, eax
setne r13b
tzcnt eax, eax
add rax, r15
and rax, rbp
mov qword [rsp + 0x48], rax
pcmpeqb xmm8, xmm7
pmovmskb eax, xmm8
test eax, eax
jne 0x140005b88
mov rax, qword [rsp + 0x30]
add r15, rax
add r15, 0x10
add rax, 0x10
mov qword [rsp + 0x30], rax
jmp 0x140005a5a
lea eax, [rsi - 1]
and eax, esi
mov esi, eax
test ax, ax
je 0x140005a74
tzcnt eax, esi
add rax, r15
and rax, rbp
neg rax
lea rax, [rax + rax*2]
cmp qword [r12 + rax*8 - 0x10], rdi
jne 0x140005ad0
lea rbx, [r12 + rax*8]
mov rdx, qword [rbx - 0x18]
mov rcx, r14
mov r8, rdi
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x140005ad0
movzx edx, word [rbx - 8]
add rbx, 0xfffffffffffffff8
mov ax, 1
movzx ecx, word [rsp + 0x2e]
mov word [rbx], cx
movaps xmm6, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x60]
movaps xmm8, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, dword [rcx]
rol r15, 5
xor r15, r8
imul r15, rax
add rdx, 0xfffffffffffffffc
add rcx, 4
cmp rdx, 1
jbe 0x1400059ef
movzx r8d, word [rcx]
rol r15, 5
xor r15, r8
imul r15, rax
add rdx, 0xfffffffffffffffe
add rcx, 2
test rdx, rdx
jne 0x1400059f4
jmp 0x140005a02
mov r8, qword [rsp + 0x48]
movzx eax, byte [r12 + r8]
test al, al
js 0x140005baa
movdqa xmm0, xmmword [r12]
pmovmskb eax, xmm0
tzcnt r8d, eax
movzx eax, byte [r12 + r8]
and al, 1
movzx eax, al
mov rcx, qword [rsp + 0x40]
sub qword [rcx + 0x10], rax
lea rax, [r8 - 0x10]
and rax, rbp
mov rdx, qword [rsp + 0x38]
mov byte [r12 + r8], dl
mov byte [rax + r12 + 0x10], dl
inc qword [rcx + 0x18]
neg r8
lea rax, [r8 + r8*2]
mov qword [r12 + rax*8 - 0x18], r14
mov qword [r12 + rax*8 - 0x10], rdi
lea rbx, [r12 + rax*8]
add rbx, 0xfffffffffffffff8
xor eax, eax
jmp 0x140005b17
mov edx, 1
mov rcx, rbx
mov r8, rbx
call fcn.1400284c0
jmp 0x140005a22