Function at 0x10f3912
Capabilities:
Allocate or change rwx memory
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
push edi
pushfd
push ebp
mov ebp, esp
sub esp, 0x124
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x114], ecx
mov ecx, 0xfffffff
mov dword [ebp - 0x120], edx
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x110], edi
lea edi, [ebp + 4]
sub edi, 4
mov dword [ebp - 0xc4], edi
add edi, 0xc
mov esi, dword [edi]
mov ebx, dword [esi]
mov eax, dword [esi + 4]
and eax, ecx
and ebx, ecx
mov ecx, dword [0x10d4588]
mov dword [ebp - 0x68], ecx
xor edx, edx
lea ecx, [ecx + eax - 1]
mov eax, ecx
div dword [ebp - 0x68]
mov eax, dword [0x10d4588]
mov dword [ebp - 0xb8], edi
add ebx, 0x1000000
mov dword [ebp - 0xc8], ebx
sub ecx, edx
mov dword [ebp - 0x70], ecx
mov eax, dword [0x10f17c8]
mov dword [ebp - 0x6c], eax
mov eax, dword [0x10d4588]
mov eax, dword [0x10f17c8]
test eax, eax
je 0x10f3a41
and dword [ebp - 0x64], 0
mov eax, dword [0x10f17c8]
dec eax
lea ecx, [eax + 1]
xor eax, eax
test ecx, ecx
mov dword [ebp - 0x5c], ecx
je 0x10f39ea
mov edx, dword [0x113b250]
shr dword [ebp - 0x5c], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x113b250], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x5c], 0
jne 0x10f39c0
xor edx, edx
div ecx
cmp dword [ebp - 0x6c], 0
mov dword [ebp - 0x5c], edx
jbe 0x10f3a33
inc dword [ebp - 0x64]
lea edx, [edx*4 + 0x113b06c]
mov ecx, 0xffffdc52
mov eax, 0x23ad
lock cmpxchg dword [edx], ecx
cmp eax, 0x23ad
je 0x10f3ed1
mov ecx, dword [0x10f17c8]
mov eax, dword [ebp - 0x5c]
inc eax
xor edx, edx
div ecx
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
cmp eax, dword [ebp - 0x6c]
jb 0x10f39f7
and dword [ebp - 0x60], 0
cmp dword [ebp - 0x60], 0
jne 0x10f3ac2
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 0x5c], 0
mov dword [ebp - 0x68], eax
inc dword [ebp - 0x5c]
push 0x40
push 0x1000
push dword [ebp - 0x70]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x10f3ee8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x5c], 0x11
jb 0x10f3a4e
and dword [ebp - 0x60], 0
mov eax, dword [ebp - 0x60]
cmp eax, 0x10000
jb 0x10f3a8a
test al, 3
je 0x10f3aa0
test eax, eax
je 0x10f3a9c
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
and dword [ebp - 0x60], 0
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x10f3990
mov ecx, dword [ebp - 0x70]
test ecx, ecx
je 0x10f3ac2
mov byte [eax], 0
inc eax
dec ecx
jne 0x10f3abb
mov eax, 0x9a73fdfd
add dword [edi], 8
mov esi, dword [esi + 4]
and esi, 0xfffffff
lea eax, [esi + ebx]
mov dword [ebp - 0x68], eax
mov eax, dword [0x10d4588]
mov dword [ebp - 0x64], ebx
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x64], 0x1000000
mov dword [ebp - 0xbc], esi
mov dword [ebp - 0x5c], ecx
xor eax, eax
test ecx, ecx
je 0x10f3b26
mov edx, dword [0x113b250]
shr dword [ebp - 0x5c], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x113b250], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x5c], 0
jne 0x10f3afc
xor edx, edx
div ecx
mov eax, dword [ebp - 0x60]
push esi
push dword [ebp - 0x64]
add eax, edx
mov dword [ebp - 0x5c], eax
mov eax, 0xaed58075
test esi, esi
mov eax, dword [ebp - 0x5c]
pop ecx
pop ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], eax
je 0x10f3f29
mov esi, dword [ebp - 0x68]
lea edi, [ebp - 0x54]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x108], eax
mov dword [ebp - 0xe0], eax
xor eax, eax
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
mov dword [ebp - 0xec], eax
mov dword [ebp - 0xe8], eax
mov eax, dword [0x1009a74]
mov dword [ebp - 0x10c], eax
mov eax, dword [0x1009a78]
mov dword [ebp - 0xf8], eax
mov eax, dword [0x1009a7c]
mov dword [ebp - 0xe4], eax
mov eax, dword [0x1009a80]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x104], ecx
mov dword [ebp - 0xdc], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
sub ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x100], edx
mov dword [ebp - 0xfc], esi
mov dword [ebp - 0xd8], edx
mov dword [ebp - 0xd4], esi
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xb4], ebx
lea esi, [ebp - 0x10c]
lea edi, [ebp - 0xb0]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x80]
mov esi, dword [ebp - 0xb0]
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0xc0], 3
lea edi, [edx + esi]
mov ebx, dword [ebp - 0xac]
rol edi, 7
xor eax, edi
lea edi, [esi + eax]
rol edi, 9
xor ecx, edi
lea edi, [eax + ecx]
rol edi, 0xd
xor edx, edi
lea edi, [ecx + edx]
ror edi, 0xe
xor esi, edi
mov edi, dword [ebp - 0x9c]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0x8c], ebx
mov ebx, dword [ebp - 0x8c]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x7c], edi
mov edi, ebx
mov ebx, dword [ebp - 0x7c]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0x7c]
xor dword [ebp - 0xac], ebx
mov ebx, dword [ebp - 0xac]
add edi, ebx
mov ebx, dword [ebp - 0x88]
ror edi, 0xe
xor dword [ebp - 0x9c], edi
mov edi, dword [ebp - 0x98]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x78], edi
mov edi, ebx
mov ebx, dword [ebp - 0x78]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xa8], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa8]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xa8]
xor dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0x98]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x74]
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x84]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xa4], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa4]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x94], edi
mov edi, ebx
mov ebx, dword [ebp - 0x94]
add ebx, edi
mov edi, dword [ebp - 0x94]
rol ebx, 0xd
xor dword [ebp - 0x84], ebx
mov ebx, dword [ebp - 0x84]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x74], edi
mov edi, dword [ebp - 0xa4]
add edi, esi
rol edi, 7
xor dword [ebp - 0xac], edi
mov edi, dword [ebp - 0xac]
add edi, esi
rol edi, 9
xor dword [ebp - 0xa8], edi
mov ebx, dword [ebp - 0xa8]
mov edi, dword [ebp - 0xac]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xa8]
xor dword [ebp - 0xa4], ebx
mov ebx, dword [ebp - 0xa4]
add ebx, edi
mov edi, dword [ebp - 0x9c]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0x98], edi
mov ebx, dword [ebp - 0x98]
mov edi, dword [ebp - 0x9c]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0x98]
xor dword [ebp - 0x94], ebx
mov ebx, dword [ebp - 0x94]
add ebx, edi
rol ebx, 0xd
xor eax, ebx
mov ebx, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x94]
add edi, eax
ror edi, 0xe
xor dword [ebp - 0x9c], edi
mov edi, dword [ebp - 0x88]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x84], edi
mov edi, dword [ebp - 0x88]
mov ebx, dword [ebp - 0x84]
add ebx, edi
rol ebx, 9
xor ecx, ebx
mov ebx, dword [ebp - 0x78]
mov edi, dword [ebp - 0x84]
add edi, ecx
rol edi, 0xd
xor dword [ebp - 0x8c], edi
mov edi, dword [ebp - 0x8c]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x74]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x74]
add edi, edx
rol edi, 9
xor dword [ebp - 0x7c], edi
mov edi, dword [ebp - 0x7c]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x78], edi
mov ebx, dword [ebp - 0x78]
mov edi, dword [ebp - 0x7c]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x74], ebx
dec dword [ebp - 0xc0]
jne 0x10f3c28
mov dword [ebp - 0x80], edx
xor edx, edx
push 0x40
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0xb0], esi
xor eax, eax
pop ebx
mov ecx, dword [ebp + eax - 0x10c]
add dword [ebp + eax - 0xb0], ecx
add eax, 4
cmp eax, ebx
jl 0x10f3e6a
lea esi, [ebp - 0xb0]
lea edi, [ebp - 0x44]
inc dword [ebp - 0xec]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0x60], ebx
jbe 0x10f3ef0
mov esi, dword [ebp - 0xcc]
mov eax, dword [ebp - 0xb4]
lea edi, [esi + eax]
lea ecx, [ebp + edx - 0x44]
mov al, byte [edi + ecx]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
mov byte [esi + ecx], al
inc edx
cmp edx, ebx
jb 0x10f3ea7
sub dword [ebp - 0x60], ebx
add dword [ebp - 0x6c], ebx
add esi, ebx
add dword [ebp - 0x70], ebx
mov dword [ebp - 0xcc], esi
jmp 0x10f3bf8
mov eax, dword [0x10d4588]
imul eax, dword [ebp - 0x5c]
lea eax, [eax + 0x1109044]
mov dword [ebp - 0x60], eax
jmp 0x10f3a37
mov dword [ebp - 0x60], eax
jmp 0x10f3a7c
cmp dword [ebp - 0x60], edx
jbe 0x10f3f17
mov esi, dword [ebp - 0x70]
mov edi, dword [ebp - 0x6c]
lea eax, [ebp - 0x44]
sub esi, eax
sub edi, eax
lea ecx, [ebp + edx - 0x44]
mov al, byte [esi + ecx]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
inc edx
mov byte [edi + ecx], al
cmp edx, dword [ebp - 0x60]
jb 0x10f3f02
mov edi, dword [ebp - 0xb8]
mov esi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xc8]
mov eax, dword [ebp - 0x68]
movzx ecx, byte [ebp - 0x55]
movzx eax, byte [eax + 0x10]
sub ecx, eax
je 0x10f3fd3
lea ebp, [ebp - 0x63b27828]
call fcn.01020e87
mov edx, 0xffff
mov esi, eax
and edi, 0xfffffffc
mov eax, 0xfffff000
lea ecx, [edi + 0xfff]
and esi, eax
and ecx, eax
mov eax, dword [ebp - 0xc4]
mov dword [eax + 8], 0x10fe507
xor eax, eax
mov ebx, dword [0x113b250]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x113b250], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x10f3f6f
mov ebx, 0xffff
div ebx
mov dword [ebp - 0x120], esi
inc edx
mov eax, edi
cmp edi, ecx
mov dword [ebp - 0x114], edx
mov dword [ebp - 0xb4], 0
jae 0x10f3fc9
mov edx, dword [ebp - 0xb4]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jb 0x10f3fba
mov eax, 0x10fe507
jmp 0x10f40ae
mov edi, dword [ebp - 0x5c]
mov eax, ebx
mov edx, dword [0x100b3f0]
sub eax, edi
mov ecx, 0x1000000
mov dword [ebp - 0xb8], eax
sub ecx, edx
mov dword [ebp - 0x68], ecx
jne 0x10f3ffa
test eax, eax
je 0x10f40a1
mov ecx, dword [0x10b82b8]
mov eax, dword [ebp - 0x64]
sub edi, ebx
add eax, esi
xor ebx, ebx
dec ecx
mov dword [ebp - 0xb4], eax
js 0x10f403a
lea eax, [ecx + ebx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x10b82bc]
and edx, 0xfffffff
cmp dword [ebp - 0x64], edx
jae 0x10f4031
lea ecx, [eax - 1]
jmp 0x10f4036
jbe 0x10f403e
lea ebx, [eax + 1]
cmp ecx, ebx
jge 0x10f4012
mov esi, ebx
jmp 0x10f4099
mov esi, eax
jmp 0x10f4099
mov eax, dword [esi*4 + 0x10b82bc]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0xb4]
jae 0x10f40a1
lea edx, [ecx + edi + 0x1000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor ebx, ebx
dec ecx
je 0x10f4089
dec ecx
je 0x10f4081
dec ecx
jne 0x10f4092
mov ebx, dword [ebp - 0x68]
jmp 0x10f4092
mov ebx, dword [ebp - 0xb8]
jmp 0x10f4092
mov ebx, dword [ebp - 0x68]
sub ebx, dword [ebp - 0xb8]
dec eax
dec eax
jne 0x10f4098
add dword [edx], ebx
inc esi
cmp esi, dword [0x10b82b8]
jb 0x10f4042
mov eax, dword [0x10d4588]
mov eax, 0x7273a315
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0xc4]
mov dword [ecx + 8], eax
mov edi, dword [ebp - 0x110]
mov esi, dword [ebp - 0x124]
mov ebx, dword [ebp - 0x118]
mov eax, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x114]
mov esp, ebp
pop ebp
popfd
ret