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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov ecx, dword [ebp + 8]
mov edx, 0x61707865
push ebx
push esi
push edi
movzx esi, byte [ecx + 3]
mov ebx, 0x3320646e
shl esi, 8
movzx eax, byte [ecx + 2]
or esi, eax
mov dword [ebp - 0xc], 0x79622d32
shl esi, 8
movzx eax, byte [ecx + 1]
or esi, eax
mov dword [ebp - 0x18], 0x6b206574
shl esi, 8
movzx eax, byte [ecx]
or esi, eax
movzx eax, byte [ecx + 6]
mov dword [ebp - 0x28], esi
movzx esi, byte [ecx + 7]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 5]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 4]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0xa]
mov dword [ebp - 0x2c], esi
movzx esi, byte [ecx + 0xb]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 9]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 8]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0xe]
mov dword [ebp - 0x30], esi
movzx esi, byte [ecx + 0xf]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0xd]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0xc]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x12]
mov dword [ebp - 0x24], esi
movzx esi, byte [ecx + 0x13]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x11]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x10]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x16]
mov dword [ebp - 0x14], esi
movzx esi, byte [ecx + 0x17]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x15]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x14]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x1a]
mov dword [ebp - 0x1c], esi
movzx esi, byte [ecx + 0x1b]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x19]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x18]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x1e]
mov dword [ebp - 4], esi
movzx esi, byte [ecx + 0x1f]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x1d]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 0x1c]
mov ecx, dword [ebp + 0xc]
shl esi, 8
or esi, eax
mov dword [ebp - 0x10], esi
movzx esi, byte [ecx + 3]
movzx eax, byte [ecx + 2]
movzx edi, byte [ecx + 7]
shl esi, 8
or esi, eax
shl edi, 8
movzx eax, byte [ecx + 1]
shl esi, 8
or esi, eax
movzx eax, byte [ecx]
shl esi, 8
or esi, eax
movzx eax, byte [ecx + 6]
or edi, eax
movzx eax, byte [ecx + 5]
shl edi, 8
or edi, eax
movzx eax, byte [ecx + 4]
shl edi, 8
or edi, eax
movzx eax, byte [ecx + 0xb]
shl eax, 8
mov dword [ebp + 8], eax
movzx eax, byte [ecx + 0xa]
or dword [ebp + 8], eax
shl dword [ebp + 8], 8
movzx eax, byte [ecx + 9]
or dword [ebp + 8], eax
movzx eax, byte [ecx + 8]
shl dword [ebp + 8], 8
or dword [ebp + 8], eax
movzx eax, byte [ecx + 0xf]
shl eax, 8
mov dword [ebp + 0xc], eax
movzx eax, byte [ecx + 0xe]
or dword [ebp + 0xc], eax
shl dword [ebp + 0xc], 8
movzx eax, byte [ecx + 0xd]
or dword [ebp + 0xc], eax
movzx eax, byte [ecx + 0xc]
shl dword [ebp + 0xc], 8
or dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x28]
jmp 0x408999
mov ebx, dword [ebp - 0x20]
add edx, eax
add ebx, dword [ebp - 0x2c]
mov eax, edx
xor eax, esi
mov esi, dword [ebp - 0x14]
rol eax, 0x10
add esi, eax
mov ecx, esi
xor ecx, dword [ebp - 0x28]
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 8], edx
xor edx, eax
rol edx, 8
add esi, edx
mov dword [ebp - 0x38], edx
mov eax, esi
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 0x1c]
xor eax, ecx
rol eax, 7
mov dword [ebp - 0x3c], eax
mov eax, ebx
xor eax, edi
rol eax, 0x10
add esi, eax
mov ecx, esi
xor ecx, dword [ebp - 0x2c]
rol ecx, 0xc
add ebx, ecx
mov edx, ebx
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 4]
xor edx, eax
rol edx, 8
add esi, edx
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x30]
mov eax, edx
mov dword [ebp - 0x1c], esi
xor eax, dword [ebp + 8]
xor esi, ecx
rol eax, 0x10
add ebx, eax
rol esi, 7
mov ecx, ebx
xor ecx, dword [ebp - 0x30]
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 0xc], edx
xor edx, eax
rol edx, 8
add ebx, edx
mov dword [ebp + 8], edx
mov edx, dword [ebp - 0x18]
mov edi, ebx
add edx, dword [ebp - 0x24]
xor edi, ecx
mov eax, edx
mov dword [ebp - 4], ebx
xor eax, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x10]
rol eax, 0x10
add ebx, eax
rol edi, 7
mov ecx, ebx
xor ecx, dword [ebp - 0x24]
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 0x18], edx
xor edx, eax
mov eax, dword [ebp - 8]
rol edx, 8
add eax, esi
add ebx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ebx
xor ebx, ecx
rol ebx, 7
xor eax, edx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
rol eax, 0x10
add ecx, eax
mov dword [ebp - 4], ecx
xor ecx, esi
mov esi, dword [ebp - 0x10]
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 8], edx
xor edx, eax
mov eax, dword [ebp - 4]
rol edx, 8
add eax, edx
mov dword [ebp + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 4], eax
add edx, edi
xor eax, ecx
rol eax, 7
mov dword [ebp - 0x2c], eax
mov eax, edx
xor eax, dword [ebp - 0x38]
rol eax, 0x10
add esi, eax
mov ecx, esi
xor ecx, edi
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 0x20], edx
xor edx, eax
rol edx, 8
add esi, edx
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0xc]
mov eax, esi
xor eax, ecx
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x14]
add edx, ebx
rol eax, 7
mov dword [ebp - 0x30], eax
mov eax, edx
xor eax, dword [ebp - 0x28]
rol eax, 0x10
add esi, eax
mov ecx, esi
xor ecx, ebx
mov ebx, dword [ebp - 0x18]
add ebx, dword [ebp - 0x3c]
rol ecx, 0xc
add edx, ecx
mov dword [ebp - 0xc], edx
xor edx, eax
rol edx, 8
add esi, edx
mov dword [ebp - 0x38], edx
mov eax, esi
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 0x1c]
xor eax, ecx
rol eax, 7
mov dword [ebp - 0x24], eax
mov eax, ebx
xor eax, dword [ebp + 8]
rol eax, 0x10
add esi, eax
mov ecx, esi
xor ecx, dword [ebp - 0x3c]
rol ecx, 0xc
add ebx, ecx
mov edx, ebx
mov dword [ebp - 0x18], ebx
xor edx, eax
rol edx, 8
add esi, edx
mov dword [ebp + 8], edx
mov eax, esi
mov dword [ebp - 0x1c], esi
xor eax, ecx
rol eax, 7
sub dword [ebp + 0x14], 2
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x28], eax
jne 0x408996
mov ecx, dword [ebp + 0x10]
mov eax, edx
shr eax, 8
mov byte [ecx + 1], al
mov eax, edx
mov byte [ecx], dl
shr eax, 0x10
mov byte [ecx + 2], al
shr edx, 0x18
mov byte [ecx + 3], dl
mov edx, dword [ebp - 0x20]
mov eax, edx
mov byte [ecx + 4], dl
shr eax, 8
mov byte [ecx + 5], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 6], al
shr edx, 0x18
mov byte [ecx + 7], dl
mov edx, dword [ebp - 0xc]
mov eax, edx
shr eax, 8
mov byte [ecx + 9], al
mov eax, edx
mov byte [ecx + 8], dl
shr eax, 0x10
mov byte [ecx + 0xa], al
mov eax, ebx
shr eax, 8
shr edx, 0x18
mov byte [ecx + 0xb], dl
mov edx, esi
mov byte [ecx + 0xd], al
mov eax, ebx
shr eax, 0x10
mov byte [ecx + 0xe], al
mov eax, edx
mov byte [ecx + 0xc], bl
shr eax, 8
shr ebx, 0x18
mov byte [ecx + 0xf], bl
mov byte [ecx + 0x11], al
mov eax, edx
mov byte [ecx + 0x10], dl
shr eax, 0x10
mov byte [ecx + 0x12], al
shr edx, 0x18
mov byte [ecx + 0x13], dl
mov edx, edi
mov byte [ecx + 0x14], dl
mov eax, edx
shr eax, 8
mov byte [ecx + 0x15], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 0x16], al
shr edx, 0x18
mov byte [ecx + 0x17], dl
mov edx, dword [ebp + 8]
mov eax, edx
shr eax, 8
mov byte [ecx + 0x19], al
mov eax, edx
mov byte [ecx + 0x18], dl
shr eax, 0x10
mov byte [ecx + 0x1a], al
shr edx, 0x18
mov byte [ecx + 0x1b], dl
mov edx, dword [ebp + 0xc]
mov eax, edx
shr eax, 8
mov byte [ecx + 0x1d], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 0x1c], dl
shr edx, 0x18
pop edi
mov byte [ecx + 0x1e], al
mov byte [ecx + 0x1f], dl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret