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

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov r13, rdx
mov dword [rbp + 0x58], 0x28
mov dword [rbp + 0x50], 0x1d88b2
mov eax, 0x55555556
mov edi, dword [rbp + 0x50]
mov r15, r8
imul edi
mov r14, rcx
mov r12d, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
cmp edi, eax
je 0x18000d11f
mov ecx, dword [rbp + 0x50]
add ecx, r12d
add ecx, r15d
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d0f5
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jne 0x18000d18b
nop dword [rax]
mov eax, dword [rbp + 0x50]
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d119
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x18000d100
jmp 0x18000d18b
mov eax, dword [rbp + 0x50]
mov eax, dword [rbp + 0x50]
mov ecx, dword [rbp + 0x50]
lea eax, [r8 + 3]
add ecx, r12d
imul ecx, eax
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d146
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x18000d18b
nop word [rax + rax]
mov ecx, dword [rbp + 0x50]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
cmp ecx, eax
mov eax, dword [rbp + 0x50]
je 0x18000d171
dec eax
jmp 0x18000d173
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d187
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x18000d150
mov edx, 0x10
mov qword [rsp + 0x80], rsi
mov r8d, 0xe6b09957
lea r9d, [rdx + 0x25]
call fcn.180004640
lea rbx, [r15 + 0x78]
mov edx, 0x20
mov r8, rbx
mov rcx, r14
call rax
test eax, eax
je 0x18000d53e
mov dword [rbp + 0x50], edi
mov eax, 0x55555556
mov ecx, dword [rbp + 0x50]
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
cmp ecx, eax
je 0x18000d21f
mov ecx, dword [rbp + 0x50]
add ecx, r12d
add ecx, ebx
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d1f7
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jne 0x18000d28b
nop
mov eax, dword [rbp + 0x50]
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d219
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x18000d200
jmp 0x18000d28b
mov eax, dword [rbp + 0x50]
mov eax, dword [rbp + 0x50]
mov ecx, dword [rbp + 0x50]
lea eax, [rbx + 3]
add ecx, r12d
imul ecx, eax
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d245
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x18000d28b
nop dword [rax]
mov ecx, dword [rbp + 0x50]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
cmp ecx, eax
mov eax, dword [rbp + 0x50]
je 0x18000d271
dec eax
jmp 0x18000d273
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d287
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x18000d250
mov edx, 0x10
mov r8d, 0xe6b09957
lea r9d, [rdx + 0x25]
call fcn.180004640
lea rsi, [r15 + 0x70]
mov edx, 8
mov r8, rsi
mov rcx, r14
call rax
test eax, eax
je 0x18000d53e
mov dword [rbp + 0x50], edi
mov eax, 0x55555556
mov ecx, dword [rbp + 0x50]
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
cmp ecx, eax
je 0x18000d31f
mov ecx, dword [rbp + 0x50]
add ecx, r12d
add ecx, esi
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d2ef
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jne 0x18000d38b
nop word [rax + rax]
mov eax, dword [rbp + 0x50]
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d319
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x18000d300
jmp 0x18000d38b
mov eax, dword [rbp + 0x50]
mov eax, dword [rbp + 0x50]
mov ecx, dword [rbp + 0x50]
lea eax, [rsi + 3]
add ecx, r12d
imul ecx, eax
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d345
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x18000d38b
nop dword [rax]
mov ecx, dword [rbp + 0x50]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
cmp ecx, eax
mov eax, dword [rbp + 0x50]
je 0x18000d371
dec eax
jmp 0x18000d373
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d387
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x18000d350
xor eax, eax
lea rdi, [r15 + 0x30]
mov ecx, 0x40
rep stosb byte [rdi], al
mov eax, dword [rbx]
lea rdi, [r15 + 0x98]
mov dword [r15 + 0x40], eax
mov ecx, 4
mov eax, dword [rbx + 4]
mov dword [r15 + 0x44], eax
mov eax, dword [rbx + 8]
mov dword [r15 + 0x48], eax
mov eax, dword [rbx + 0xc]
mov dword [r15 + 0x4c], eax
mov eax, dword [rbx + 0x10]
mov dword [r15 + 0x50], eax
mov eax, dword [rbx + 0x14]
mov dword [r15 + 0x54], eax
mov eax, dword [rbx + 0x18]
mov dword [r15 + 0x58], eax
mov eax, dword [rbx + 0x1c]
mov dword [r15 + 0x5c], eax
xor eax, eax
mov dword [r15 + 0x30], 0x61707865
mov dword [r15 + 0x34], 0x3320646e
mov dword [r15 + 0x38], 0x79622d32
mov dword [r15 + 0x3c], 0x6b206574
mov qword [r15 + 0x60], rax
mov eax, dword [rsi]
mov dword [r15 + 0x68], eax
mov eax, dword [rsi + 4]
mov dword [r15 + 0x6c], eax
nop
mov rax, qword [rbx]
mov qword [rbx + 0x20], rax
lea rbx, [rbx + 8]
sub rcx, 1
jne 0x18000d410
mov rax, qword [rsi]
mov qword [r15 + 0xb8], rax
mov eax, 0x55555556
mov dword [rbp + 0x50], 0x1d88b2
mov ecx, dword [rbp + 0x50]
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
cmp ecx, eax
je 0x18000d48f
mov ecx, dword [rbp + 0x50]
add ecx, r12d
add ecx, edi
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d466
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jne 0x18000d4fb
nop
mov eax, dword [rbp + 0x50]
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000003
jge 0x18000d489
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
je 0x18000d470
jmp 0x18000d4fb
mov eax, dword [rbp + 0x50]
mov eax, dword [rbp + 0x50]
mov ecx, dword [rbp + 0x50]
lea eax, [rdi + 3]
add ecx, r12d
imul ecx, eax
mov dword [rbp + 0x50], ecx
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d4b5
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x18000d4fb
nop dword [rax]
mov ecx, dword [rbp + 0x50]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
cmp ecx, eax
mov eax, dword [rbp + 0x50]
je 0x18000d4e1
dec eax
jmp 0x18000d4e3
inc eax
mov dword [rbp + 0x50], eax
mov eax, dword [rbp + 0x50]
and eax, 0x80000001
jge 0x18000d4f7
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x18000d4c0
mov edx, 0x10
mov r8d, 0xd3bb19e6
lea r9d, [rdx + 0x26]
call fcn.180004640
xor r9d, r9d
mov dword [rsp + 0x30], 0x20c
lea rcx, [rbp + 0x58]
xor edx, edx
mov qword [rsp + 0x28], rcx
mov rcx, r13
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call rax
test eax, eax
je 0x18000d53e
mov eax, 1
jmp 0x18000d540
xor eax, eax
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret