Function at 0x5d07b0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r12, qword [rcx + 0x70]
mov r14, rdx
mov edx, dword [r12 + 0x70]
mov r15, r8
mov r13, r9
test edx, edx
jne 0x5d08d8
mov ebp, dword [r12 + 0x20]
mov eax, r13d
mov dword [rsp + 0x3c], r13d
and r13, 0xffffffffffffffc0
and eax, 0x3f
mov dword [rsp + 0x38], eax
cmp r13, 0x3f
jbe 0x5d08b3
movabs rsi, 0x40000003f
lea rdi, [r12 + 0x20]
jmp 0x5d0864
mov r8, r13
shr r8, 6
mov edx, r8d
add edx, ebp
mov rbp, rdx
cmp rdx, r8
jae 0x5d087e
sub r8, rdx
mov qword [rsp + 0x20], rdi
mov rdx, r15
mov rcx, r14
mov rbx, r8
mov r9, r12
shl rbx, 6
mov r8, rbx
sub r13, rbx
add r15, rbx
add r14, rbx
call sym.ChaCha20_ctr32
mov dword [r12 + 0x20], 0
add dword [r12 + 0x24], 1
xor ebp, ebp
cmp r13, 0x3f
jbe 0x5d08b3
cmp r13, rsi
jbe 0x5d0810
mov edx, 0x10000000
mov r8d, 0x10000000
add edx, ebp
mov rbp, rdx
cmp rdx, r8
jb 0x5d0824
mov rbx, r8
mov qword [rsp + 0x20], rdi
mov rdx, r15
mov rcx, r14
shl rbx, 6
mov r9, r12
mov r8, rbx
sub r13, rbx
add r15, rbx
add r14, rbx
call sym.ChaCha20_ctr32
mov dword [r12 + 0x20], ebp
test ebp, ebp
je 0x5d0856
cmp r13, 0x3f
ja 0x5d0864
mov eax, dword [rsp + 0x38]
test eax, eax
jne 0x5d0950
mov eax, 1
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp edx, 0x3f
ja 0x5d090d
test r9, r9
je 0x5d090d
nop word [rax + rax]
mov ecx, edx
movzx eax, byte [r15]
add r14, 1
add r15, 1
xor al, byte [r12 + rcx + 0x30]
add edx, 1
mov byte [r14 - 1], al
sub r13, 1
je 0x5d090d
cmp edx, 0x3f
jbe 0x5d08e8
mov dword [r12 + 0x70], edx
test r13, r13
je 0x5d08bf
mov ebp, dword [r12 + 0x20]
cmp edx, 0x40
jne 0x5d07df
mov dword [r12 + 0x70], 0
add ebp, 1
mov dword [r12 + 0x20], ebp
jne 0x5d07df
add dword [r12 + 0x24], 1
jmp 0x5d07df
lea rax, [r12 + 0x20]
lea rbx, [r12 + 0x30]
mov qword [r12 + 0x30], 0
mov r9, r12
mov qword [r12 + 0x38], 0
mov rdx, rbx
mov rcx, rbx
mov r8d, 0x40
mov qword [r12 + 0x40], 0
mov qword [r12 + 0x48], 0
mov qword [r12 + 0x50], 0
mov qword [r12 + 0x58], 0
mov qword [r12 + 0x60], 0
mov qword [r12 + 0x68], 0
mov qword [rsp + 0x20], rax
call sym.ChaCha20_ctr32
lea rdx, [r14 + 0x10]
lea rcx, [r12 + 0x40]
mov edi, dword [rsp + 0x38]
cmp rbx, rdx
setae dl
cmp r14, rcx
lea eax, [rdi - 1]
setae cl
or edx, ecx
cmp eax, 0xe
seta cl
test dl, cl
je 0x5d0bbe
lea rdx, [r14 + 0xf]
sub rdx, r15
cmp rdx, 0x1e
jbe 0x5d0bbe
movdqu xmm0, xmmword [r15]
movdqu xmm1, xmmword [r12 + 0x30]
mov eax, edi
shr eax, 4
pxor xmm0, xmm1
movups xmmword [r14], xmm0
cmp eax, 1
je 0x5d0a47
movdqu xmm0, xmmword [r15 + 0x10]
movdqu xmm2, xmmword [r12 + 0x40]
pxor xmm0, xmm2
movups xmmword [r14 + 0x10], xmm0
cmp eax, 3
jne 0x5d0a47
movdqu xmm0, xmmword [r12 + 0x50]
movdqu xmm3, xmmword [r15 + 0x20]
pxor xmm0, xmm3
movups xmmword [r14 + 0x20], xmm0
mov ecx, dword [rsp + 0x3c]
mov esi, dword [rsp + 0x38]
and ecx, 0x30
cmp ecx, esi
je 0x5d0bb0
mov eax, ecx
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 1]
cmp eax, esi
jae 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 2]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 3]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 4]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 5]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 6]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 7]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 8]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 9]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 0xa]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 0xb]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 0xc]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 0xd]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
lea eax, [rcx + 0xe]
cmp esi, eax
jbe 0x5d0bb0
movzx edx, byte [r15 + rax]
xor dl, byte [r12 + rax + 0x30]
mov byte [r14 + rax], dl
mov eax, dword [rsp + 0x38]
mov dword [r12 + 0x70], eax
jmp 0x5d08bf
mov ecx, eax
xor eax, eax
nop word [rax + rax]
movzx edx, byte [r12 + rax + 0x30]
xor dl, byte [r15 + rax]
mov byte [r14 + rax], dl
mov rdx, rax
add rax, 1
cmp rcx, rdx
jne 0x5d0bc8
jmp 0x5d0bb0