Function at 0x595ea0
Capabilities:
Encrypt data using salsa20 or chacha

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
cmp rsp, qword [rcx + 0x10]
jbe 0x596226
sub rsp, 0x48
mov qword [rsp + 0x40], rbp
lea rbp, [rsp + 0x40]
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x20
jne 0x5961b9
mov rdx, qword [rsp + 0x88]
nop
cmp rdx, 0x10
jne 0x59615a
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov rdx, qword [rsp + 0x68]
mov ebx, dword [rdx]
mov esi, dword [rdx + 4]
mov edi, dword [rdx + 8]
mov r8d, dword [rdx + 0xc]
mov r9d, dword [rdx + 0x10]
mov r10d, dword [rdx + 0x14]
mov r11d, dword [rdx + 0x18]
mov edx, dword [rdx + 0x1c]
mov r12, qword [rsp + 0x80]
mov r13d, dword [r12]
mov r14d, dword [r12 + 4]
mov r15d, dword [r12 + 8]
mov r12d, dword [r12 + 0xc]
xor eax, eax
mov ecx, 0x61707865
mov eax, 0x3320646e
mov dword [rsp + 0x2c], eax
mov eax, 0x79622d32
mov dword [rsp + 0x24], eax
mov eax, 0x6b206574
mov dword [rsp + 0x28], eax
xor eax, eax
jmp 0x5960e0
inc rax
mov qword [rsp + 0x30], rax
nop
nop
nop
nop
nop
nop
nop
add ecx, ebx
xor r13d, ecx
rol r13d, 0x10
add r9d, r13d
xor ebx, r9d
rol ebx, 0xc
add ecx, ebx
xor r13d, ecx
rol r13d, 8
add r9d, r13d
xor ebx, r9d
rol ebx, 7
mov eax, dword [rsp + 0x2c]
add eax, esi
xor r14d, eax
rol r14d, 0x10
add r10d, r14d
xor esi, r10d
rol esi, 0xc
add eax, esi
xor r14d, eax
rol r14d, 8
add r10d, r14d
mov dword [rsp + 0x20], r10d
xor esi, r10d
rol esi, 7
mov r10d, dword [rsp + 0x24]
add r10d, edi
xor r15d, r10d
rol r15d, 0x10
add r11d, r15d
xor edi, r11d
rol edi, 0xc
add r10d, edi
xor r15d, r10d
rol r15d, 8
mov dword [rsp + 0x1c], r15d
add r11d, r15d
xor edi, r11d
rol edi, 7
mov r15d, dword [rsp + 0x28]
add r15d, r8d
xor r12d, r15d
rol r12d, 0x10
add edx, r12d
xor r8d, edx
rol r8d, 0xc
add r15d, r8d
xor r12d, r15d
rol r12d, 8
add edx, r12d
xor r8d, edx
rol r8d, 7
add ecx, esi
xor r12d, ecx
rol r12d, 0x10
add r11d, r12d
xor esi, r11d
rol esi, 0xc
add ecx, esi
mov dword [rsp + 0x18], ecx
xor r12d, ecx
rol r12d, 8
add r11d, r12d
xor esi, r11d
rol esi, 7
add eax, edi
xor r13d, eax
rol r13d, 0x10
add edx, r13d
xor edi, edx
rol edi, 0xc
add eax, edi
mov dword [rsp + 0x14], eax
xor r13d, eax
rol r13d, 8
add edx, r13d
xor edi, edx
rol edi, 7
add r10d, r8d
xor r14d, r10d
rol r14d, 0x10
add r9d, r14d
xor r8d, r9d
rol r8d, 0xc
add r10d, r8d
xor r14d, r10d
rol r14d, 8
add r9d, r14d
xor r8d, r9d
rol r8d, 7
add r15d, ebx
mov eax, dword [rsp + 0x1c]
xor eax, r15d
rol eax, 0x10
mov ecx, dword [rsp + 0x20]
add ecx, eax
xor ebx, ecx
rol ebx, 0xc
add r15d, ebx
xor eax, r15d
rol eax, 8
add ecx, eax
xor ebx, ecx
rol ebx, 7
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x14]
mov dword [rsp + 0x2c], eax
mov dword [rsp + 0x24], r10d
mov dword [rsp + 0x28], r15d
mov r15d, dword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov r10d, ecx
mov ecx, dword [rsp + 0x18]
nop dword [rax]
cmp rax, 0xa
jl 0x595f5a
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x1f
jbe 0x596218
mov rax, qword [rsp + 0x50]
mov dword [rax], ecx
mov ecx, dword [rsp + 0x2c]
mov dword [rax + 4], ecx
mov ecx, dword [rsp + 0x24]
mov dword [rax + 8], ecx
mov ecx, dword [rsp + 0x28]
mov dword [rax + 0xc], ecx
nop
mov dword [rax + 0x10], r13d
nop
mov dword [rax + 0x14], r14d
mov dword [rax + 0x18], r15d
nop
mov dword [rax + 0x1c], r12d
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rdx
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xa8], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0xb0], xmm0
mov rbp, qword [rsp + 0x40]
add rsp, 0x48
ret
lea rax, [0x006b95c0]
mov qword [rsp], rax
call fcn.0040e660
mov rax, qword [rsp + 8]
mov qword [rax + 8], 0x24
lea rcx, [0x007056f3]
mov qword [rax], rcx
mov qword [rsp + 0x98], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0xa0], xmm0
lea rcx, [0x007572a0]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xb8], rax
mov rbp, qword [rsp + 0x40]
add rsp, 0x48
ret
lea rax, [0x006b95c0]
mov qword [rsp], rax
call fcn.0040e660
mov rax, qword [rsp + 8]
mov qword [rax + 8], 0x22
lea rcx, [0x00704ae6]
mov qword [rax], rcx
mov qword [rsp + 0x98], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0xa0], xmm0
lea rcx, [0x007572a0]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0xb8], rax
mov rbp, qword [rsp + 0x40]
add rsp, 0x48
ret
mov eax, 0x1f
mov rcx, rdx
call fcn.0046cb00
nop
call fcn.0046a920
jmp fcn.00595ea0