Function at 0x4aff60
Capabilities:
Encrypt data using salsa20 or chacha
Resolve function by parsing pe exports

Disassembly:
lea r12, [rsp - 0x48]
cmp r12, qword [r14 + 0x10]
jbe 0x4b0509
push rbp
mov rbp, rsp
sub rsp, 0xc0
mov qword [rsp + 0xe0], rcx
mov qword [rsp + 0xf8], r8
mov qword [rsp + 0xd8], rbx
jmp 0x4affd4
mov rbx, qword [rsp + 0xd8]
inc qword [rbx + 0x30]
mov rsi, qword [rsp + 0x98]
add rsi, 0xffffffffffffffc0
mov rdx, rsi
neg rdx
sar rdx, 0x3f
and edx, 0x40
mov r11, qword [rsp + 0x68]
dec r11
lea rcx, [r15 + rdx]
mov rdi, qword [rsp + 0x90]
add rdi, 0xffffffffffffffc0
mov r10, rax
test r11, r11
jle 0x4b033b
mov qword [rsp + 0xa8], r10
mov qword [rsp + 0xa0], r9
mov qword [rsp + 0xb8], r8
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0x68], r11
mov edx, dword [rbx + 0x10]
mov dword [rsp + 0x28], edx
mov r12d, dword [rbx + 0x14]
mov dword [rsp + 0x24], r12d
mov r13d, dword [rbx + 0x18]
mov dword [rsp + 0x20], r13d
mov r15d, dword [rbx + 0x1c]
mov dword [rsp + 0x1c], r15d
mov eax, dword [rbx + 0x20]
mov dword [rsp + 0x18], eax
mov r11d, dword [rbx + 0x24]
mov dword [rsp + 0x14], r11d
mov esi, dword [rbx + 0x28]
mov dword [rsp + 0x48], esi
mov r10d, dword [rbx + 0x2c]
mov dword [rsp + 0x44], r10d
mov ecx, dword [rbx + 0x30]
mov dword [rsp + 0x40], ecx
mov r9d, dword [rbx + 0x34]
mov dword [rsp + 0x3c], r9d
mov r8d, dword [rbx + 0x38]
mov dword [rsp + 0x38], r8d
mov ebx, dword [rbx + 0x3c]
mov dword [rsp + 0x34], ebx
mov dword [rsp + 0x80], eax
mov eax, 0x14
mov qword [rsp + 0x70], rax
mov eax, 0x61707865
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x78], eax
mov eax, 0x3320646e
mov dword [rsp + 0x4c], eax
mov eax, 0x79622d32
mov dword [rsp + 0x30], eax
mov eax, 0x6b206574
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x80]
nop dword [rax + rax]
jmp 0x4b04d6
mov edi, dword [rsp + 0x28]
add edx, edi
mov edi, dword [rsp + 0x24]
add edi, r12d
mov r12d, dword [rsp + 0x20]
add r12d, r13d
mov r13d, dword [rsp + 0x1c]
add r13d, r15d
mov r15d, dword [rsp + 0x18]
add r15d, eax
mov eax, r15d
mov r15d, dword [rsp + 0x14]
add r11d, r15d
mov r15d, dword [rsp + 0x48]
add esi, r15d
mov r15d, dword [rsp + 0x44]
add r10d, r15d
mov r15d, dword [rsp + 0x40]
add r15d, ecx
mov ecx, r15d
mov r15d, dword [rsp + 0x3c]
add r9d, r15d
mov r15d, dword [rsp + 0x38]
add r8d, r15d
mov r15d, dword [rsp + 0x34]
add ebx, r15d
mov r15, qword [rsp + 0x90]
cmp r15, 0x3f
jbe 0x4b04fb
mov dword [rsp + 0x44], r10d
mov dword [rsp + 0x3c], r9d
mov dword [rsp + 0x38], r8d
mov dword [rsp + 0x34], ebx
mov r15d, dword [rsp + 0x50]
add r15d, 0x61707865
mov ebx, dword [rsp + 0x4c]
add ebx, 0x3320646e
mov r8d, dword [rsp + 0x30]
add r8d, 0x79622d32
mov r9d, dword [rsp + 0x2c]
add r9d, 0x6b206574
mov r10, qword [rsp + 0xb8]
test r10, r10
je 0x4b02b5
mov dword [rsp + 0x48], esi
mov rsi, qword [rsp + 0xa0]
nop dword [rax + rax]
cmp rsi, 0x3f
jbe 0x4b04ee
mov rsi, qword [rsp + 0xa8]
add rsi, 0xffffffffffffffc0
mov qword [rsp + 0xa8], rsi
neg rsi
sar rsi, 0x3f
and esi, 0x40
mov qword [rsp + 0x88], rsi
mov esi, dword [r10]
xor esi, r15d
mov r15, qword [rsp + 0xb0]
mov dword [r15], esi
mov esi, dword [r10 + 4]
xor esi, ebx
mov dword [r15 + 4], esi
mov ebx, dword [r10 + 8]
xor ebx, r8d
mov dword [r15 + 8], ebx
mov ebx, dword [r10 + 0xc]
xor ebx, r9d
mov dword [r15 + 0xc], ebx
mov ebx, dword [r10 + 0x10]
xor edx, ebx
mov dword [r15 + 0x10], edx
mov edx, dword [r10 + 0x14]
xor edi, edx
mov dword [r15 + 0x14], edi
mov edx, dword [r10 + 0x18]
xor r12d, edx
mov dword [r15 + 0x18], r12d
mov edx, dword [r10 + 0x1c]
xor r13d, edx
mov dword [r15 + 0x1c], r13d
mov edx, dword [r10 + 0x20]
xor eax, edx
mov dword [r15 + 0x20], eax
mov edx, dword [r10 + 0x24]
xor r11d, edx
mov dword [r15 + 0x24], r11d
mov edx, dword [r10 + 0x28]
mov ebx, dword [rsp + 0x48]
xor ebx, edx
mov dword [r15 + 0x28], ebx
mov edx, dword [r10 + 0x2c]
mov ebx, dword [rsp + 0x44]
xor ebx, edx
mov dword [r15 + 0x2c], ebx
mov edx, dword [r10 + 0x30]
xor ecx, edx
mov dword [r15 + 0x30], ecx
mov edx, dword [r10 + 0x34]
mov ebx, dword [rsp + 0x3c]
xor ebx, edx
mov dword [r15 + 0x34], ebx
mov edx, dword [r10 + 0x38]
mov ebx, dword [rsp + 0x38]
xor ebx, edx
mov dword [r15 + 0x38], ebx
mov edx, dword [r10 + 0x3c]
mov ebx, dword [rsp + 0x34]
xor ebx, edx
mov dword [r15 + 0x3c], ebx
mov rdx, qword [rsp + 0x88]
lea r8, [r10 + rdx]
mov r9, qword [rsp + 0xa0]
add r9, 0xffffffffffffffc0
mov rax, qword [rsp + 0xa8]
jmp 0x4aff94
nop
mov r10, qword [rsp + 0xb0]
mov dword [r10], r15d
nop
mov dword [r10 + 4], ebx
nop
mov dword [r10 + 8], r8d
nop
mov dword [r10 + 0xc], r9d
nop
mov dword [r10 + 0x10], edx
nop
mov dword [r10 + 0x14], edi
nop
mov dword [r10 + 0x18], r12d
nop
mov dword [r10 + 0x1c], r13d
nop
mov dword [r10 + 0x20], eax
nop
mov dword [r10 + 0x24], r11d
nop
mov dword [r10 + 0x28], esi
nop
mov edx, dword [rsp + 0x44]
mov dword [r10 + 0x2c], edx
nop
mov dword [r10 + 0x30], ecx
nop
mov edx, dword [rsp + 0x3c]
mov dword [r10 + 0x34], edx
nop
mov edx, dword [rsp + 0x38]
mov dword [r10 + 0x38], edx
mov edx, dword [rsp + 0x34]
mov dword [r10 + 0x3c], edx
mov r15, r10
mov rax, qword [rsp + 0xa8]
mov r9, qword [rsp + 0xa0]
mov r8, qword [rsp + 0xb8]
jmp 0x4aff94
add rsp, 0xc0
pop rbp
ret
mov edi, dword [rsp + 0x50]
add edi, edx
xor ecx, edi
rol ecx, 0x10
add eax, ecx
xor edx, eax
rol edx, 0xc
add edi, edx
xor ecx, edi
rol ecx, 8
add eax, ecx
xor edx, eax
rol edx, 7
mov dword [rsp + 0x64], edx
mov edx, dword [rsp + 0x4c]
add edx, r12d
xor r9d, edx
rol r9d, 0x10
add r11d, r9d
xor r12d, r11d
rol r12d, 0xc
add edx, r12d
xor r9d, edx
rol r9d, 8
add r11d, r9d
mov dword [rsp + 0x60], r11d
xor r12d, r11d
rol r12d, 7
mov r11d, dword [rsp + 0x30]
add r11d, r13d
xor r8d, r11d
rol r8d, 0x10
add esi, r8d
xor r13d, esi
rol r13d, 0xc
add r11d, r13d
xor r8d, r11d
rol r8d, 8
mov dword [rsp + 0x5c], r8d
add esi, r8d
xor r13d, esi
rol r13d, 7
mov r8d, dword [rsp + 0x2c]
add r8d, r15d
xor ebx, r8d
rol ebx, 0x10
add r10d, ebx
xor r15d, r10d
rol r15d, 0xc
add r8d, r15d
xor ebx, r8d
rol ebx, 8
add r10d, ebx
xor r15d, r10d
rol r15d, 7
add edi, r12d
xor ebx, edi
rol ebx, 0x10
add esi, ebx
xor r12d, esi
rol r12d, 0xc
add edi, r12d
xor ebx, edi
rol ebx, 8
add esi, ebx
xor r12d, esi
add edx, r13d
xor ecx, edx
rol ecx, 0x10
add r10d, ecx
xor r13d, r10d
rol r13d, 0xc
add edx, r13d
mov dword [rsp + 0x4c], edx
xor ecx, edx
rol ecx, 8
mov dword [rsp + 0x58], ecx
add r10d, ecx
xor r13d, r10d
add r11d, r15d
xor r9d, r11d
rol r9d, 0x10
add eax, r9d
xor r15d, eax
rol r15d, 0xc
add r11d, r15d
xor r9d, r11d
rol r9d, 8
add eax, r9d
mov dword [rsp + 0x54], eax
xor r15d, eax
mov eax, dword [rsp + 0x64]
add r8d, eax
mov ecx, dword [rsp + 0x5c]
xor ecx, r8d
rol ecx, 0x10
mov edx, dword [rsp + 0x60]
add edx, ecx
xor eax, edx
rol eax, 0xc
add r8d, eax
xor ecx, r8d
rol ecx, 8
mov dword [rsp + 0x64], ecx
add edx, ecx
xor eax, edx
mov rcx, qword [rsp + 0x70]
add rcx, 0xfffffffffffffffe
rol r12d, 7
rol r13d, 7
rol r15d, 7
rol eax, 7
mov qword [rsp + 0x70], rcx
mov dword [rsp + 0x50], edi
mov ecx, dword [rsp + 0x58]
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x2c], r8d
mov rdi, qword [rsp + 0x90]
mov r11d, edx
mov r8d, dword [rsp + 0x64]
mov edx, eax
mov eax, dword [rsp + 0x54]
mov rdi, qword [rsp + 0x70]
nop dword [rax + rax]
test rdi, rdi
jg 0x4b0344
jmp 0x4b00c5
mov eax, 0x3f
mov rcx, rsi
call sym.runtime.panicIndex
mov eax, 0x3f
mov rcx, r15
call sym.runtime.panicIndex
nop
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 sym.runtime.morestack_noctxt.abi0
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 sym.iox_crypto_chacha20_internal_ref._implRef_.Blocks