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

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x57f3cd
push rbp
mov rbp, rsp
sub rsp, 0x58
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x98], r9
cmp rsi, 0x20
jne 0x57f12e
cmp r10, 0x10
jne 0x57f0f6
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [rdi]
mov r8d, dword [rdi + 4]
mov r10d, dword [rdi + 8]
mov r11d, dword [rdi + 0xc]
mov r12d, dword [rdi + 0x10]
mov r13d, dword [rdi + 0x14]
mov r15d, dword [rdi + 0x18]
mov esi, dword [rdi + 0x1c]
mov edi, dword [r9]
mov ebx, dword [r9 + 4]
mov eax, dword [r9 + 8]
mov r9d, dword [r9 + 0xc]
mov dword [rsp + 0x50], eax
xor eax, eax
mov qword [rsp + 0x40], rax
mov eax, 0x61707865
mov dword [rsp + 0x2c], eax
mov eax, 0x3320646e
mov dword [rsp + 0x30], eax
mov eax, 0x79622d32
mov dword [rsp + 0x3c], eax
mov eax, 0x6b206574
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x50]
jmp 0x57f2fa
nop
lea rax, [0x00696f80]
nop
call fcn.0040c9c0
mov qword [rax + 8], 0x24
lea rcx, [0x006f215c]
mov qword [rax], rcx
xor ebx, ebx
mov rcx, rbx
lea rdi, [0x00765980]
mov rsi, rax
xor eax, eax
add rsp, 0x58
pop rbp
ret
nop
lea rax, [0x00696f80]
call fcn.0040c9c0
mov qword [rax + 8], 0x22
lea rcx, [0x006eefaa]
mov qword [rax], rcx
xor ebx, ebx
mov rcx, rbx
lea rdi, [0x00765980]
mov rsi, rax
xor eax, eax
add rsp, 0x58
pop rbp
ret
mov ecx, dword [rsp + 0x2c]
add ecx, edx
xor edi, ecx
rol edi, 0x10
add r12d, edi
xor edx, r12d
rol edx, 0xc
add ecx, edx
xor edi, ecx
rol edi, 8
add r12d, edi
xor edx, r12d
rol edx, 7
mov dword [rsp + 0x18], edx
mov r9d, dword [rsp + 0x30]
add r9d, r8d
xor ebx, r9d
rol ebx, 0x10
add r13d, ebx
xor r8d, r13d
rol r8d, 0xc
add r9d, r8d
xor ebx, r9d
rol ebx, 8
add r13d, ebx
mov dword [rsp + 0x20], r13d
xor r8d, r13d
rol r8d, 7
mov r13d, dword [rsp + 0x3c]
add r13d, r10d
xor eax, r13d
rol eax, 0x10
add r15d, eax
xor r10d, r15d
rol r10d, 0xc
add r13d, r10d
xor eax, r13d
rol eax, 8
mov dword [rsp + 0x1c], eax
add r15d, eax
xor r10d, r15d
rol r10d, 7
mov eax, dword [rsp + 0x28]
add eax, r11d
mov edx, dword [rsp + 0x24]
xor edx, eax
rol edx, 0x10
add esi, edx
xor r11d, esi
rol r11d, 0xc
add eax, r11d
xor edx, eax
rol edx, 8
add esi, edx
xor r11d, esi
rol r11d, 7
add ecx, r8d
xor edx, ecx
rol edx, 0x10
add r15d, edx
xor r8d, r15d
rol r8d, 0xc
add ecx, r8d
mov dword [rsp + 0x2c], ecx
xor edx, ecx
rol edx, 8
mov dword [rsp + 0x34], edx
add r15d, edx
xor r8d, r15d
add r9d, r10d
xor edi, r9d
rol edi, 0x10
add esi, edi
xor r10d, esi
rol r10d, 0xc
add r9d, r10d
xor edi, r9d
rol edi, 8
add esi, edi
xor r10d, esi
add r13d, r11d
xor ebx, r13d
rol ebx, 0x10
add r12d, ebx
xor r11d, r12d
rol r11d, 0xc
add r13d, r11d
xor ebx, r13d
rol ebx, 8
mov dword [rsp + 0x38], ebx
add r12d, ebx
xor r11d, r12d
mov ecx, dword [rsp + 0x18]
add eax, ecx
mov edx, dword [rsp + 0x1c]
xor edx, eax
rol edx, 0x10
mov ebx, dword [rsp + 0x20]
add ebx, edx
xor ecx, ebx
rol ecx, 0xc
add eax, ecx
mov dword [rsp + 0x14], eax
xor edx, eax
rol edx, 8
add ebx, edx
xor ecx, ebx
mov rax, qword [rsp + 0x40]
inc rax
nop
nop
nop
nop
nop
nop
rol r8d, 7
rol r10d, 7
rol r11d, 7
rol ecx, 7
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x30], r9d
mov dword [rsp + 0x3c], r13d
mov qword [rsp + 0x48], rax
mov eax, dword [rsp + 0x14]
mov dword [rsp + 0x28], eax
mov eax, edx
mov r9d, dword [rsp + 0x34]
mov edx, ecx
mov r13d, ebx
mov ebx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x78]
mov dword [rsp + 0x24], r9d
mov r9, qword [rsp + 0x40]
cmp r9, 0xa
jl 0x57f164
lea rdx, [rcx - 4]
neg rdx
sar rdx, 0x3f
and edx, 4
lea r8, [rcx - 8]
neg r8
sar r8, 0x3f
and r8d, 8
lea r9, [rcx - 0xc]
neg r9
sar r9, 0x3f
and r9d, 0xc
lea r10, [rcx - 0x10]
neg r10
sar r10, 0x3f
and r10d, 0x10
lea r11, [rcx - 0x14]
neg r11
sar r11, 0x3f
and r11d, 0x14
lea r12, [rcx - 0x18]
neg r12
sar r12, 0x3f
and r12d, 0x18
lea r13, [rcx - 0x1c]
neg r13
sar r13, 0x3f
and r13d, 0x1c
mov r15d, dword [rsp + 0x2c]
mov rsi, r13
mov r13, qword [rsp + 0x68]
mov dword [r13], r15d
mov r15d, dword [rsp + 0x30]
mov dword [r13 + rdx], r15d
mov edx, dword [rsp + 0x3c]
mov dword [r13 + r8], edx
mov edx, dword [rsp + 0x28]
mov dword [r13 + r9], edx
mov dword [r13 + r10], edi
mov dword [r13 + r11], ebx
mov dword [r13 + r12], eax
mov edx, dword [rsp + 0x24]
mov dword [r13 + rsi], edx
mov rax, r13
mov rbx, qword [rsp + 0x70]
xor edi, edi
xor esi, esi
add rsp, 0x58
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x48], r11
call fcn.0045a0c0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x40]
mov r11, qword [rsp + 0x48]
jmp fcn.0057f040