Function at 0x492120
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 0x492149
lea ebx, [esi - 0x7ff80000]
cmp esi, 0x80000000
jb 0x49214e
mov eax, 0xfff80000
jmp 0x492154
mov ebx, 0x80000
lea eax, [esi + 0x7ff80000]
cmp byte [esi], 0xe9
mov dword [ebp + 8], eax
jne 0x49219d
mov eax, dword [esi + 1]
add eax, 5
add eax, esi
cmp eax, esi
jae 0x492184
cmp eax, 0x80000000
jae 0x49217a
lea edi, [eax + 0x7ff80000]
mov dword [ebp + 8], edi
jmp 0x4921a0
mov edi, 0xfff80000
mov dword [ebp + 8], edi
jmp 0x4921a0
mov edi, dword [ebp + 8]
cmp eax, 0x7ff80000
jbe 0x492196
lea ebx, [eax - 0x7ff80000]
jmp 0x4921a0
mov ebx, 0x80000
jmp 0x4921a0
mov edi, dword [ebp + 8]
mov edx, dword [0x5c27b4]
mov eax, dword [0x5c27b0]
test edx, edx
jne 0x4921bb
test eax, eax
je 0x4921ce
mov edx, eax
mov dword [0x5c27b4], edx
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x4921ce
cmp ecx, ebx
jb 0x4921ce
cmp ecx, edi
jbe 0x492320
mov edx, eax
mov dword [0x5c27b4], edx
test eax, eax
je 0x492208
mov ecx, eax
nop dword [eax]
test eax, eax
je 0x4921f7
mov eax, dword [ecx + 8]
test eax, eax
je 0x4921f7
cmp eax, ebx
jb 0x4921f7
cmp eax, edi
jbe 0x492320
mov edx, dword [edx + 4]
mov ecx, edx
mov dword [0x5c27b4], edx
mov eax, edx
test ecx, ecx
jne 0x4921e0
and esi, 0xffff0000
lea edi, [esi - 0x10000]
cmp edi, ebx
jbe 0x4922ac
nop dword [eax]
cmp edi, dword [0x5bf138]
jb 0x492238
cmp edi, dword [0x5bf13c]
ja 0x492238
sub edi, 0x8000000
jmp 0x4922a4
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 0x4922ac
cmp dword [ebp - 0xc], 0x10000
jne 0x49228f
cmp dword [ebp - 0x10], 0x10000
jb 0x49228f
push 0x40
push 0x3000
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x4922df
sub edi, 0x10000
jmp 0x4922a4
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 0x492220
mov edi, dword [ebp + 8]
cmp esi, edi
jae 0x4923cc
nop word [eax + eax]
cmp esi, dword [0x5bf138]
jb 0x492352
cmp esi, dword [0x5bf13c]
ja 0x492352
add esi, 0x8000000
jmp 0x4923c4
mov edi, dword [ebp + 8]
mov dword [edx], 0x52727464
xor ecx, ecx
mov dword [edx + 8], 0
mov esi, 0x38b
mov eax, dword [0x5c27b0]
mov dword [edx + 4], eax
lea eax, [edx + 0xffa8]
mov dword [0x5c27b4], edx
mov dword [0x5c27b0], edx
mov dword [eax + 0x40], ecx
mov ecx, eax
sub eax, 0x48
sub esi, 1
jne 0x492310
mov dword [edx + 8], ecx
mov esi, dword [edx + 8]
cmp esi, ebx
jb 0x4923cc
cmp esi, edi
ja 0x4923cc
mov ecx, dword [esi + 0x40]
push 0x48
push 0xcc
push esi
mov dword [edx + 8], ecx
call sub.VCRUNTIME140.dll_memset
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 0x4923cc
cmp dword [ebp - 0x28], 0x10000
mov ecx, dword [ebp - 0x2c]
jne 0x4923af
cmp ecx, 0x10000
jb 0x4923af
push 0x40
push 0x3000
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x4922e2
add esi, 0x10000
jmp 0x4923c4
mov esi, dword [ebp - 0x38]
add esi, ecx
movzx ecx, si
test ecx, ecx
je 0x4923c4
mov eax, 0x10000
sub eax, ecx
add esi, eax
cmp esi, edi
jb 0x4922c0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret