Function at 0x1000c099
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, 0x7ff80000
push edi
mov edi, 0x10000
jbe 0x1000c0bd
lea eax, [esi - 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x1000c0c0
mov dword [ebp - 4], edi
cmp esi, 0x80000000
jae 0x1000c0d3
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 8], eax
jmp 0x1000c0da
mov dword [ebp - 8], 0xfff80000
mov eax, dword [0x1001dd90]
test eax, eax
mov ecx, dword [0x1001dd8c]
jne 0x1000c0f4
test ecx, ecx
je 0x1000c109
mov eax, ecx
mov dword [0x1001dd90], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x1000c109
cmp edx, dword [ebp - 4]
jb 0x1000c109
cmp edx, dword [ebp - 8]
jbe 0x1000c261
mov eax, ecx
test ecx, ecx
jmp 0x1000c12d
test eax, eax
je 0x1000c128
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x1000c128
cmp ecx, dword [ebp - 4]
jb 0x1000c128
cmp ecx, dword [ebp - 8]
jbe 0x1000c261
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x1001dd90], eax
jne 0x1000c10f
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, dword [ebp - 4]
mov dword [ebp + 8], esi
jbe 0x1000c223
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x1000c181
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.MSVCR80.dll_rand_s]
mov eax, dword [ebp - 0xc]
xor edx, edx
pop ecx
mov ecx, 0x500
div ecx
mov esi, 0x6fff0000
inc edx
shl edx, 0x10
mov dword [ebp - 0xc], edx
sub esi, edx
push 0x1c
lea eax, [ebp - 0x44]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1000c1c0
cmp dword [ebp - 0x34], edi
jne 0x1000c19c
cmp dword [ebp - 0x38], edi
jae 0x1000c1ac
mov esi, dword [ebp - 0x40]
add esi, 0xffff0000
cmp esi, dword [ebp - 4]
ja 0x1000c14f
jmp 0x1000c1c0
push 0x40
push 0x3000
push edi
push esi
call ebx
test eax, eax
mov dword [0x1001dd90], eax
jne 0x1000c22f
mov esi, dword [ebp + 8]
jmp 0x1000c223
lea eax, [esi - 0x70000000]
cmp eax, 0x10000000
ja 0x1000c1d7
mov esi, 0x80010000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1000c228
cmp dword [ebp - 0x18], edi
jne 0x1000c21a
cmp dword [ebp - 0x1c], edi
jb 0x1000c21a
movzx ecx, si
test ecx, ecx
je 0x1000c206
mov eax, edi
sub eax, ecx
sub dword [ebp - 0x1c], eax
add dword [ebp - 0x28], eax
mov esi, dword [ebp - 0x28]
push 0x40
push 0x3000
push edi
push esi
call ebx
test eax, eax
mov dword [0x1001dd90], eax
jne 0x1000c22f
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
lea esi, [eax + ecx]
cmp esi, dword [ebp - 8]
jb 0x1000c1c5
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov ecx, dword [0x1001dd8c]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x1001dd8c], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x1000c253
mov dword [eax + 8], edx
mov esi, dword [eax + 8]
cmp esi, dword [ebp - 4]
jb 0x1000c228
cmp esi, dword [ebp - 8]
ja 0x1000c228
mov ecx, dword [esi + 0x18]
push 0x20
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x1000c22a