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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
cmp dword [ebp + 8], 0x7ff80000
jbe 0x10005a35
mov eax, dword [ebp + 8]
sub eax, 0x7ff80000
mov dword [ebp - 0x5c], eax
jmp 0x10005a3c
mov dword [ebp - 0x5c], 0x10000
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0xc], ecx
cmp dword [ebp + 8], 0x80000000
jae 0x10005a59
mov edx, dword [ebp + 8]
add edx, 0x7ff80000
mov dword [ebp - 0x60], edx
jmp 0x10005a60
mov dword [ebp - 0x60], 0xfff80000
mov eax, dword [ebp - 0x60]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
cmp dword [0x1001efc0], 0
jne 0x10005a8b
cmp dword [0x1001efbc], 0
je 0x10005a8b
mov ecx, dword [0x1001efbc]
mov dword [0x1001efc0], ecx
cmp dword [0x1001efc0], 0
je 0x10005b08
mov edx, dword [0x1001efc0]
cmp dword [edx + 8], 0
je 0x10005b08
mov eax, dword [0x1001efc0]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0xc]
jb 0x10005b08
mov edx, dword [0x1001efc0]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 4]
ja 0x10005b08
mov ecx, dword [0x1001efc0]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0xc]
jb 0x10005ad7
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jbe 0x10005ade
xor eax, eax
jmp 0x10005d5a
mov edx, dword [0x1001efc0]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x18]
mov dword [edx + 8], ecx
push 0x20
push 0xcc
mov edx, dword [ebp - 0x10]
push edx
call fcn.10008b20
add esp, 0xc
mov eax, dword [ebp - 0x10]
jmp 0x10005d5a
mov eax, dword [0x1001efbc]
mov dword [0x1001efc0], eax
jmp 0x10005b23
mov ecx, dword [0x1001efc0]
mov edx, dword [ecx + 4]
mov dword [0x1001efc0], edx
cmp dword [0x1001efc0], 0
je 0x10005b62
cmp dword [0x1001efc0], 0
je 0x10005b60
mov eax, dword [0x1001efc0]
cmp dword [eax + 8], 0
je 0x10005b60
mov ecx, dword [0x1001efc0]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0xc]
jb 0x10005b60
mov eax, dword [0x1001efc0]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 4]
ja 0x10005b60
jmp 0x10005abb
jmp 0x10005b14
mov edx, dword [ebp + 8]
and edx, 0xffff
mov eax, dword [ebp + 8]
sub eax, edx
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0xc]
jbe 0x10005c99
cmp dword [ebp - 8], 0x70000000
jb 0x10005b9e
cmp dword [ebp - 8], 0x80000000
ja 0x10005b9e
mov dword [ebp - 8], 0x6fff0000
push 0x1c
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10005bb7
jmp 0x10005c99
cmp dword [ebp - 0x1c], 0x10000
jne 0x10005c88
cmp dword [ebp - 0x20], 0x10000
jb 0x10005c88
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x1001efc0], eax
cmp dword [0x1001efc0], 0
je 0x10005c86
mov eax, dword [0x1001efc0]
mov dword [eax], 0x52727464
mov ecx, dword [0x1001efc0]
mov dword [ecx + 8], 0
mov edx, dword [0x1001efc0]
mov eax, dword [0x1001efbc]
mov dword [edx + 4], eax
mov ecx, dword [0x1001efc0]
mov dword [0x1001efbc], ecx
mov dword [ebp - 0x34], 0
mov edx, dword [0x1001efc0]
add edx, 0x20
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x30], 0x7fe
jmp 0x10005c50
mov eax, dword [ebp - 0x30]
sub eax, 1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 1
jle 0x10005c76
mov ecx, dword [ebp - 0x30]
shl ecx, 5
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
mov dword [edx + ecx + 0x18], eax
mov ecx, dword [ebp - 0x30]
shl ecx, 5
mov edx, dword [ebp - 0x10]
add edx, ecx
mov dword [ebp - 0x34], edx
jmp 0x10005c47
mov eax, dword [0x1001efc0]
mov ecx, dword [ebp - 0x34]
mov dword [eax + 8], ecx
jmp 0x10005abb
jmp 0x10005c99
mov edx, dword [ebp - 0x28]
sub edx, 0x10000
mov dword [ebp - 8], edx
jmp 0x10005b79
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 4]
jae 0x10005d58
cmp dword [ebp - 8], 0x70000000
jb 0x10005cc4
cmp dword [ebp - 8], 0x80000000
ja 0x10005cc4
mov dword [ebp - 8], 0x80010000
push 0x1c
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x10005cda
jmp 0x10005d58
cmp dword [ebp - 0x40], 0x10000
jne 0x10005d4a
cmp dword [ebp - 0x44], 0x10000
jb 0x10005d4a
mov ecx, dword [ebp - 8]
and ecx, 0xffff
mov dword [ebp - 0x54], ecx
cmp dword [ebp - 0x54], 0
je 0x10005d21
mov edx, 0x10000
sub edx, dword [ebp - 0x54]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x50]
add ecx, dword [ebp - 0x58]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
mov dword [ebp - 8], edx
push 0x40
push 0x3000
push 0x10000
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x1001efc0], eax
cmp dword [0x1001efc0], 0
je 0x10005d4a
jmp 0x10005bf9
mov ecx, dword [ebp - 0x50]
add ecx, dword [ebp - 0x44]
mov dword [ebp - 8], ecx
jmp 0x10005c9f
xor eax, eax
mov esp, ebp
pop ebp
ret