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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x154
push 0xffffffffffffffe0
pop eax
test eax, eax
je 0x40fded
movsd xmm0, qword [edx + 0x18]
movsd qword [esp + 0x12c], xmm0
movsd xmm0, qword [edx + 0x10]
movsd qword [esp + 0x124], xmm0
movsd xmm0, qword [edx]
movsd xmm1, qword [edx + 8]
movsd qword [esp + 0x11c], xmm1
movsd qword [esp + 0x114], xmm0
mov esi, dword [esp + eax + 0x134]
mov dword [esp + eax + 0xb4], esi
add eax, 4
jmp 0x40fd9f
mov eax, dword [esp + 0x98]
mov esi, dword [esp + 0xa8]
mov edx, dword [esp + 0x9c]
movaps xmm0, xmmword [str.expand_32_byte_kexpand_32_byte_k]
lea ebp, [eax + 0x3320646e]
mov dword [esp + 0x80], esi
mov dword [esp + 0x88], eax
mov dword [esp + 0x84], edx
rol ebp, 0x10
add esi, ebp
mov ebx, esi
xor ebx, eax
rol ebx, 0xc
lea eax, [ebx + eax + 0x3320646e]
xor ebp, eax
mov dword [esp + 0x40], eax
rol ebp, 8
add esi, ebp
xor ebx, esi
mov eax, esi
mov dword [esp + 0x7c], esi
mov esi, dword [esp + 0xac]
lea eax, [edx + 0x79622d32]
rol eax, 0x10
rol ebx, 7
mov dword [esp + 0x78], ebx
mov dword [esp + 0x70], esi
add esi, eax
mov ebx, esi
xor ebx, edx
rol ebx, 0xc
lea edx, [ebx + edx + 0x79622d32]
xor eax, edx
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0xb0]
rol eax, 8
add esi, eax
mov dword [esp + 0x74], eax
mov eax, esi
mov eax, dword [esp + 0xa0]
xor ebx, esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x5c], edx
rol ebx, 7
add dword [esp + 0x40], ebx
mov dword [esp + 0x68], ebx
lea esi, [eax + 0x6b206574]
mov dword [esp + 0x64], eax
rol esi, 0x10
lea edi, [edx + esi]
mov edx, edi
xor edx, eax
rol edx, 0xc
lea eax, [edx + eax + 0x6b206574]
mov dword [esp + 0x3c], eax
xor esi, dword [esp + 0x3c]
rol esi, 8
add edi, esi
mov dword [esp + 0x60], esi
xor edx, edi
mov eax, edi
mov dword [esp + 0x58], edi
mov edi, dword [esp + 0x34]
rol edx, 7
mov dword [esp + 0x54], edx
add edi, edx
mov edx, dword [esp + 0xa4]
mov eax, edi
mov eax, dword [esp + 0x94]
xor ebp, edi
mov dword [esp + 0x34], edi
rol ebp, 0x10
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x44], edx
xor edx, edx
mov dword [esp + 0x48], eax
add eax, 0x61707865
mov dword [esp + 0x50], eax
cmp edx, 8
je 0x41063f
mov eax, dword [esp + 0x50]
mov dword [esp + 0x90], ecx
mov ecx, dword [esp + 0x44]
mov edi, edx
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x78]
xor edi, eax
rol edi, 0x10
add ecx, edi
mov esi, ecx
xor esi, dword [esp + 0x48]
rol esi, 0xc
lea ebp, [esi + eax]
xor edi, ebp
add ebp, edx
mov ebx, ebp
rol edi, 8
add ecx, edi
xor ebx, dword [esp + 0x60]
xor esi, ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x6c]
rol esi, 7
rol ebx, 0x10
lea eax, [ebx + ecx]
mov ecx, eax
xor ecx, edx
mov edx, dword [esp + 0x58]
rol ecx, 0xc
add ebp, ecx
xor ebx, ebp
mov dword [esp + 8], ebp
rol ebx, 8
add eax, ebx
xor ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
rol ecx, 7
mov dword [esp + 0x28], ecx
xor edi, eax
rol edi, 0x10
lea ebp, [edi + edx]
mov ecx, ebp
xor ecx, dword [esp + 0x68]
rol ecx, 0xc
add eax, ecx
xor edi, eax
mov dword [esp], eax
rol edi, 8
add ebp, edi
xor ecx, ebp
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x34]
rol ecx, 7
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
add ecx, dword [esp + 0x4c]
mov eax, ecx
xor eax, dword [esp + 0x54]
rol eax, 0xc
lea edx, [eax + ebp]
mov ebp, eax
mov eax, edx
mov dword [esp + 0xc], edx
xor eax, dword [esp + 0x4c]
rol eax, 8
add ecx, eax
mov dword [esp + 0x10], eax
xor ebp, ecx
rol ebp, 7
mov dword [esp + 0x38], ebp
mov ebp, dword [esp + 0x3c]
lea eax, [esi + ebp]
mov ebp, dword [esp + 0x7c]
mov dword [esp + 4], eax
xor eax, dword [esp + 0x74]
rol eax, 0x10
lea edx, [eax + ebp]
mov ebp, dword [esp + 4]
xor esi, edx
rol esi, 0xc
add ebp, esi
xor eax, ebp
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x10]
rol eax, 8
add edx, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 8]
xor esi, edx
rol esi, 7
add eax, esi
xor edi, eax
rol edi, 0x10
add ecx, edi
xor esi, ecx
rol esi, 0xc
add eax, esi
xor edi, eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
rol edi, 8
add ecx, edi
xor esi, ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x28]
rol esi, 7
mov dword [esp + 0x30], esi
mov esi, dword [esp]
add esi, ecx
xor ebp, esi
rol ebp, 0x10
add edx, ebp
xor ecx, edx
rol ecx, 0xc
add esi, ecx
xor ebp, esi
mov dword [esp], esi
mov esi, dword [esp + 0xc]
rol ebp, 8
add edx, ebp
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x14]
xor ecx, edx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x24]
rol ecx, 7
add esi, edx
xor ebp, esi
rol ebp, 0x10
add eax, ebp
xor edx, eax
rol edx, 0xc
add esi, edx
xor ebp, esi
mov dword [esp + 0xc], esi
mov esi, dword [esp + 4]
rol ebp, 8
add eax, ebp
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x38]
xor edx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
rol edx, 7
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x1c]
add esi, ebp
xor ebx, esi
add eax, ecx
rol ebx, 0x10
add edx, ebx
xor ebp, edx
rol ebp, 0xc
add esi, ebp
xor ebx, esi
mov dword [esp + 4], esi
rol ebx, 8
add edx, ebx
xor ebx, eax
xor ebp, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
rol ebx, 0x10
rol ebp, 7
add edx, ebx
xor ecx, edx
rol ecx, 0xc
add eax, ecx
xor ebx, eax
mov dword [esp + 8], eax
mov eax, edx
mov edx, dword [esp + 0x24]
rol ebx, 8
add eax, ebx
xor ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp]
rol ecx, 7
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x1c]
add eax, edx
xor edi, eax
rol edi, 0x10
add ecx, edi
xor edx, ecx
rol edx, 0xc
add eax, edx
xor edi, eax
mov dword [esp], eax
mov eax, dword [esp + 0xc]
rol edi, 8
add ecx, edi
xor edx, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x20]
rol edx, 7
add eax, ebp
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x10]
xor edx, eax
rol edx, 0x10
add ecx, edx
xor ebp, ecx
rol ebp, 0xc
add eax, ebp
xor edx, eax
mov dword [esp + 0xc], eax
mov eax, ecx
mov ecx, dword [esp + 4]
rol edx, 8
add eax, edx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x30]
xor ebp, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
rol ebp, 7
add ecx, edx
xor eax, ecx
mov esi, ecx
mov ecx, dword [esp + 0x2c]
rol eax, 0x10
add ecx, eax
xor edx, ecx
rol edx, 0xc
add esi, edx
xor eax, esi
mov dword [esp + 4], esi
rol eax, 8
add ecx, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
xor edx, ecx
mov esi, ecx
mov ecx, dword [esp + 8]
rol edx, 7
add ecx, edx
xor edi, ecx
rol edi, 0x10
add eax, edi
xor edx, eax
rol edx, 0xc
add ecx, edx
xor edi, ecx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x28]
rol edi, 8
add eax, edi
xor edx, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
rol edx, 7
mov dword [esp + 0x30], edx
mov edx, dword [esp]
add edx, ecx
xor eax, edx
mov dword [esp], edx
mov edx, esi
rol eax, 0x10
mov esi, dword [esp]
add edx, eax
xor ecx, edx
rol ecx, 0xc
add esi, ecx
xor eax, esi
mov dword [esp], esi
mov esi, dword [esp + 0x24]
rol eax, 8
add edx, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
xor ecx, edx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x18]
rol ecx, 7
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x14]
add eax, esi
xor ecx, eax
rol ecx, 0x10
add edx, ecx
xor esi, edx
rol esi, 0xc
add eax, esi
xor ecx, eax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
rol ecx, 8
add edx, ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 4]
xor esi, edx
rol esi, 7
add ecx, ebp
xor ebx, ecx
rol ebx, 0x10
add eax, ebx
xor ebp, eax
rol ebp, 0xc
add ecx, ebp
xor ebx, ecx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 8]
rol ebx, 8
add eax, ebx
xor ebp, eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
rol ebp, 7
add ecx, eax
xor ebx, ecx
rol ebx, 0x10
add edx, ebx
xor eax, edx
rol eax, 0xc
add ecx, eax
xor ebx, ecx
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x1c]
rol ebx, 8
add edx, ebx
xor eax, edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0xc]
rol eax, 7
mov dword [esp + 0x28], eax
mov eax, dword [esp]
add edx, ebp
add eax, esi
xor edi, eax
rol edi, 0x10
add ecx, edi
xor esi, ecx
rol esi, 0xc
add eax, esi
xor edi, eax
mov dword [esp], eax
mov eax, dword [esp + 0x20]
rol edi, 8
add ecx, edi
xor esi, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
rol esi, 7
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x14]
xor ecx, edx
rol ecx, 0x10
add eax, ecx
xor ebp, eax
rol ebp, 0xc
add edx, ebp
xor ecx, edx
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x2c]
rol ecx, 8
add eax, ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 4]
xor ebp, eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
rol ebp, 7
mov dword [esp + 0x38], ebp
add ecx, eax
xor esi, ecx
rol esi, 0x10
add edx, esi
xor eax, edx
rol eax, 0xc
add ecx, eax
xor esi, ecx
mov dword [esp + 4], ecx
mov ecx, esi
mov esi, dword [esp + 0x10]
rol ecx, 8
add edx, ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x20]
xor eax, edx
mov ebp, edx
mov edx, dword [esp + 8]
rol eax, 7
add edx, eax
xor edi, edx
rol edi, 0x10
add ecx, edi
xor eax, ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x28]
rol eax, 0xc
add edx, eax
mov dword [esp + 0x30], eax
mov eax, ebp
xor edi, edx
mov dword [esp + 8], edx
mov edx, dword [esp]
rol edi, 8
add edx, ecx
xor esi, edx
rol esi, 0x10
add eax, esi
xor ecx, eax
rol ecx, 0xc
add edx, ecx
xor esi, edx
mov dword [esp], edx
mov edx, dword [esp + 0x14]
rol esi, 8
add eax, esi
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x24]
xor ecx, eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xc]
rol ecx, 7
mov ebp, ecx
mov ecx, dword [esp + 0x18]
add eax, esi
xor edx, eax
rol edx, 0x10
add ecx, edx
xor esi, ecx
mov dword [esp + 0x18], ecx
rol esi, 0xc
add eax, esi
mov ecx, esi
mov esi, dword [esp + 0x38]
xor edx, eax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
rol edx, 8
mov dword [esp + 0x14], edx
add eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
xor ecx, eax
mov eax, dword [esp + 4]
add eax, esi
xor ebx, eax
rol ebx, 0x10
add edx, ebx
xor esi, edx
rol esi, 0xc
add eax, esi
xor ebx, eax
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
rol ebx, 8
add edx, ebx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x18]
add eax, ebp
xor ebx, eax
rol ebx, 0x10
add edx, ebx
xor ebp, edx
rol ebp, 0xc
add eax, ebp
mov dword [esp + 0xd4], eax
xor eax, ebx
mov ebx, dword [esp + 0x20]
rol eax, 8
mov dword [esp + 0x110], eax
add eax, edx
mov edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xfc], eax
xor eax, ebp
rol edx, 7
mov ebp, dword [esp + 0x30]
rol eax, 7
add ebx, edi
mov dword [esp + 0xe8], eax
mov eax, dword [esp]
xor esi, ecx
xor ebp, ebx
add eax, edx
xor edi, eax
rol edi, 0x10
add ecx, edi
xor edx, ecx
rol edx, 0xc
add eax, edx
mov dword [esp + 0xd8], eax
xor eax, edi
mov edi, dword [esp + 0x10]
rol eax, 8
mov dword [esp + 0x104], eax
add eax, ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x100], eax
xor eax, edx
mov edx, dword [esp + 0x8c]
rol eax, 7
mov dword [esp + 0xec], eax
mov eax, esi
rol eax, 7
add ecx, eax
xor edi, ecx
rol edi, 0x10
add ebx, edi
xor eax, ebx
rol eax, 0xc
add ecx, eax
mov dword [esp + 0xdc], ecx
xor ecx, edi
rol ecx, 8
mov dword [esp + 0x108], ecx
add ecx, ebx
mov dword [esp + 0xf4], ecx
xor ecx, eax
push 0xffffffffffffffc0
pop ebx
mov eax, dword [esp + 4]
mov edi, ebp
mov ebp, dword [esp + 0x14]
rol ecx, 7
movups xmmword [esp + 0x94], xmm0
mov dword [esp + 0xf0], ecx
rol edi, 7
mov ecx, dword [esp + 0x2c]
add eax, edi
xor ebp, eax
rol ebp, 0x10
add ecx, ebp
xor edi, ecx
rol edi, 0xc
add eax, edi
mov dword [esp + 0xe0], eax
xor eax, ebp
rol eax, 8
mov dword [esp + 0x10c], eax
add eax, ecx
mov dword [esp + 0xf8], eax
xor eax, edi
rol eax, 7
mov dword [esp + 0xe4], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], edx
and dword [esp + 0xc8], 0
and dword [esp + 0xcc], 0
and dword [esp + 0xd0], 0
mov eax, ebx
test eax, eax
je 0x410604
mov ecx, dword [esp + eax + 0xd4]
add dword [esp + eax + 0x114], ecx
add eax, 4
jmp 0x4105ed
push 0x10
pop ecx
lea edi, [esp + 0x114]
lea esi, [esp + 0xd4]
mov eax, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x90]
test eax, eax
je 0x410636
movups xmm1, xmmword [esp + eax + 0x154]
movups xmmword [ecx + eax + 0x40], xmm1
add eax, 0x10
jmp 0x410620
inc edx
add ecx, 0x40
jmp 0x40ff1d
add esp, 0x154
pop esi
pop edi
pop ebx
pop ebp
ret