Function at 0x100c02b6
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
lea eax, [ebp + 4]
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x13c], esi
mov dword [ebp - 0x140], edi
mov edi, dword [0x1007b9bc]
mov esi, dword [eax + 4]
sub eax, 4
mov dword [ebp - 0xe8], eax
mov eax, dword [esi]
and eax, 0xfffffff
xor edx, edx
lea ecx, [edi + eax - 1]
mov eax, ecx
div edi
sub ecx, edx
mov eax, dword [0x1007b9bc]
mov dword [ebp - 0x74], ecx
mov eax, dword [0x10012044]
mov dword [ebp - 0x6c], eax
mov eax, dword [0x1007b9bc]
mov eax, dword [0x10012044]
test eax, eax
je 0x100c03a6
mov eax, dword [0x10012044]
xor edi, edi
dec eax
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
test ecx, ecx
je 0x100c0363
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 0x100c033c
xor edx, edx
div ecx
cmp dword [ebp - 0x6c], 0
jbe 0x100c03a0
inc edi
mov ecx, 0xffffc390
lea ebx, [edx*4 + 0x1012ee90]
mov eax, 0x3c6f
lock cmpxchg dword [ebx], ecx
cmp eax, 0x3c6f
je 0x100c0572
lea eax, [edx + 1]
mov ecx, dword [0x10012044]
xor edx, edx
div ecx
cmp edi, dword [ebp - 0x6c]
jb 0x100c036d
xor edi, edi
test edi, edi
jne 0x100c041c
call dword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
xor edi, edi
push 0x40
inc edi
push 0x1000
push dword [ebp - 0x74]
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
test eax, eax
jne 0x100c0586
push eax
call dword [sym.imp.kernel32.dll_Sleep]
cmp edi, 0x11
jb 0x100c03b0
xor edi, edi
cmp dword [0x1011fbc8], edi
ja 0x100c03e9
test edi, 3
je 0x100c03fd
test edi, edi
je 0x100c03fb
push 0x8000
push 0
push edi
call dword [sym.imp.kernel32.dll_VirtualFree]
xor edi, edi
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
test edi, edi
je 0x100c0313
mov eax, edi
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x100c041c
mov byte [eax], 0
inc eax
dec ecx
jne 0x100c0415
mov eax, 0x3f053575
mov ebx, dword [esi]
mov eax, ebx
shr eax, 0x1d
lea eax, [eax + esi + 8]
mov dword [ebp - 0x70], eax
and ebx, 0xfffffff
lea ecx, [ebx + eax]
mov dword [ebp - 0xcc], eax
mov esi, 0x10000000
mov eax, dword [0x1007b9bc]
sub eax, ebx
mov dword [ebp - 0xbc], ecx
sub dword [ebp - 0x70], esi
mov dword [ebp - 0xc0], ebx
lea ecx, [eax + 1]
mov dword [ebp - 0x5c], ecx
xor eax, eax
test ecx, ecx
je 0x100c048f
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 0x100c0465
xor edx, edx
div ecx
add edi, edx
push edi
push ebx
push dword [ebp - 0x70]
mov dword [ebp - 0xb8], edi
mov eax, 0xc9792576
mov eax, dword [ebp - 0xbc]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0xcc]
add esp, 0xc
test ebx, ebx
mov dword [ebp - 0x6c], edi
mov edi, 0xfffff000
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0x55], 0
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 0x74], eax
je 0x100c0b8d
lea eax, [ebp - 0xf0]
push eax
mov eax, 0x750c5698
mov eax, 0xfffffff
mov ebx, dword [ebp - 0xf0]
and dword [ebp - 0x64], 0
and dword [ebp - 0x60], 0
pop ecx
mov ecx, dword [ebp - 0xec]
and ecx, eax
mov dword [ebp - 0x5c], ecx
and ebx, eax
mov ecx, dword [0x1001256c]
add ebx, esi
mov eax, esi
sub eax, ecx
mov dword [ebp - 0xf8], eax
jne 0x100c058d
xor edx, edx
cmp dword [ebp - 0x5c], edx
jbe 0x100c07bc
mov edi, 0x2f8c177
movzx ecx, byte [edx + ebx]
sub ecx, edi
add dword [ebp - 0x64], ecx
add ecx, dword [ebp - 0x60]
mov eax, ecx
imul eax, eax, 0x5749
rol eax, 9
ror ecx, 9
xor eax, ecx
imul eax, eax, 0xfd073e89
ror eax, 9
imul eax, eax, 0xfd073e89
ror eax, 9
add dword [ebp - 0x64], eax
inc edx
mov dword [ebp - 0x60], eax
cmp edx, dword [ebp - 0x5c]
jb 0x100c0533
jmp 0x100c07bc
mov edi, dword [0x1007b9bc]
imul edi, edx
lea edi, [edi + section..data]
jmp 0x100c03a2
mov edi, eax
jmp 0x100c03d9
mov edx, dword [0x1000003c]
lea edx, [edx + 0x100000a0]
mov eax, dword [ebp - 0x5c]
add eax, ebx
mov dword [ebp - 0x68], eax
mov eax, dword [edx]
mov ecx, ebx
mov edx, dword [edx + 4]
mov dword [ebp - 0xc8], edx
add eax, esi
sub ecx, esi
mov esi, ecx
mov edx, ecx
and edx, edi
sub esi, edx
mov dword [ebp - 0xe4], esi
mov esi, dword [ebp - 0x5c]
add ecx, esi
mov esi, ecx
and esi, edi
sub ecx, esi
mov dword [ebp - 0xdc], ecx
mov ecx, dword [ebp - 0xc8]
add ecx, eax
mov dword [ebp - 0xe0], esi
mov esi, eax
mov dword [ebp - 0xd8], ecx
cmp eax, ecx
je 0x100c05fa
cmp dword [esi], edx
jae 0x100c05fa
add esi, dword [esi + 4]
cmp esi, dword [ebp - 0xd8]
jne 0x100c05eb
and dword [ebp - 0xd0], 0
cmp esi, dword [ebp - 0xd8]
je 0x100c063b
cmp dword [esi], edx
jne 0x100c063b
mov ecx, dword [esi + 4]
sub ecx, 8
shr ecx, 1
je 0x100c063b
lea eax, [esi + 8]
movzx edx, word [eax]
and edx, 0xfff
cmp edx, dword [ebp - 0xe4]
jae 0x100c063b
inc dword [ebp - 0xd0]
inc eax
inc eax
cmp dword [ebp - 0xd0], ecx
jne 0x100c061a
mov edi, 0x2f8c177
mov ecx, dword [ebp - 0xe0]
cmp esi, dword [ebp - 0xd8]
je 0x100c077a
cmp dword [esi], ecx
ja 0x100c077a
mov eax, dword [esi + 4]
lea edx, [eax - 8]
shr edx, 1
cmp dword [ebp - 0xd0], edx
jne 0x100c0689
add esi, eax
cmp esi, dword [ebp - 0xd8]
je 0x100c077a
cmp dword [esi], ecx
ja 0x100c077a
and dword [ebp - 0xd0], 0
jmp 0x100c065a
cmp dword [esi], ecx
jne 0x100c06a9
mov eax, dword [ebp - 0xd0]
movzx eax, word [esi + eax*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0xdc]
jae 0x100c077a
mov edx, 0xf000
mov eax, dword [ebp - 0xd0]
inc dword [ebp - 0xd0]
test word [esi + eax*2 + 8], dx
je 0x100c0646
movzx eax, word [esi + eax*2 + 8]
mov ecx, dword [esi]
and eax, 0xfff
lea eax, [eax + ecx + 0x10000000]
xor ecx, ecx
mov dword [ebp - 0x5c], eax
sub dword [ebp - 0x5c], ebx
mov dword [ebp - 0xe4], eax
je 0x100c071e
movzx edx, byte [ecx + ebx]
sub edx, edi
add dword [ebp - 0x64], edx
add edx, dword [ebp - 0x60]
mov eax, edx
imul eax, eax, 0x5749
rol eax, 9
ror edx, 9
xor eax, edx
imul eax, eax, 0xfd073e89
ror eax, 9
imul eax, eax, 0xfd073e89
ror eax, 9
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
inc ecx
cmp ecx, dword [ebp - 0x5c]
jb 0x100c06e4
mov ebx, dword [ebp - 0xe4]
mov eax, dword [ebx]
sub eax, dword [ebp - 0xf8]
xor ecx, ecx
mov dword [ebp - 0xf4], eax
movzx edx, byte [ebp + ecx - 0xf4]
sub edx, edi
add dword [ebp - 0x64], edx
add edx, dword [ebp - 0x60]
mov eax, edx
imul eax, eax, 0x5749
rol eax, 9
ror edx, 9
xor eax, edx
imul eax, eax, 0xfd073e89
ror eax, 9
imul eax, eax, 0xfd073e89
ror eax, 9
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
inc ecx
cmp ecx, 4
jb 0x100c0734
add ebx, 4
jmp 0x100c0640
mov esi, dword [ebp - 0x68]
xor edx, edx
sub esi, ebx
je 0x100c07bc
movzx ecx, byte [edx + ebx]
sub ecx, edi
add dword [ebp - 0x64], ecx
add ecx, dword [ebp - 0x60]
mov eax, ecx
imul eax, eax, 0x5749
rol eax, 9
ror ecx, 9
xor eax, ecx
imul eax, eax, 0xfd073e89
ror eax, 9
imul eax, eax, 0xfd073e89
ror eax, 9
add dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
inc edx
cmp edx, esi
jb 0x100c0783
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 0x100c07c0
mov eax, 0x27f372c
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
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 - 0xb8]
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x44]
sub eax, ecx
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0xb8]
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 - 0x68], eax
push 0x10
lea edi, [ebp - 0xb4]
pop ecx
lea esi, [ebp - 0x138]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x94]
mov eax, dword [ebp - 0xa4]
mov esi, dword [ebp - 0xb4]
mov dword [ebp - 0x5c], 2
mov ebx, dword [ebp - 0xb0]
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 - 0xa0]
add ebx, edi
rol ebx, 7
xor dword [ebp - 0x90], ebx
mov ebx, dword [ebp - 0x90]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x80], edi
mov edi, ebx
mov ebx, dword [ebp - 0x80]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0x80]
xor dword [ebp - 0xb0], ebx
mov ebx, dword [ebp - 0xb0]
add edi, ebx
ror edi, 0xe
mov ebx, dword [ebp - 0x8c]
xor dword [ebp - 0xa0], edi
mov edi, dword [ebp - 0x9c]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x7c], edi
mov edi, ebx
mov ebx, dword [ebp - 0x7c]
add edi, ebx
rol edi, 9
xor dword [ebp - 0xac], edi
mov edi, ebx
mov ebx, dword [ebp - 0xac]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xac]
xor dword [ebp - 0x9c], ebx
mov ebx, dword [ebp - 0x9c]
add edi, ebx
mov ebx, dword [ebp - 0x78]
ror edi, 0xe
xor dword [ebp - 0x8c], edi
mov edi, dword [ebp - 0x88]
add edi, ebx
rol edi, 7
xor dword [ebp - 0xa8], edi
mov edi, ebx
mov ebx, dword [ebp - 0xa8]
add edi, ebx
rol edi, 9
xor dword [ebp - 0x98], edi
mov edi, ebx
mov ebx, dword [ebp - 0x98]
add ebx, edi
mov edi, dword [ebp - 0x98]
rol ebx, 0xd
xor dword [ebp - 0x88], ebx
mov ebx, dword [ebp - 0x88]
add edi, ebx
ror edi, 0xe
xor dword [ebp - 0x78], edi
mov edi, dword [ebp - 0xa8]
add edi, esi
rol edi, 7
xor dword [ebp - 0xb0], edi
mov edi, dword [ebp - 0xb0]
add edi, esi
rol edi, 9
xor dword [ebp - 0xac], edi
mov edi, dword [ebp - 0xb0]
mov ebx, dword [ebp - 0xac]
add ebx, edi
rol ebx, 0xd
mov edi, dword [ebp - 0xac]
xor dword [ebp - 0xa8], ebx
mov ebx, dword [ebp - 0xa8]
add ebx, edi
mov edi, dword [ebp - 0xa0]
add edi, eax
ror ebx, 0xe
xor esi, ebx
rol edi, 7
xor dword [ebp - 0x9c], edi
mov ebx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
add ebx, edi
rol ebx, 9
mov edi, dword [ebp - 0x9c]
xor dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0x98]
add ebx, edi
rol ebx, 0xd
xor eax, ebx
mov edi, dword [ebp - 0x98]
mov ebx, dword [ebp - 0x90]
add edi, eax
ror edi, 0xe
xor dword [ebp - 0xa0], edi
mov edi, dword [ebp - 0x8c]
add edi, ebx
rol edi, 7
xor dword [ebp - 0x88], edi
mov ebx, dword [ebp - 0x88]
mov edi, dword [ebp - 0x8c]
add ebx, edi
mov edi, dword [ebp - 0x88]
rol ebx, 9
xor ecx, ebx
add edi, ecx
rol edi, 0xd
mov ebx, dword [ebp - 0x7c]
xor dword [ebp - 0x90], edi
mov edi, dword [ebp - 0x90]
add edi, ecx
ror edi, 0xe
xor dword [ebp - 0x8c], edi
mov edi, dword [ebp - 0x78]
add edi, ebx
rol edi, 7
xor edx, edi
mov edi, dword [ebp - 0x78]
add edi, edx
rol edi, 9
xor dword [ebp - 0x80], edi
mov edi, dword [ebp - 0x80]
add edi, edx
rol edi, 0xd
xor dword [ebp - 0x7c], edi
mov edi, dword [ebp - 0x80]
mov ebx, dword [ebp - 0x7c]
add ebx, edi
ror ebx, 0xe
xor dword [ebp - 0x78], ebx
dec dword [ebp - 0x5c]
jne 0x100c08a4
mov dword [ebp - 0x84], edx
push 0x40
mov dword [ebp - 0xa4], eax
xor edx, edx
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0xb4], esi
pop ebx
xor eax, eax
mov ecx, dword [ebp + eax - 0x138]
add dword [ebp + eax - 0xb4], ecx
add eax, 4
cmp eax, ebx
jl 0x100c0ae6
lea esi, [ebp - 0xb4]
lea edi, [ebp - 0x44]
inc dword [ebp - 0x118]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
cmp dword [ebp - 0xc4], ebx
jbe 0x100c0b50
mov esi, dword [ebp - 0xc8]
mov eax, dword [ebp - 0x68]
lea edi, [esi + eax]
lea ecx, [ebp + edx - 0x44]
mov al, byte [ecx + edi]
xor al, byte [ecx]
xor byte [ebp - 0x55], al
mov byte [ecx + esi], al
inc edx
cmp edx, ebx
jb 0x100c0b23
sub dword [ebp - 0xc4], ebx
add dword [ebp - 0x6c], ebx
add esi, ebx
add dword [ebp - 0x74], ebx
mov dword [ebp - 0xc8], esi
jmp 0x100c0874
cmp dword [ebp - 0xc4], edx
jbe 0x100c0b7d
mov edi, dword [ebp - 0x6c]
lea eax, [ebp - 0x44]
mov esi, dword [ebp - 0x74]
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 - 0xc4]
jb 0x100c0b65
mov esi, 0x10000000
mov ebx, dword [ebp - 0xc0]
mov edi, 0xfffff000
mov eax, dword [ebp - 0xbc]
mov al, byte [eax + 8]
xor al, byte [ebp - 0x55]
je 0x100c0c28
call fcn.1008c61a
mov edx, 0xffff
mov ebx, eax
mov eax, dword [ebp - 0xe8]
lea ecx, [eax + 0xc]
and ecx, 0xfffffffc
lea esi, [ecx + 0xfff]
mov dword [eax + 8], 0x100f1b6e
and ebx, edi
and esi, edi
xor eax, eax
mov edi, dword [0x1012ee38]
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov dword [0x1012ee38], edi
shr edi, 0x10
shl eax, 0x10
shr edx, 0x10
or eax, edi
test edx, edx
jne 0x100c0bca
mov edi, 0xffff
div edi
mov eax, ecx
mov dword [ebp - 0x150], ebx
inc edx
cmp ecx, esi
mov dword [ebp - 0x144], edx
mov dword [ebp - 0x68], 0
jae 0x100c0c1e
mov ecx, dword [ebp - 0x68]
mov dword [eax], ecx
add eax, 4
cmp eax, esi
jb 0x100c0c12
mov eax, 0x100f1b6e
jmp 0x100c0d13
mov ecx, dword [0x1001256c]
mov eax, dword [ebp - 0xcc]
sub eax, dword [ebp - 0xb8]
sub esi, ecx
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xbc], esi
jne 0x100c0c52
test eax, eax
je 0x100c0d03
mov ecx, dword [0x10103928]
mov esi, dword [ebp - 0xb8]
mov eax, dword [ebp - 0x70]
sub esi, dword [ebp - 0xcc]
add eax, ebx
xor ebx, ebx
dec ecx
mov dword [ebp - 0x68], eax
js 0x100c0c99
lea eax, [ebx + ecx]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [eax*4 + 0x1010392c]
and edx, 0xfffffff
cmp dword [ebp - 0x70], edx
jae 0x100c0c90
lea ecx, [eax - 1]
jmp 0x100c0c95
jbe 0x100c0c9d
lea ebx, [eax + 1]
cmp ecx, ebx
jge 0x100c0c71
mov edi, ebx
jmp 0x100c0cfb
mov edi, eax
jmp 0x100c0cfb
mov eax, dword [edi*4 + 0x1010392c]
mov ecx, eax
and ecx, 0xfffffff
cmp ecx, dword [ebp - 0x68]
jae 0x100c0d03
lea ebx, [ecx + esi + 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 0x100c0ce8
dec ecx
je 0x100c0ce0
dec ecx
jne 0x100c0cf4
mov edx, dword [ebp - 0xbc]
jmp 0x100c0cf4
mov edx, dword [ebp - 0xc0]
jmp 0x100c0cf4
mov edx, dword [ebp - 0xbc]
sub edx, dword [ebp - 0xc0]
dec eax
dec eax
jne 0x100c0cfa
add dword [ebx], edx
inc edi
cmp edi, dword [0x10103928]
jb 0x100c0ca1
mov eax, dword [0x1007b9bc]
mov eax, 0xa1da09b7
mov eax, dword [ebp - 0xb8]
mov ecx, dword [ebp - 0xe8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x150]
mov eax, dword [ebp - 0x14c]
mov ecx, dword [ebp - 0x144]
mov esi, dword [ebp - 0x13c]
mov ebx, dword [ebp - 0x148]
mov edi, dword [ebp - 0x140]
mov esp, ebp
pop ebp
popfd
ret