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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push 0
push 0
push 0
push 0
push 0
push str.detour_alloc_trampoline
lea ecx, [ebp - 0x20]
call fcn.00407b80
cmp dword [ebp + 8], 0x7ff80000
jbe 0x414323
mov eax, dword [ebp + 8]
sub eax, 0x7ff80000
mov dword [ebp - 0x24], eax
jmp 0x41432a
mov dword [ebp - 0x24], 0x10000
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], ecx
cmp dword [ebp + 8], 0x80000000
jae 0x414347
mov edx, dword [ebp + 8]
add edx, 0x7ff80000
mov dword [ebp - 0x28], edx
jmp 0x41434e
mov dword [ebp - 0x28], 0xfff80000
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0
cmp dword [0x47f128], 0
jne 0x414379
cmp dword [0x47f124], 0
je 0x414379
mov ecx, dword [0x47f124]
mov dword [0x47f128], ecx
cmp dword [0x47f128], 0
je 0x41441c
mov edx, dword [0x47f128]
cmp dword [edx + 8], 0
je 0x41441c
mov eax, dword [0x47f128]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp - 0x14]
jb 0x41441c
mov edx, dword [0x47f128]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x18]
ja 0x41441c
mov ecx, dword [0x47f128]
mov edx, dword [ecx + 8]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jb 0x4143cd
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x18]
jbe 0x4143e4
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x20]
call fcn.00407aa0
mov eax, dword [ebp - 0x34]
jmp 0x4146c3
mov edx, dword [0x47f128]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 8], ecx
push 0x20
push 0xcc
mov edx, dword [ebp - 8]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebp - 8]
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0x20]
call fcn.00407aa0
mov eax, dword [ebp - 0x38]
jmp 0x4146c3
mov ecx, dword [0x47f124]
mov dword [0x47f128], ecx
jmp 0x414438
mov edx, dword [0x47f128]
mov eax, dword [edx + 4]
mov dword [0x47f128], eax
cmp dword [0x47f128], 0
je 0x414479
cmp dword [0x47f128], 0
je 0x414477
mov ecx, dword [0x47f128]
cmp dword [ecx + 8], 0
je 0x414477
mov edx, dword [0x47f128]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x14]
jb 0x414477
mov ecx, dword [0x47f128]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0x18]
ja 0x414477
jmp 0x4143b1
jmp 0x41442a
mov eax, dword [ebp + 8]
and eax, 0xffff
mov ecx, dword [ebp + 8]
sub ecx, eax
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x14]
jbe 0x4145f6
cmp dword [ebp - 4], 0x70000000
jb 0x4144fc
cmp dword [ebp - 4], 0x80000000
ja 0x4144fc
push 0
call fcn.00413130
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
xor edx, edx
mov ecx, 0x500
div ecx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
shl eax, 0x10
mov dword [ebp - 0xc], eax
mov ecx, 0x70000000
sub ecx, dword [ebp - 0xc]
sub ecx, 0x10000
mov dword [ebp - 4], ecx
push 0x1c
lea edx, [ebp - 0x74]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x414515
jmp 0x4145f6
cmp dword [ebp - 0x64], 0x10000
jne 0x4145e6
cmp dword [ebp - 0x68], 0x10000
jb 0x4145e6
push 0x40
push 0x3000
push 0x10000
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x47f128], eax
cmp dword [0x47f128], 0
je 0x4145e4
mov edx, dword [0x47f128]
mov dword [edx], 0x52727464
mov eax, dword [0x47f128]
mov dword [eax + 8], 0
mov ecx, dword [0x47f128]
mov edx, dword [0x47f124]
mov dword [ecx + 4], edx
mov eax, dword [0x47f128]
mov dword [0x47f124], eax
mov dword [ebp - 0x1c], 0
mov ecx, dword [0x47f128]
add ecx, 0x20
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], 0x7fe
jmp 0x4145ad
mov edx, dword [ebp - 0x10]
sub edx, 1
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 1
jle 0x4145d1
mov eax, dword [ebp - 0x10]
shl eax, 5
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + eax + 0x18], edx
mov eax, dword [ebp - 0x10]
shl eax, 5
add eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
jmp 0x4145a4
mov ecx, dword [0x47f128]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 8], edx
jmp 0x4143b1
jmp 0x4145f6
mov eax, dword [ebp - 0x70]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x41448f
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x18]
jae 0x4146b1
cmp dword [ebp - 4], 0x70000000
jb 0x414621
cmp dword [ebp - 4], 0x80000000
ja 0x414621
mov dword [ebp - 4], 0x80010000
push 0x1c
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x414637
jmp 0x4146b1
cmp dword [ebp - 0x48], 0x10000
jne 0x4146a3
cmp dword [ebp - 0x4c], 0x10000
jb 0x4146a3
mov edx, dword [ebp - 4]
and edx, 0xffff
mov dword [ebp - 0x2c], edx
je 0x41467a
mov eax, 0x10000
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x4c]
sub ecx, dword [ebp - 0x30]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x58]
add edx, dword [ebp - 0x30]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
mov dword [ebp - 4], eax
push 0x40
push 0x3000
push 0x10000
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [0x47f128], eax
cmp dword [0x47f128], 0
je 0x4146a3
jmp 0x414557
mov edx, dword [ebp - 0x58]
add edx, dword [ebp - 0x4c]
mov dword [ebp - 4], edx
jmp 0x4145fc
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x20]
call fcn.00407aa0
mov eax, dword [ebp - 0x3c]
mov esp, ebp
pop ebp
ret