Function at 0x59bc80
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 - 0x2c]
cmp eax, dword [ecx + 8]
jbe 0x59c1ac
sub esp, 0xac
mov eax, dword [esp + 0xc0]
cmp eax, 0x20
jne 0x59be10
mov eax, dword [esp + 0xcc]
cmp eax, 0x10
jne 0x59bdb3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax]
mov dword [esp + 0x80], ecx
mov edx, dword [eax + 4]
mov ebx, dword [eax + 8]
mov ebp, dword [eax + 0xc]
mov esi, dword [eax + 0x10]
mov edi, dword [eax + 0x14]
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x7c], ecx
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0xc8]
mov ecx, dword [eax]
mov dword [esp + 0x74], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x70], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0xa4], eax
xor eax, eax
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x34], eax
mov dword [esp + 0x9c], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 0x50], edx
mov dword [esp + 0x8c], ebx
mov ebx, 0x61707865
mov dword [esp + 0x5c], ebx
mov ebx, 0x3320646e
mov dword [esp + 0x58], ebx
mov ebx, 0x79622d32
mov dword [esp + 0x3c], ebx
mov ebx, 0x6b206574
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x84], ebp
mov ebp, dword [esp + 0x70]
mov dword [esp + 0x64], ebp
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0xa4]
mov edx, dword [esp + 0x94]
mov ebx, dword [esp + 0x8c]
mov ebp, dword [esp + 0x84]
jmp 0x59c0c0
lea eax, [0x687ca0]
mov dword [esp], eax
call fcn.0040af90
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x24
lea ecx, [0x6c5298]
mov dword [eax], ecx
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0
lea ecx, [0x895524]
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], eax
add esp, 0xac
ret
lea eax, [0x687ca0]
mov dword [esp], eax
call fcn.0040af90
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x22
lea ecx, [0x6c44bc]
mov dword [eax], ecx
mov dword [esp + 0xd4], 0
mov dword [esp + 0xd8], 0
mov dword [esp + 0xdc], 0
lea ecx, [0x895524]
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], eax
add esp, 0xac
ret
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], eax
call fcn.0059b040
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 + 0x58]
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 + 0x64]
mov dword [esp + 0xc], ebp
call fcn.0059b040
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 + 0x3c]
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 + 0x44]
mov dword [esp + 0xc], ebp
call fcn.0059b040
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 + 0x38]
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.0059b040
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.0059b040
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.0059b040
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.0059b040
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.0059b040
mov eax, dword [esp + 0x6c]
inc eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x6c], eax
mov esi, dword [esp + 0x24]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x38], ecx
mov ebp, dword [esp + 0x4c]
mov dword [esp + 0x68], ebp
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x64], ebp
mov ecx, ebx
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x6c]
cmp ebp, 0xa
jl 0x59be6d
mov edx, dword [esp + 0x5c]
mov ebx, dword [esp + 0xb0]
mov dword [ebx], edx
mov edx, dword [esp + 0xb8]
lea ebp, [edx - 4]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 4
mov esi, dword [esp + 0x58]
mov dword [ebx + ebp], esi
lea ebp, [edx - 8]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 8
mov esi, dword [esp + 0x3c]
mov dword [ebx + ebp], esi
lea ebp, [edx - 0xc]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 0xc
mov esi, dword [esp + 0x38]
mov dword [ebx + ebp], esi
lea ebp, [edx - 0x10]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 0x10
mov esi, dword [esp + 0x68]
mov dword [ebx + ebp], esi
lea ebp, [edx - 0x14]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 0x14
mov esi, dword [esp + 0x64]
mov dword [ebx + ebp], esi
lea ebp, [edx - 0x18]
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and ebp, 0x18
mov dword [ebx + ebp], ecx
lea ecx, [edx - 0x1c]
neg ecx
sar ecx, 0x1f
and ecx, 0x1c
mov dword [ebx + ecx], eax
mov dword [esp + 0xd4], ebx
mov eax, dword [esp + 0xb4]
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], edx
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0
add esp, 0xac
ret
call fcn.0045e260
jmp fcn.0059bc80