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

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0xb0
movups xmmword [rsp + 0x50], xmm6
movups xmmword [rsp + 0x60], xmm7
movups xmmword [rsp + 0x70], xmm8
movups xmmword [rsp + 0x80], xmm9
movups xmmword [rsp + 0x90], xmm10
movups xmmword [rsp + 0xa0], xmm11
mov rbx, qword [0x140207460]
mov rax, qword [rbx]
mov qword [rsp + 0x48], rax
xor eax, eax
mov rsi, rcx
lea rdi, [rsp + 0x20]
test dl, dl
jne 0x1400d880c
mov rax, qword [0x14024b450]
test rax, rax
je 0x1400d87c5
lea rdi, [rsp + 0x20]
xor ecx, ecx
mov r9d, 2
mov r8d, 0x20
mov rdx, rdi
call rax
test eax, eax
js 0x1400d8800
lea rdi, [rsi + 8]
mov rcx, rsi
xor eax, eax
mov qword [rsi], 0
and rdi, 0xfffffffffffffff8
lea rdx, str.expand_32_byte_k
mov r8, rsi
mov qword [rsi + 0x80], 0
sub rcx, rdi
lea r9, [rdx + 0x10]
add ecx, 0x88
shr ecx, 3
rep stosq qword [rdi], rax
movzx eax, byte [rdx + 1]
movzx ecx, byte [rdx + 2]
add rdx, 4
add r8, 4
shl ecx, 0x10
shl eax, 8
or eax, ecx
movzx ecx, byte [rdx - 4]
or eax, ecx
movzx ecx, byte [rdx - 1]
shl ecx, 0x18
or eax, ecx
mov dword [r8 - 4], eax
cmp rdx, r9
jne 0x1400d8522
movq xmm2, qword [0x1401e45b8]
movq xmm1, qword [rsp + 0x20]
mov qword [rsi + 0x38], rsi
movq xmm4, qword [rsp + 0x28]
movq xmm3, qword [rsp + 0x30]
movdqa xmm0, xmm2
movdqa xmm6, xmm2
movq xmm5, qword [rsp + 0x38]
pand xmm6, xmm4
psrlw xmm4, 8
pand xmm0, xmm1
psrlw xmm1, 8
packuswb xmm0, xmm6
movdqa xmm6, xmm2
packuswb xmm1, xmm4
movdqa xmm4, xmm2
pand xmm6, xmm5
pand xmm4, xmm3
psrlw xmm5, 8
pshufd xmm0, xmm0, 8
packuswb xmm4, xmm6
psrlw xmm3, 8
movdqa xmm6, xmm2
pshufd xmm4, xmm4, 8
packuswb xmm3, xmm5
movdqa xmm5, xmm2
pand xmm6, xmm4
pand xmm5, xmm0
pshufd xmm1, xmm1, 8
psrlw xmm4, 8
psrlw xmm0, 8
pshufd xmm3, xmm3, 8
packuswb xmm0, xmm4
movdqa xmm4, xmm2
pand xmm2, xmm3
pand xmm4, xmm1
psrlw xmm3, 8
packuswb xmm5, xmm6
psrlw xmm1, 8
packuswb xmm4, xmm2
pshufd xmm5, xmm5, 8
packuswb xmm1, xmm3
pshufd xmm0, xmm0, 8
pxor xmm3, xmm3
pshufd xmm1, xmm1, 8
pshufd xmm4, xmm4, 8
movdqa xmm10, xmm5
movdqa xmm6, xmm1
movdqa xmm8, xmm4
movdqa xmm2, xmm0
punpcklbw xmm6, xmm3
punpcklbw xmm10, xmm3
punpcklbw xmm2, xmm3
punpcklbw xmm5, xmm3
punpcklbw xmm8, xmm3
punpcklbw xmm4, xmm3
punpcklbw xmm0, xmm3
punpcklbw xmm1, xmm3
movdqa xmm7, xmm6
pxor xmm3, xmm3
movdqa xmm9, xmm10
pshufd xmm1, xmm1, 0x4e
punpcklwd xmm7, xmm3
punpcklwd xmm9, xmm3
punpcklwd xmm6, xmm3
pslld xmm7, 0x18
psllw xmm8, 8
pshufd xmm6, xmm6, 0x4e
por xmm7, xmm9
movdqa xmm9, xmm2
punpcklwd xmm2, xmm3
movdqa xmm11, xmm8
pshufd xmm2, xmm2, 0x4e
punpcklwd xmm8, xmm3
punpcklwd xmm10, xmm3
pslld xmm2, 0x10
pshufd xmm8, xmm8, 0x4e
pslld xmm6, 0x18
pshufd xmm10, xmm10, 0x4e
por xmm2, xmm8
por xmm6, xmm10
pshufd xmm5, xmm5, 0x4e
punpcklwd xmm9, xmm3
por xmm2, xmm6
pslld xmm9, 0x10
movdqa xmm6, xmm5
movq qword [rsi + 0x18], xmm2
movdqa xmm2, xmm1
punpcklwd xmm6, xmm3
punpcklwd xmm1, xmm3
punpcklwd xmm11, xmm3
punpcklwd xmm2, xmm3
pshufd xmm0, xmm0, 0x4e
pshufd xmm4, xmm4, 0x4e
por xmm9, xmm11
pshufd xmm1, xmm1, 0x4e
pslld xmm2, 0x18
psllw xmm4, 8
por xmm7, xmm9
por xmm2, xmm6
movdqa xmm6, xmm0
punpcklwd xmm0, xmm3
movq qword [rsi + 0x10], xmm7
punpcklwd xmm6, xmm3
movdqa xmm7, xmm4
pshufd xmm0, xmm0, 0x4e
punpcklwd xmm4, xmm3
punpcklwd xmm5, xmm3
punpcklwd xmm7, xmm3
pslld xmm6, 0x10
pslld xmm0, 0x10
pshufd xmm4, xmm4, 0x4e
pslld xmm1, 0x18
pshufd xmm5, xmm5, 0x4e
por xmm6, xmm7
por xmm0, xmm4
por xmm1, xmm5
por xmm2, xmm6
por xmm0, xmm1
movq qword [rsi + 0x20], xmm2
movq qword [rsi + 0x28], xmm0
mov rax, qword [rsp + 0x48]
sub rax, qword [rbx]
jne 0x1400d8892
movups xmm6, xmmword [rsp + 0x50]
movups xmm7, xmmword [rsp + 0x60]
movups xmm9, xmmword [rsp + 0x80]
movups xmm8, xmmword [rsp + 0x70]
movups xmm10, xmmword [rsp + 0x90]
movups xmm11, xmmword [rsp + 0xa0]
add rsp, 0xb0
pop rbx
pop rsi
pop rdi
ret
lea rcx, str.bcrypt.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
je 0x1400d8886
lea rdx, str.BCryptGenRandom
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14024b450], rax
test rax, rax
jne 0x1400d84c6
lea rdi, [rsp + 0x20]
lea rcx, str.unable_to_use_secure_randomness_n
call fcn.1400d4750
xor ecx, ecx
call fcn.1400d8390
mov rdx, rdi
lea r8, [rsp + 0x40]
movabs r11, 0x302b8631721c51be
movabs r10, 0xbf58476d1ce4e5b9
movabs r9, 0x94d049bb133111eb
jmp 0x1400d8877
mov rcx, rax
shr rcx, 0x1e
xor rax, rcx
imul rax, r10
mov rcx, rax
shr rcx, 0x1b
xor rcx, rax
imul rcx, r9
mov rax, rcx
shr rax, 0x1f
xor rax, rcx
mov ecx, eax
mov dword [rdx], ecx
add rdx, 4
cmp rdx, r8
je 0x1400d84e6
test rax, rax
jne 0x1400d8840
mov ecx, 0x721c51be
mov rax, r11
jmp 0x1400d8868
mov rax, qword [0x14024b450]
jmp 0x1400d87f2
call fcn.1401be670
nop
nop dword [rax + rax]