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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x48]
cmp eax, dword [ecx + 8]
jbe 0x541860
sub esp, 0xc8
mov edx, dword [esp + 0xdc]
cmp edx, 0x20
jne 0x5417f8
mov edx, dword [esp + 0xe8]
cmp edx, 0x10
jne 0x54179b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 0xd8]
mov ebx, dword [edx]
mov ebp, dword [edx + 4]
mov esi, dword [edx + 8]
mov edi, dword [edx + 0xc]
mov eax, ebx
mov ebx, dword [edx + 0x10]
mov ecx, ebx
mov ebx, dword [edx + 0x14]
mov dword [esp + 0x94], ebx
mov ebx, dword [edx + 0x18]
mov dword [esp + 0x90], ebx
mov edx, dword [edx + 0x1c]
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0xe4]
mov ebx, dword [edx]
mov dword [esp + 0x88], ebx
mov ebx, dword [edx + 4]
mov dword [esp + 0x84], ebx
mov ebx, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0xc0], eax
xor eax, eax
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x20], eax
mov dword [esp + 0xb0], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x54], ecx
mov dword [esp + 0xa8], edx
mov edx, dword [esp + 0x8c]
mov dword [esp + 0x50], edx
mov dword [esp + 0xa0], ebx
mov ebx, 0x61707865
mov dword [esp + 0x64], ebx
mov ebx, 0x3320646e
mov dword [esp + 0x68], ebx
mov ebx, 0x79622d32
mov dword [esp + 0x74], ebx
mov ebx, 0x6b206574
mov dword [esp + 0x78], ebx
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x98], ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x6c], ebp
mov ebx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa8]
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0xb0]
mov ebp, dword [esp + 0x98]
jmp 0x541707
mov dword [esp + 0x60], edx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], ebp
mov edx, dword [esp + 0x64]
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], eax
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x24], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ebx
mov ebp, dword [esp + 0x68]
mov dword [esp], ebp
mov ebp, dword [esp + 0x30]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x20]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x6c]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x58], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x20], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x48], ebx
mov ebp, dword [esp + 0x74]
mov dword [esp], ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x54], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x44], ebx
mov ebp, dword [esp + 0x78]
mov dword [esp], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x60]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x50], edx
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x5c]
mov dword [esp], ebp
mov ebp, dword [esp + 0x30]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ebx
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x5c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x54], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x40], ebx
mov ebp, dword [esp + 0x58]
mov dword [esp], ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x58], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x50], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x4c], ebx
mov ebp, dword [esp + 0x3c]
mov dword [esp], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x24]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x48]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x24], edx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x48], ebx
mov ebp, dword [esp + 0x38]
mov dword [esp], ebp
mov ebp, dword [esp + 0x34]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0x20]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x44]
mov dword [esp + 0xc], ebp
call fcn.00540550
mov eax, dword [esp + 0x80]
inc eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x80], eax
mov eax, edx
mov dword [esp + 0x20], ebx
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ecx
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x6c], edx
mov ebx, ebp
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x80]
cmp edi, 0xa
jl 0x5414a0
mov ecx, dword [esp + 0xd0]
cmp ecx, 0x1f
jbe 0x541855
mov eax, dword [esp + 0x64]
mov ebp, dword [esp + 0xcc]
mov dword [ebp], eax
mov eax, dword [esp + 0x68]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x74]
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x78]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x7c]
mov dword [ebp + 0x10], eax
mov eax, dword [esp + 0x6c]
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x1c], edx
mov dword [esp + 0xf0], ebp
mov dword [esp + 0xf4], ecx
mov eax, dword [esp + 0xd4]
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], 0
mov dword [esp + 0x100], 0
add esp, 0xc8
ret
lea eax, [0x64d2c0]
mov dword [esp], eax
call fcn.0040c800
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x24
lea ecx, [0x685be1]
mov dword [eax], ecx
mov dword [esp + 0xf0], 0
mov dword [esp + 0xf4], 0
mov dword [esp + 0xf8], 0
lea ecx, [0x6cadb0]
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x100], eax
add esp, 0xc8
ret
lea eax, [0x64d2c0]
mov dword [esp], eax
call fcn.0040c800
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x22
lea ecx, [0x68505b]
mov dword [eax], ecx
mov dword [esp + 0xf0], 0
mov dword [esp + 0xf4], 0
mov dword [esp + 0xf8], 0
lea ecx, [0x6cadb0]
mov dword [esp + 0xfc], ecx
mov dword [esp + 0x100], eax
add esp, 0xc8
ret
mov eax, 0x1f
call fcn.0045c9a0
nop
call fcn.0045b380
jmp fcn.00541340