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

Disassembly:
push rbp
sub rsp, 0x3e0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x358], 0xfffffffffffffffe
mov qword [rbp - 0x38], r8
mov qword [rbp - 0x20], rdx
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x28], rcx
lea rcx, [rbp - 8]
xor edx, edx
mov r8d, 0x40
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp - 8]
xor eax, eax
mov edx, eax
mov r8d, 4
lea r9, [0x140057c40]
call fcn.140002b20
mov rcx, rax
lea r8, str.expand_32_byte_k
mov r9d, 4
lea rax, [0x140057c68]
mov qword [rsp + 0x20], rax
call fcn.140002bc0
mov rcx, qword [rbp - 0x20]
mov edx, 0x20
call fcn.140055f60
mov qword [rbp - 0x18], rax
mov r8, rdx
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp + 0x38]
mov r9d, 4
lea rax, [0x140057c80]
mov qword [rsp + 0x20], rax
call fcn.140033040
lea rcx, [rbp - 8]
mov edx, 4
mov r8d, 0xc
lea r9, [0x140057c98]
call fcn.140002b20
mov rcx, rax
call fcn.140002c30
mov qword [rbp - 0x10], rax
mov r8, rdx
mov rdx, qword [rbp - 0x10]
lea rcx, [rbp + 0xb0]
lea r9, [rbp + 0x38]
call fcn.140002910
lea rcx, [rbp + 0x60]
lea rdx, [rbp + 0xb0]
call fcn.140004600
lea rcx, [rbp + 0x100]
lea rdx, [rbp + 0x60]
mov r8d, 0x50
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbp + 0x150]
lea rdx, [rbp + 0x100]
call fcn.1400010a0
mov rax, qword [rbp + 0x150]
cmp rax, 0
sete al
test al, 1
jne 0x140004a49
jmp 0x140004af2
mov rcx, qword [rbp - 0x38]
mov edx, 0xc
call fcn.140055f60
mov qword [rbp - 0x48], rax
mov r8, rdx
mov rdx, qword [rbp - 0x48]
lea rcx, [rbp + 0x178]
mov r9d, 4
lea rax, [0x140057cb0]
mov qword [rsp + 0x20], rax
call fcn.140033040
lea rcx, [rbp - 8]
mov edx, 0xd
mov r8d, 0x10
lea r9, [0x140057cc8]
call fcn.140002b20
mov rcx, rax
call fcn.140002c30
mov qword [rbp - 0x40], rax
mov r8, rdx
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp + 0x1f0]
lea r9, [rbp + 0x178]
call fcn.140002910
lea rcx, [rbp + 0x1a0]
lea rdx, [rbp + 0x1f0]
call fcn.140004600
lea rcx, [rbp + 0x240]
lea rdx, [rbp + 0x1a0]
mov r8d, 0x50
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140004c0c
mov rax, qword [rbp + 0x150]
mov qword [rbp - 0x50], rax
mov rcx, qword [rbp + 0x158]
mov rdx, qword [rbp + 0x160]
call fcn.140004520
mov ecx, eax
mov dword [rbp + 0x310], ecx
shr rax, 0x20
mov byte [rbp + 0x314], al
mov al, byte [rbp + 0x314]
mov byte [rbp + 0x174], al
mov eax, dword [rbp + 0x310]
mov dword [rbp + 0x170], eax
mov al, byte [rbp + 0x174]
mov byte [rbp + 0x31c], al
mov eax, dword [rbp + 0x170]
mov dword [rbp + 0x318], eax
mov eax, dword [rbp + 0x318]
mov cl, byte [rbp + 0x31c]
mov byte [rbp + 0x334], cl
mov dword [rbp + 0x330], eax
mov eax, dword [rbp + 0x330]
mov dword [rbp + 0x32b], eax
mov al, byte [rbp + 0x334]
mov byte [rbp + 0x32f], al
mov al, byte [rbp + 0x32b]
and al, 1
movzx eax, al
cmp rax, 0
je 0x140004bc4
lea rcx, [0x140057cf8]
mov rax, rsp
mov qword [rax + 0x20], rcx
lea rcx, [0x140057830]
lea r9, [0x140057810]
mov edx, 0x2b
lea r8, [rbp + 0x342]
call fcn.140010870
jmp 0x140004bc2
ud2
mov eax, dword [rbp + 0x32c]
mov dword [rbp + 0x33e], eax
mov eax, dword [rbp + 0x33e]
mov dword [rbp + 0x320], eax
mov eax, dword [rbp + 0x320]
mov dword [rbp + 0x16c], eax
mov eax, dword [rbp + 0x16c]
mov dword [rbp + 0x324], eax
mov ecx, dword [rbp + 0x324]
call fcn.140002630
mov ecx, eax
mov rax, qword [rbp - 0x50]
mov dword [rax], ecx
jmp 0x140004a1f
lea rcx, [rbp + 0x290]
lea rdx, [rbp + 0x240]
call fcn.1400010a0
mov rax, qword [rbp + 0x290]
cmp rax, 0
sete al
test al, 1
jne 0x140004c33
jmp 0x140004c76
call fcn.140005100
call fcn.140005160
lea rcx, [rbp + 0x2b8]
lea rdx, [rbp - 8]
mov r8d, 0x40
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rbp - 0x30]
lea rdx, [rbp + 0x2b8]
mov r8d, 0x40
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbp - 0x28]
add rsp, 0x3e0
pop rbp
ret
mov rax, qword [rbp + 0x290]
mov qword [rbp - 0x58], rax
mov rcx, qword [rbp + 0x298]
mov rdx, qword [rbp + 0x2a0]
call fcn.140004520
mov ecx, eax
mov dword [rbp + 0x2f8], ecx
shr rax, 0x20
mov byte [rbp + 0x2fc], al
mov al, byte [rbp + 0x2fc]
mov byte [rbp + 0x2b4], al
mov eax, dword [rbp + 0x2f8]
mov dword [rbp + 0x2b0], eax
mov al, byte [rbp + 0x2b4]
mov byte [rbp + 0x304], al
mov eax, dword [rbp + 0x2b0]
mov dword [rbp + 0x300], eax
mov eax, dword [rbp + 0x300]
mov cl, byte [rbp + 0x304]
mov byte [rbp + 0x34c], cl
mov dword [rbp + 0x348], eax
mov eax, dword [rbp + 0x348]
mov dword [rbp + 0x343], eax
mov al, byte [rbp + 0x34c]
mov byte [rbp + 0x347], al
mov al, byte [rbp + 0x343]
and al, 1
movzx eax, al
cmp rax, 0
je 0x140004d48
lea rcx, [0x140057ce0]
mov rax, rsp
mov qword [rax + 0x20], rcx
lea rcx, [0x140057830]
lea r9, [0x140057810]
mov edx, 0x2b
lea r8, [rbp + 0x357]
call fcn.140010870
jmp 0x140004d46
ud2
mov eax, dword [rbp + 0x344]
mov dword [rbp + 0x353], eax
mov eax, dword [rbp + 0x353]
mov dword [rbp + 0x308], eax
mov eax, dword [rbp + 0x308]
mov dword [rbp + 0x2ac], eax
mov eax, dword [rbp + 0x2ac]
mov dword [rbp + 0x30c], eax
mov ecx, dword [rbp + 0x30c]
call fcn.140002630
mov ecx, eax
mov rax, qword [rbp - 0x58]
mov dword [rax], ecx
jmp 0x140004c0c