Function at 0x45d890
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rsi, rdx
mov edx, dword [rcx + 0x130]
mov r15, rcx
mov rdi, r8
mov rbx, r9
test edx, edx
jne 0x45da00
mov r14d, dword [rcx + 0xe0]
mov eax, ebx
mov dword [rsp + 0x44], ebx
and eax, 0x3f
sub rbx, rax
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x48], rax
cmp rbx, 0x3f
jbe 0x45d9dd
lea r12, [r15 + 0xe0]
lea r13, [r15 + 0xc0]
mov qword [rsp + 0xb0], rdi
mov rdi, rsi
mov qword [rsp + 0x38], r12
mov rsi, r13
mov r12, rbx
mov r13, qword [rsp + 0xb0]
movabs rbp, 0x40000003f
jmp 0x45d97f
mov r8, r12
shr r8, 6
mov edx, r8d
add edx, r14d
mov r14, rdx
cmp rdx, r8
jae 0x45d99a
mov rax, qword [rsp + 0x38]
sub r8, rdx
mov rcx, rdi
mov rdx, r13
mov r14, r8
mov r9, rsi
mov qword [rsp + 0x20], rax
shl r14, 6
mov r8, r14
sub r12, r14
add r13, r14
add rdi, r14
call sym.ChaCha20_ctr32
mov dword [r15 + 0xe0], 0
add dword [r15 + 0xe4], 1
xor r14d, r14d
cmp r12, 0x3f
jbe 0x45d9d7
cmp r12, rbp
jbe 0x45d920
mov edx, 0x10000000
mov r8d, 0x10000000
add edx, r14d
mov r14, rdx
cmp rdx, r8
jb 0x45d935
mov rax, qword [rsp + 0x38]
mov rbx, r8
mov rdx, r13
mov rcx, rdi
shl rbx, 6
mov r9, rsi
mov qword [rsp + 0x20], rax
mov r8, rbx
sub r12, rbx
add r13, rbx
add rdi, rbx
call sym.ChaCha20_ctr32
mov dword [r15 + 0xe0], r14d
test r14d, r14d
je 0x45d96e
cmp r12, 0x3f
ja 0x45d97f
mov rsi, rdi
mov rdi, r13
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x45da80
mov eax, 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp edx, 0x3f
ja 0x45da36
test r9, r9
je 0x45da36
nop word [rax + rax]
mov ecx, edx
movzx eax, byte [rdi]
add rsi, 1
add rdi, 1
xor al, byte [r15 + rcx + 0xf0]
add edx, 1
mov byte [rsi - 1], al
sub rbx, 1
je 0x45da36
cmp edx, 0x3f
jbe 0x45da10
mov dword [r15 + 0x130], edx
test rbx, rbx
je 0x45d9e9
mov r14d, dword [r15 + 0xe0]
cmp edx, 0x40
jne 0x45d8c1
mov dword [r15 + 0x130], 0
add r14d, 1
mov dword [r15 + 0xe0], r14d
jne 0x45d8c1
add dword [r15 + 0xe4], 1
jmp 0x45d8c1
lea rcx, [r15 + 0xf0]
lea rax, [r15 + 0xe0]
mov qword [r15 + 0xf0], 0
mov r8d, 0x40
mov qword [r15 + 0xf8], 0
mov rdx, rcx
lea r9, [r15 + 0xc0]
mov qword [rcx + 0x10], 0
mov qword [rcx + 0x18], 0
mov qword [rcx + 0x20], 0
mov qword [rcx + 0x28], 0
mov qword [rcx + 0x30], 0
mov qword [rcx + 0x38], 0
mov qword [rsp + 0x20], rax
call sym.ChaCha20_ctr32
lea rcx, [r15 + 0xf1]
mov ebx, dword [rsp + 0x40]
mov rdx, rsi
sub rdx, rcx
cmp rdx, 0xe
lea eax, [rbx - 1]
seta cl
cmp eax, 6
seta dl
test cl, dl
je 0x45dc8a
lea rcx, [rdi + 1]
mov rdx, rsi
sub rdx, rcx
cmp rdx, 0xe
jbe 0x45dc8a
cmp eax, 0xe
jbe 0x45dcb2
movdqu xmm2, xmmword [r15 + 0xf0]
movdqu xmm0, xmmword [rdi]
shr ebx, 4
pxor xmm0, xmm2
movups xmmword [rsi], xmm0
cmp ebx, 1
je 0x45db81
movdqu xmm3, xmmword [r15 + 0x100]
movdqu xmm0, xmmword [rdi + 0x10]
pxor xmm0, xmm3
movups xmmword [rsi + 0x10], xmm0
cmp ebx, 3
jne 0x45db81
movdqu xmm4, xmmword [r15 + 0x110]
movdqu xmm0, xmmword [rdi + 0x20]
pxor xmm0, xmm4
movups xmmword [rsi + 0x20], xmm0
mov r13d, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x40]
and r13d, 0x30
cmp r13d, ecx
je 0x45dc7a
mov edx, ecx
sub eax, r13d
sub edx, r13d
cmp eax, 6
jbe 0x45dbd2
mov eax, r13d
lea ecx, [r13 + 0xf0]
movq xmm0, qword [rdi + rax]
movq xmm1, qword [r15 + rcx]
pxor xmm0, xmm1
movq qword [rsi + rax], xmm0
mov eax, edx
and eax, 0xfffffff8
add r13d, eax
cmp eax, edx
je 0x45dc7a
mov eax, r13d
mov ecx, dword [rsp + 0x40]
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
lea eax, [r13 + 1]
cmp eax, ecx
jae 0x45dc7a
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
lea eax, [r13 + 2]
cmp eax, ecx
jae 0x45dc7a
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
lea eax, [r13 + 3]
cmp ecx, eax
jbe 0x45dc7a
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
lea eax, [r13 + 4]
cmp ecx, eax
jbe 0x45dc7a
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
lea eax, [r13 + 5]
cmp ecx, eax
jbe 0x45dc7a
movzx edx, byte [rdi + rax]
add r13d, 6
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
cmp ecx, r13d
jbe 0x45dc7a
mov eax, r13d
movzx edx, byte [rdi + rax]
xor dl, byte [r15 + rax + 0xf0]
mov byte [rsi + rax], dl
mov eax, dword [rsp + 0x40]
mov dword [r15 + 0x130], eax
jmp 0x45d9e9
mov rcx, qword [rsp + 0x48]
xor eax, eax
nop dword [rax]
movzx edx, byte [r15 + rax + 0xf0]
xor dl, byte [rdi + rax]
mov byte [rsi + rax], dl
add rax, 1
cmp rax, rcx
jne 0x45dc98
jmp 0x45dc7a
mov edx, ebx
xor r13d, r13d
jmp 0x45dba4