Function at 0x1006c7a0
Capabilities:
Allocate or change rwx memory
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp esi, 0x7ff80000
jbe 0x1006c7c9
lea ebx, [esi - 0x7ff80000]
cmp esi, 0x80000000
jb 0x1006c7ce
mov eax, 0xfff80000
jmp 0x1006c7d4
mov ebx, 0x80000
lea eax, [esi + 0x7ff80000]
cmp byte [esi], 0xe9
mov dword [ebp + 8], eax
jne 0x1006c81d
mov eax, dword [esi + 1]
add eax, 5
add eax, esi
cmp eax, esi
jae 0x1006c804
cmp eax, 0x80000000
jae 0x1006c7fa
lea edi, [eax + 0x7ff80000]
mov dword [ebp + 8], edi
jmp 0x1006c820
mov edi, 0xfff80000
mov dword [ebp + 8], edi
jmp 0x1006c820
mov edi, dword [ebp + 8]
cmp eax, 0x7ff80000
jbe 0x1006c816
lea ebx, [eax - 0x7ff80000]
jmp 0x1006c820
mov ebx, 0x80000
jmp 0x1006c820
mov edi, dword [ebp + 8]
mov edx, dword [0x102f3b9c]
mov eax, dword [0x102f3b98]
test edx, edx
jne 0x1006c83b
test eax, eax
je 0x1006c84e
mov edx, eax
mov dword [0x102f3b9c], edx
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x1006c84e
cmp ecx, ebx
jb 0x1006c84e
cmp ecx, edi
jbe 0x1006c9a0
mov edx, eax
mov dword [0x102f3b9c], edx
test eax, eax
je 0x1006c888
mov ecx, eax
nop dword [eax]
test eax, eax
je 0x1006c877
mov eax, dword [ecx + 8]
test eax, eax
je 0x1006c877
cmp eax, ebx
jb 0x1006c877
cmp eax, edi
jbe 0x1006c9a0
mov edx, dword [edx + 4]
mov ecx, edx
mov dword [0x102f3b9c], edx
mov eax, edx
test ecx, ecx
jne 0x1006c860
and esi, 0xffff0000
lea edi, [esi - 0x10000]
cmp edi, ebx
jbe 0x1006c92c
nop dword [eax]
cmp edi, dword [0x101e9988]
jb 0x1006c8b8
cmp edi, dword [0x101e998c]
ja 0x1006c8b8
sub edi, 0x8000000
jmp 0x1006c924
push 0x1c
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x1c], xmm0
movq qword [ebp - 0xc], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1006c92c
cmp dword [ebp - 0xc], 0x10000
jne 0x1006c90f
cmp dword [ebp - 0x10], 0x10000
jb 0x1006c90f
push 0x40
push 0x3000
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x1006c95f
sub edi, 0x10000
jmp 0x1006c924
mov ecx, dword [ebp - 0x18]
add ecx, 0xffff0000
mov edi, ecx
movzx eax, di
sub edi, eax
test eax, eax
cmove edi, ecx
cmp edi, ebx
ja 0x1006c8a0
mov edi, dword [ebp + 8]
cmp esi, edi
jae 0x1006ca4c
nop word [eax + eax]
cmp esi, dword [0x101e9988]
jb 0x1006c9d2
cmp esi, dword [0x101e998c]
ja 0x1006c9d2
add esi, 0x8000000
jmp 0x1006ca44
mov edi, dword [ebp + 8]
mov dword [edx], 0x52727464
xor ecx, ecx
mov dword [edx + 8], 0
mov esi, 0x38b
mov eax, dword [0x102f3b98]
mov dword [edx + 4], eax
lea eax, [edx + 0xffa8]
mov dword [0x102f3b9c], edx
mov dword [0x102f3b98], edx
mov dword [eax + 0x40], ecx
mov ecx, eax
sub eax, 0x48
sub esi, 1
jne 0x1006c990
mov dword [edx + 8], ecx
mov esi, dword [edx + 8]
cmp esi, ebx
jb 0x1006ca4c
cmp esi, edi
ja 0x1006ca4c
mov ecx, dword [esi + 0x40]
push 0x48
push 0xcc
push esi
mov dword [edx + 8], ecx
call fcn.100bef70
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x1c
lea eax, [ebp - 0x38]
mov dword [ebp - 0x20], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x38], xmm0
movq qword [ebp - 0x28], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1006ca4c
cmp dword [ebp - 0x28], 0x10000
mov ecx, dword [ebp - 0x2c]
jne 0x1006ca2f
cmp ecx, 0x10000
jb 0x1006ca2f
push 0x40
push 0x3000
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x1006c962
add esi, 0x10000
jmp 0x1006ca44
mov esi, dword [ebp - 0x38]
add esi, ecx
movzx ecx, si
test ecx, ecx
je 0x1006ca44
mov eax, 0x10000
sub eax, ecx
add esi, eax
cmp esi, edi
jb 0x1006c940
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret