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

Disassembly:
pushfd
push ebp
mov ebp, esp
sub esp, 0x150
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x140], edi
mov ebx, dword [0x1007b9bc]
lea eax, [ebp + 4]
mov edi, 0xfffffff
mov esi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0xe8], eax
mov eax, dword [esi]
shr eax, 2
and eax, edi
lea ecx, [ebx + eax - 1]
xor edx, edx
mov eax, ecx
div ebx
mov eax, dword [0x1007b9bc]
sub ecx, edx
mov dword [ebp - 0x7c], ecx
mov eax, dword [0x10012044]
mov dword [ebp - 0x74], eax
mov eax, dword [0x1007b9bc]
mov eax, dword [0x10012044]
test eax, eax
je 0x10001dfe
and dword [ebp - 0x68], 0
mov eax, dword [0x10012044]
dec eax
lea ecx, [eax + 1]
xor eax, eax
test ecx, ecx
mov edx, ecx
je 0x10001db6
mov ebx, dword [0x1012ee38]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x1012ee38], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x10001d8f
xor edx, edx
div ecx
cmp dword [ebp - 0x74], 0
jbe 0x10001df8
mov ecx, 0xffffc390
mov eax, 0x3c6f
inc dword [ebp - 0x68]
lea ebx, [edx*4 + 0x1012ee90]
lock cmpxchg dword [ebx], ecx
cmp eax, 0x3c6f
je 0x10001fc1
lea eax, [edx + 1]
xor edx, edx
mov ecx, dword [0x10012044]
div ecx
mov eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x74]
jb 0x10001dc0
xor ebx, ebx
test ebx, ebx
jne 0x10001e77
call dword [sym.imp.kernel32.dll_GetLastError]
xor ebx, ebx
mov dword [ebp - 0x6c], eax
push 0x40
push 0x1000
inc ebx
push dword [ebp - 0x7c]
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
test eax, eax
jne 0x10001fd5
push eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp ebx, 0x11
jb 0x10001e09
xor ebx, ebx
cmp dword [0x1011fbc8], ebx
ja 0x10001e42
test ebx, 3
je 0x10001e56
test ebx, ebx
je 0x10001e54
push 0x8000
push 0
push ebx
call dword [sym.imp.kernel32.dll_VirtualFree]
xor ebx, ebx
push dword [ebp - 0x6c]
call dword [sym.imp.kernel32.dll_SetLastError]
test ebx, ebx
je 0x10001d60
mov eax, ebx
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
je 0x10001e77
mov byte [eax], 0
inc eax
dec ecx
jne 0x10001e70
mov eax, 0x83b92bee
mov eax, dword [esi + 4]
and eax, 7
lea eax, [eax + esi + 8]
mov esi, dword [esi]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x68], eax
shr esi, 2
and esi, edi
mov edi, 0x10000000
lea ecx, [esi + eax]
mov eax, dword [0x1007b9bc]
mov dword [ebp - 0x6c], ecx
sub eax, esi
lea ecx, [eax + 1]
sub dword [ebp - 0x78], edi
xor eax, eax
test ecx, ecx
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0x5c], ecx
je 0x10001ee4
mov edx, dword [0x1012ee38]
shr dword [ebp - 0x5c], 0x10
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [0x1012ee38], edx
shr edx, 0x10
shl eax, 0x10
or eax, edx
cmp dword [ebp - 0x5c], 0
jne 0x10001eba
xor edx, edx
div ecx
add ebx, edx
push ebx
push esi
push dword [ebp - 0x78]
mov dword [ebp - 0xc8], ebx
mov eax, 0x53048532
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x68]
add esp, 0xc
mov dword [ebp - 0x74], ebx
mov ebx, 0xfffff000
test esi, esi
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0x7c], eax
je 0x100025fa
lea eax, [ebp - 0xf0]
push eax
mov eax, 0x7cfdf9d0
mov esi, dword [ebp - 0xf0]
and dword [ebp - 0x64], 0
mov eax, 0xfffffff
and dword [ebp - 0x60], 0
pop ecx
mov ecx, dword [ebp - 0xec]
and ecx, eax
and esi, eax
add esi, edi
mov eax, edi
mov dword [ebp - 0x5c], ecx
mov ecx, dword [0x1001256c]
sub eax, ecx
mov dword [ebp - 0xf8], eax
jne 0x10001fdc
xor edx, edx
cmp dword [ebp - 0x5c], edx
jbe 0x1000220b
mov edi, 0x2aa66c86
movzx eax, byte [edx + esi]
add eax, edi
add dword [ebp - 0x64], eax
add eax, dword [ebp - 0x60]
imul eax, eax, 0x2aa66c86
ror eax, 0x14
imul eax, eax, 0x2aa66c86
ror eax, 0x14
mov ecx, eax
imul eax, eax, 0x2434
rol eax, 6
ror ecx, 6
xor eax, ecx
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
inc edx
cmp edx, dword [ebp - 0x5c]
jb 0x10001f82
jmp 0x1000220b
mov ebx, dword [0x1007b9bc]
imul ebx, edx
lea ebx, [ebx + section..data]
jmp 0x10001dfa
mov ebx, eax
jmp 0x10001e32
mov eax, dword [ebp - 0x5c]
add eax, esi
mov ecx, esi
mov edx, dword [0x1000003c]
lea edx, [edx + 0x100000a0]
mov dword [ebp - 0x70], eax
mov eax, dword [edx]
add eax, edi
sub ecx, edi
mov edi, ecx
mov edx, dword [edx + 4]
mov dword [ebp - 0xcc], edx
mov edx, ecx
and edi, ebx
sub edx, edi
mov dword [ebp - 0xe4], edx
mov edx, dword [ebp - 0x5c]
add ecx, edx
mov edx, ecx
and edx, ebx
sub ecx, edx
mov dword [ebp - 0xdc], ecx
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0xe0], edx
add ecx, eax
mov dword [ebp - 0xd8], ecx
cmp eax, ecx
je 0x10002047
cmp dword [eax], edi
jae 0x10002047
add eax, dword [eax + 4]
cmp eax, dword [ebp - 0xd8]
jne 0x10002038
and dword [ebp - 0xd0], 0
cmp eax, dword [ebp - 0xd8]
je 0x10002088
cmp dword [eax], edi
jne 0x10002088
mov edx, dword [eax + 4]
sub edx, 8
shr edx, 1
je 0x10002088
lea ecx, [eax + 8]
movzx edi, word [ecx]
and edi, 0xfff
cmp edi, dword [ebp - 0xe4]
jae 0x10002088
inc dword [ebp - 0xd0]
inc ecx
inc ecx
cmp dword [ebp - 0xd0], edx
jne 0x10002067
mov edi, 0x2aa66c86
mov edx, dword [ebp - 0xe0]
cmp eax, dword [ebp - 0xd8]
je 0x100021c9
cmp dword [eax], edx
ja 0x100021c9
mov ecx, dword [eax + 4]
lea ebx, [ecx - 8]
shr ebx, 1
cmp dword [ebp - 0xd0], ebx
jne 0x100020d6
add eax, ecx
cmp eax, dword [ebp - 0xd8]
je 0x100021c9
cmp dword [eax], edx
ja 0x100021c9
and dword [ebp - 0xd0], 0
jmp 0x100020a7
cmp dword [eax], edx
jne 0x100020f7
mov ecx, dword [ebp - 0xd0]
movzx ecx, word [eax + ecx*2 + 8]
and ecx, 0xfff
cmp ecx, dword [ebp - 0xdc]
jae 0x100021c9
mov ebx, 0xf000
mov ecx, dword [ebp - 0xd0]
inc dword [ebp - 0xd0]
test word [eax + ecx*2 + 8], bx
je 0x10002093
movzx edx, word [eax + ecx*2 + 8]
mov ecx, dword [eax]
and edx, 0xfff
xor ebx, ebx
lea ecx, [ecx + edx + 0x10000000]
mov dword [ebp - 0x5c], ecx
sub dword [ebp - 0x5c], esi
mov dword [ebp - 0xe4], ecx
je 0x10002173
movzx edx, byte [ebx + esi]
add edx, edi
add dword [ebp - 0x64], edx
add edx, dword [ebp - 0x60]
imul edx, edx, 0x2aa66c86
ror edx, 0x14
imul edx, edx, 0x2aa66c86
ror edx, 0x14
mov ecx, edx
imul ecx, ecx, 0x2434
rol ecx, 6
ror edx, 6
xor ecx, edx
add dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], ecx
inc ebx
cmp ebx, dword [ebp - 0x5c]
jb 0x10002133
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ecx]
sub edx, dword [ebp - 0xf8]
mov dword [ebp - 0xf4], edx
xor ebx, ebx
movzx edx, byte [ebp + ebx - 0xf4]
add edx, edi
add dword [ebp - 0x64], edx
add edx, dword [ebp - 0x60]
imul edx, edx, 0x2aa66c86
ror edx, 0x14
imul edx, edx, 0x2aa66c86
ror edx, 0x14
mov esi, edx
imul edx, edx, 0x2434
rol edx, 6
ror esi, 6
xor edx, esi
add dword [ebp - 0x64], edx
inc ebx
cmp ebx, 4
mov dword [ebp - 0x60], edx
jb 0x10002183
lea esi, [ecx + 4]
jmp 0x1000208d
mov ebx, dword [ebp - 0x70]
xor edx, edx
sub ebx, esi
je 0x1000220b
movzx eax, byte [edx + esi]
add eax, edi
add dword [ebp - 0x64], eax
add eax, dword [ebp - 0x60]
imul eax, eax, 0x2aa66c86
ror eax, 0x14
imul eax, eax, 0x2aa66c86
ror eax, 0x14
mov ecx, eax
imul eax, eax, 0x2434
rol eax, 6
ror ecx, 6
xor eax, ecx
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
inc edx
cmp edx, ebx
jb 0x100021d2
xor edi, edi
xor eax, eax
mov ecx, eax
and ecx, 7
mov cl, byte [ebp + ecx - 0x64]
mov byte [ebp + eax - 0x54], cl
inc eax
cmp eax, 0x10
jb 0x1000220f
mov eax, 0xfa75f882
mov esi, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x10c], eax
mov eax, dword [0x10120760]
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x108], ecx
mov ecx, dword [eax]
mov dword [ebp - 0x138], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x124], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0xc8]
mov dword [ebp - 0x12c], edx
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x104], edx
mov dword [ebp - 0x100], esi
mov dword [ebp - 0x120], edi
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x70], eax
push 0x10
lea edi, [ebp - 0xbc]
pop ecx
lea esi, [ebp - 0x138]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0xac]
mov ecx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0xbc]
mov dword [ebp - 0x5c], 2
mov ebx, dword [ebp - 0xb8]
lea edi, [edx + esi]
rol edi, 7
xor eax, edi
lea edi, [esi + eax]
rol edi, 9
xor ecx, edi
lea edi, [ecx + eax]
rol edi, 0xd
xor edx, edi
lea edi, [ecx + edx]
ror edi, 0xe
xor esi, edi
mov edi, dword [ebp - 0xa8]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0x98]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x88], edi
mov edi, ebx
mov ebx, dword [ebp - 0x88]
add ebx, edi
mov edi, dword [ebp - 0x88]
rol ebx, 0xd
xor dword [ebp - 0xb8], ebx
mov ebx, dword [ebp - 0xb8]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x94]
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0xa4]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x84], edi
mov edi, ebx
mov ebx, dword [ebp - 0x84]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xb4], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb4]
add ebx, edi
mov edi, dword [ebp - 0xb4]
rol ebx, 0xd
xor dword [ebp - 0xa4], ebx
mov ebx, dword [ebp - 0xa4]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x80]
xor dword [ebp - 0x94], edi
mov edi, dword [ebp - 0x90]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xb0], edi
mov edi, ebx
mov ebx, dword [ebp - 0xb0]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xa0], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov edi, dword [ebp - 0xa0]
rol ebx, 0xd
xor dword [ebp - 0x90], ebx
mov ebx, dword [ebp - 0x90]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x80], edi
mov edi, dword [ebp - 0xb0]
add edi, esi
rol edi, 7
xor dword [ebp - 0xb8], edi
mov edi, dword [ebp - 0xb8]
add edi, esi
rol edi, 9
xor dword [ebp - 0xb4], edi
mov ebx, dword [ebp - 0xb4]
mov edi, dword [ebp - 0xb8]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xb4]
xor dword [ebp - 0xb0], ebx
mov ebx, dword [ebp - 0xb0]
add ebx, edi
mov edi, dword [ebp - 0xa8]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0xa4], edi
mov ebx, dword [ebp - 0xa4]
mov edi, dword [ebp - 0xa8]
add ebx, edi
mov edi, dword [ebp - 0xa4]
rol ebx, 9
xor dword [ebp - 0xa0], ebx
mov ebx, dword [ebp - 0xa0]
add ebx, edi
mov edi, dword [ebp - 0xa0]
rol ebx, 0xd
xor eax, ebx
mov ebx, dword [ebp - 0x98]
add edi, eax
ror edi, 0xe
xor dword [ebp - 0xa8], edi
mov edi, dword [ebp - 0x94]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x90], edi
mov ebx, dword [ebp - 0x90]
mov edi, dword [ebp - 0x94]
add ebx, edi
mov edi, dword [ebp - 0x90]
rol ebx, 9
xor ecx, ebx
mov ebx, dword [ebp - 0x84]
add edi, ecx
rol edi, 0xd
xor dword [ebp - 0x98], edi
mov edi, dword [ebp - 0x98]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x94], edi
mov edi, dword [ebp - 0x80]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x80]
add edi, edx
rol edi, 9
xor dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x88]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x84], edi
mov edi, dword [ebp - 0x88]
mov ebx, dword [ebp - 0x84]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x80], ebx
dec dword [ebp - 0x5c]
jne 0x100022f0
mov dword [ebp - 0x8c], edx
push 0x40
mov dword [ebp - 0xac], eax
xor edx, edx
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xbc], esi
pop ebx
xor eax, eax
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xbc], ecx
add eax, 4
cmp eax, ebx
jl 0x10002553
lea esi, [ebp - 0xbc]
inc dword [ebp - 0x118]
lea edi, [ebp - 0x44]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0xc0], ebx
jbe 0x100025bd
mov esi, dword [ebp - 0xcc]
mov eax, dword [ebp - 0x70]
lea edi, [esi + eax]
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + edi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
inc edx
cmp edx, ebx
mov byte [ecx + esi], al
jb 0x10002590
sub dword [ebp - 0xc0], ebx
add dword [ebp - 0x74], ebx
add esi, ebx
add dword [ebp - 0x7c], ebx
mov dword [ebp - 0xcc], esi
jmp 0x100022c0
cmp dword [ebp - 0xc0], edx
jbe 0x100025ea
mov edi, dword [ebp - 0x74]
mov esi, dword [ebp - 0x7c]
lea eax, [ebp - 0x44]
sub esi, eax
sub edi, eax
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + esi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
inc edx
mov byte [ecx + edi], al
cmp edx, dword [ebp - 0xc0]
jb 0x100025d2
mov edi, 0x10000000
mov esi, dword [ebp - 0xc4]
mov ebx, 0xfffff000
mov eax, dword [ebp - 0x6c]
mov al, byte [eax + 8]
xor al, byte [ebp - 0x55]
je 0x10002692
call fcn.1007bc92
mov edi, eax
mov eax, dword [ebp - 0xe8]
mov edx, 0xffff
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
mov dword [eax + 8], 0x100f1b6e
and edi, ebx
lea esi, [ecx + 0xfff]
and esi, ebx
xor eax, eax
mov ebx, dword [0x1012ee38]
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov dword [0x1012ee38], ebx
shr ebx, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, ebx
test edx, edx
jne 0x10002634
mov ebx, 0xffff
div ebx
mov eax, ecx
mov dword [ebp - 0x150], edi
inc edx
cmp ecx, esi
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x70], 0
jae 0x10002688
mov ecx, dword [ebp - 0x70]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x1000267c
mov eax, 0x100f1b6e
jmp 0x1000276e
mov ecx, dword [0x1001256c]
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0xc8]
mov dword [ebp - 0xc4], eax
sub edi, ecx
mov dword [ebp - 0x6c], edi
jne 0x100026b6
test eax, eax
je 0x1000275e
mov ecx, dword [0x10103928]
mov eax, dword [ebp - 0x78]
mov edi, dword [ebp - 0xc8]
sub edi, dword [ebp - 0x68]
add eax, esi
xor esi, esi
mov dword [ebp - 0x70], eax
dec ecx
js 0x100026fa
lea eax, [esi + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x1010392c]
and edx, 0xfffffff
cmp dword [ebp - 0x78], edx
jae 0x100026f1
lea ecx, [eax - 1]
jmp 0x100026f6
jbe 0x100026fe
lea esi, [eax + 1]
cmp ecx, esi
jge 0x100026d2
mov ebx, esi
jmp 0x10002756
mov ebx, eax
jmp 0x10002756
mov eax, dword [ebx*4 + 0x1010392c]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x70]
jae 0x1000275e
lea esi, [ecx + edi + 0x10000000]
mov ecx, eax
shl ecx, 2
sar ecx, 0x1e
sar eax, 0x1e
and ecx, 3
and eax, 3
xor edx, edx
dec ecx
je 0x10002746
dec ecx
je 0x1000273e
dec ecx
jne 0x1000274f
mov edx, dword [ebp - 0x6c]
jmp 0x1000274f
mov edx, dword [ebp - 0xc4]
jmp 0x1000274f
mov edx, dword [ebp - 0x6c]
sub edx, dword [ebp - 0xc4]
dec eax
dec eax
jne 0x10002755
add dword [esi], edx
inc ebx
cmp ebx, dword [0x10103928]
jb 0x10002702
mov eax, dword [0x1007b9bc]
mov eax, 0x5417c91e
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov edi, dword [ebp - 0x140]
mov esi, dword [ebp - 0x13c]
mov edx, dword [ebp - 0x150]
mov eax, dword [ebp - 0x14c]
mov ecx, dword [ebp - 0x144]
mov ebx, dword [ebp - 0x148]
mov esp, ebp
pop ebp
popfd
ret