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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x465040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov dword [ebp - 8], 0x28
mov dword [ebp - 0xc], 0x71324e
mov eax, dword [ebp - 0xc]
push esi
mov dword [ebp - 0x1c], edx
mov esi, ecx
push edi
cdq
mov edi, 3
idiv edi
mov ebx, dword [ebp + 8]
mov ecx, 5
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ecx
test edx, edx
je 0x40d9e7
add eax, 2
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40d9c2
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40da7e
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40d9e0
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40d9c8
jmp 0x40da7e
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40d9f8
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40da32
mov ecx, dword [ebp - 0xc]
lea eax, [ebx + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40da7e
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40da25
dec eax
jmp 0x40da26
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40da15
jmp 0x40da7e
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40da7e
mov eax, dword [ebp - 0xc]
lea ecx, [ebx + 0x17]
add eax, 0xb
cdq
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv edi
test edx, edx
jne 0x40da7e
mov ecx, 5
nop word [eax + eax]
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40da70
inc eax
jmp 0x40da71
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv edi
test edx, edx
je 0x40da60
push 0x35
push 0xe6b09957
mov edx, 0x10
call fcn.00404980
add esp, 8
lea edi, [ebx + 0x260]
push edi
push 0x20
push esi
call eax
test eax, eax
je 0x40def7
mov dword [ebp - 0xc], 0x71324e
mov esi, 3
mov eax, dword [ebp - 0xc]
cdq
idiv esi
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40daff
add eax, 2
add eax, edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40dad8
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40db9e
nop
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40daf8
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40dae0
jmp 0x40db9e
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40db10
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40db4d
mov ecx, dword [ebp - 0xc]
lea eax, [edi + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40db9e
mov ecx, 5
nop dword [eax]
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40db40
dec eax
jmp 0x40db41
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40db30
jmp 0x40db9e
mov eax, dword [ebp - 0xc]
mov ecx, 5
cdq
idiv ecx
test edx, edx
je 0x40db9e
mov eax, dword [ebp - 0xc]
lea ecx, [edi + 0x17]
add eax, 0xb
cdq
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv esi
test edx, edx
jne 0x40db9e
mov ecx, 5
nop word [eax + eax]
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40db90
inc eax
jmp 0x40db91
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv esi
test edx, edx
je 0x40db80
push 0x35
push 0xe6b09957
mov edx, 0x10
call fcn.00404980
add esp, 8
lea esi, [ebx + 0x258]
push esi
push 8
push dword [ebp - 0x10]
call eax
test eax, eax
je 0x40def7
mov dword [ebp - 0xc], 0x71324e
mov ecx, 3
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40dc1f
add eax, 2
add eax, esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40dbfa
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40dcbf
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40dc18
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40dc00
jmp 0x40dcbf
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40dc30
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40dc6d
mov ecx, dword [ebp - 0xc]
lea eax, [esi + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40dcbf
mov ecx, 5
nop dword [eax]
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40dc60
dec eax
jmp 0x40dc61
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40dc50
jmp 0x40dcbf
mov eax, dword [ebp - 0xc]
mov ecx, 5
cdq
idiv ecx
test edx, edx
je 0x40dcbf
mov eax, dword [ebp - 0xc]
lea ecx, [esi + 0x17]
add eax, 0xb
cdq
idiv ecx
mov ecx, 3
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
jne 0x40dcbf
nop word [eax + eax]
mov eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40dcb1
inc eax
jmp 0x40dcb2
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
test edx, edx
je 0x40dca0
lea edx, [ebx + 0x218]
mov ecx, 0x40
mov eax, edx
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40dcd0
mov ecx, edi
mov eax, dword [ecx]
mov dword [edx + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [edx + 0x14], eax
mov eax, dword [ecx + 8]
mov dword [edx + 0x18], eax
mov eax, dword [ecx + 0xc]
mov dword [edx + 0x1c], eax
mov eax, dword [ecx + 0x10]
mov dword [edx + 0x20], eax
mov eax, dword [ecx + 0x14]
mov dword [edx + 0x24], eax
mov eax, dword [ecx + 0x18]
mov dword [edx + 0x28], eax
mov eax, dword [ecx + 0x1c]
mov dword [edx + 0x2c], eax
mov dword [edx], 0x61707865
mov dword [edx + 4], 0x3320646e
mov dword [edx + 8], 0x79622d32
mov dword [edx + 0xc], 0x6b206574
mov edx, 8
mov dword [ebx + 0x248], 0
mov dword [ebx + 0x24c], 0
mov eax, dword [esi]
mov dword [ebx + 0x250], eax
mov eax, dword [esi + 4]
mov dword [ebx + 0x254], eax
add ebx, 0x280
mov ecx, ebx
nop dword [eax]
mov eax, dword [edi]
lea edi, [edi + 4]
mov dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x40dd60
mov edi, dword [ebp - 0x18]
mov edx, 2
lea ecx, [edi + 0x2a0]
nop dword [eax]
mov eax, dword [esi]
lea esi, [esi + 4]
mov dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x40dd80
mov dword [ebp - 0xc], 0x71324e
mov esi, 3
mov eax, dword [ebp - 0xc]
cdq
idiv esi
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40dde6
add eax, 2
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40ddc1
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x40de7e
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40dddf
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40ddc7
jmp 0x40de7e
mov eax, dword [ebp - 0xc]
and eax, 0x80000003
jns 0x40ddf7
dec eax
or eax, 0xfffffffc
add eax, 1
je 0x40de31
mov ecx, dword [ebp - 0xc]
lea eax, [ebx + 3]
add ecx, 2
imul ecx, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
test al, 1
jne 0x40de7e
mov ecx, 5
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40de24
dec eax
jmp 0x40de25
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test al, 1
je 0x40de14
jmp 0x40de7e
mov eax, dword [ebp - 0xc]
mov ecx, 5
cdq
idiv ecx
test edx, edx
je 0x40de7e
mov eax, dword [ebp - 0xc]
lea ecx, [ebx + 0x17]
add eax, 0xb
cdq
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv esi
test edx, edx
jne 0x40de7e
mov ecx, 5
nop
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x40de70
inc eax
jmp 0x40de71
dec eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cdq
idiv esi
test edx, edx
je 0x40de60
lea edx, [edi + 4]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40de86
sub ecx, esi
lea eax, [edi + 0x2a9]
sar ecx, 1
movzx esi, cl
add esi, esi
mov byte [edi + 0x2a8], cl
push esi
push edx
push eax
call fcn.00438930
mov eax, dword [ebp - 8]
mov edx, 0x10
inc eax
add eax, esi
push 0x36
push 0xd3bb19e6
mov dword [ebp - 8], eax
call fcn.00404980
add esp, 0x14
lea ecx, [ebp - 8]
push 0x20c
push ecx
push ebx
push 0
push 1
push 0
push dword [ebp - 0x1c]
call eax
neg eax
pop edi
sbb eax, eax
pop esi
neg eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00437671
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00437671
mov esp, ebp
pop ebp
ret