Function at 0x4bde70
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 0x4bde99
lea ebx, [esi - 0x7ff80000]
cmp esi, 0x80000000
jb 0x4bde9e
mov eax, 0xfff80000
jmp 0x4bdea4
mov ebx, 0x80000
lea eax, [esi + 0x7ff80000]
cmp byte [esi], 0xe9
mov dword [ebp + 8], eax
jne 0x4bdeed
mov eax, dword [esi + 1]
add eax, 5
add eax, esi
cmp eax, esi
jae 0x4bded4
cmp eax, 0x80000000
jae 0x4bdeca
lea edi, [eax + 0x7ff80000]
mov dword [ebp + 8], edi
jmp 0x4bdef0
mov edi, 0xfff80000
mov dword [ebp + 8], edi
jmp 0x4bdef0
mov edi, dword [ebp + 8]
cmp eax, 0x7ff80000
jbe 0x4bdee6
lea ebx, [eax - 0x7ff80000]
jmp 0x4bdef0
mov ebx, 0x80000
jmp 0x4bdef0
mov edi, dword [ebp + 8]
mov edx, dword [0x5b06a0]
mov eax, dword [0x5b069c]
test edx, edx
jne 0x4bdf0b
test eax, eax
je 0x4bdf1e
mov edx, eax
mov dword [0x5b06a0], edx
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x4bdf1e
cmp ecx, ebx
jb 0x4bdf1e
cmp ecx, edi
jbe 0x4be070
mov edx, eax
mov dword [0x5b06a0], edx
test eax, eax
je 0x4bdf58
mov ecx, eax
nop dword [eax]
test eax, eax
je 0x4bdf47
mov eax, dword [ecx + 8]
test eax, eax
je 0x4bdf47
cmp eax, ebx
jb 0x4bdf47
cmp eax, edi
jbe 0x4be070
mov edx, dword [edx + 4]
mov ecx, edx
mov dword [0x5b06a0], edx
mov eax, edx
test ecx, ecx
jne 0x4bdf30
and esi, 0xffff0000
lea edi, [esi - 0x10000]
cmp edi, ebx
jbe 0x4bdffc
nop dword [eax]
cmp edi, dword [0x5a931c]
jb 0x4bdf88
cmp edi, dword [0x5a9320]
ja 0x4bdf88
sub edi, 0x8000000
jmp 0x4bdff4
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 0x4bdffc
cmp dword [ebp - 0xc], 0x10000
jne 0x4bdfdf
cmp dword [ebp - 0x10], 0x10000
jb 0x4bdfdf
push 0x40
push 0x3000
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x4be02f
sub edi, 0x10000
jmp 0x4bdff4
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 0x4bdf70
mov edi, dword [ebp + 8]
cmp esi, edi
jae 0x4be11c
nop word [eax + eax]
cmp esi, dword [0x5a931c]
jb 0x4be0a2
cmp esi, dword [0x5a9320]
ja 0x4be0a2
add esi, 0x8000000
jmp 0x4be114
mov edi, dword [ebp + 8]
mov dword [edx], 0x52727464
xor ecx, ecx
mov dword [edx + 8], 0
mov esi, 0x38b
mov eax, dword [0x5b069c]
mov dword [edx + 4], eax
lea eax, [edx + 0xffa8]
mov dword [0x5b06a0], edx
mov dword [0x5b069c], edx
mov dword [eax + 0x40], ecx
mov ecx, eax
sub eax, 0x48
sub esi, 1
jne 0x4be060
mov dword [edx + 8], ecx
mov esi, dword [edx + 8]
cmp esi, ebx
jb 0x4be11c
cmp esi, edi
ja 0x4be11c
mov ecx, dword [esi + 0x40]
push 0x48
push 0xcc
push esi
mov dword [edx + 8], ecx
call fcn.004e53e0
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 0x4be11c
cmp dword [ebp - 0x28], 0x10000
mov ecx, dword [ebp - 0x2c]
jne 0x4be0ff
cmp ecx, 0x10000
jb 0x4be0ff
push 0x40
push 0x3000
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
jne 0x4be032
add esi, 0x10000
jmp 0x4be114
mov esi, dword [ebp - 0x38]
add esi, ecx
movzx ecx, si
test ecx, ecx
je 0x4be114
mov eax, 0x10000
sub eax, ecx
add esi, eax
cmp esi, edi
jb 0x4be010
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret