Function at 0x4d8ca1
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
push esi
xor esi, esi
cmp eax, esi
push edi
mov dword [ebp - 4], esi
je 0x4d8cb8
mov dword [eax], esi
mov eax, dword [ebp + 0x14]
cmp eax, esi
je 0x4d8cc1
mov dword [eax], esi
mov ebx, dword [ebp + 0x18]
cmp ebx, esi
je 0x4d8cca
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5f2f8c], eax
je 0x4d8ce2
mov eax, 0x10dd
jmp 0x4d8eee
mov eax, dword [0x5f2f90]
cmp eax, esi
jne 0x4d8eee
mov ecx, dword [ebp + 8]
cmp ecx, esi
jne 0x4d8cfe
push 6
pop eax
jmp 0x4d8eee
mov eax, dword [ecx]
cmp eax, esi
jne 0x4d8d11
push 6
pop eax
mov dword [0x5f2f90], eax
jmp 0x4d8ea6
push esi
push eax
mov dword [ebp + 0x18], esi
call fcn.004d8756
push 0
mov edi, eax
push dword [ebp + 0xc]
mov dword [ebp - 8], edi
call fcn.004d8756
cmp eax, edi
mov dword [ebp + 0xc], eax
jne 0x4d8d43
cmp dword [0x5f2f88], 0
jne 0x4d8ea0
jmp 0x4d8e7e
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4d8d4c
mov dword [ecx], edi
test ebx, ebx
je 0x4d8d52
mov dword [ebx], eax
push 0x18
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [ebp + 0x18], eax
jne 0x4d8d6d
mov dword [ebp - 4], 8
jmp 0x4d8e7e
push edi
call fcn.004d8f44
mov esi, eax
pop ecx
test esi, esi
je 0x4d8d61
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4d8d83
mov dword [eax], esi
mov eax, edi
xor ebx, ebx
jmp 0x4d8d8c
mov eax, dword [ebp + 0x10]
and dword [ebp + 0x14], 0
lea ecx, [ebp + 0x14]
push ecx
push 0
mov dword [ebp - 4], eax
push eax
lea eax, [ebx + esi]
push eax
call fcn.004d91c1
cmp dword [ebp + 0x14], 0
mov dword [ebp + 0x10], eax
jne 0x4d8dc2
push dword [ebp - 4]
mov ebx, eax
sub ebx, edi
call fcn.004d8ef5
test eax, eax
pop ecx
jne 0x4d8dc2
cmp ebx, 5
jl 0x4d8d89
cmp ebx, 5
jge 0x4d8de0
cmp dword [0x5f2f88], 0
mov dword [ebp - 4], 9
jne 0x4d8e86
jmp 0x4d8e7e
cmp ebx, 0x12
jbe 0x4d8df1
mov dword [ebp - 4], 6
jmp 0x4d8e7e
mov eax, dword [ebp + 0xc]
lea ecx, [esi + 0x17]
mov dword [esi + 0x1c], eax
lea edx, [ebx + edi]
lea eax, [ebx + esi]
mov dword [esi + 0x18], edx
mov byte [ecx], bl
lea edi, [eax + 5]
mov byte [eax], 0xe9
inc eax
sub edx, edi
lea edi, [eax + 4]
mov dword [eax], edx
cmp edi, ecx
jae 0x4d8e2c
sub ecx, edi
mov eax, 0xcccccccc
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp + 0x18]
and dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4d8e75
push dword [ebp - 8]
call fcn.004d913b
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4d8ec6
cmp word [ebx + 0x1c], 0x6544
je 0x4d8ec6
and dword [ebp + 0xc], 0
lea eax, [ebp + 0xc]
push eax
push 0x40
push 0x40
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4d8eae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [0x5f2f90], eax
test esi, esi
je 0x4d8e91
push esi
call fcn.004d899a
pop ecx
cmp dword [ebp + 0x18], 0
je 0x4d8ea0
push dword [ebp + 0x18]
call fcn.004d9644
pop ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov dword [0x5f2f94], ecx
jmp 0x4d8eee
mov word [ebx + 0x1c], 0x6544
mov word [ebx + 0x1e], 0x6f74
mov word [ebx + 0x20], 0x7275
mov word [ebx + 0x22], 0x2173
mov eax, dword [ebp + 8]
and dword [edi + 4], 0
mov dword [edi + 8], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x10], esi
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x14], eax
mov eax, dword [0x5f2f9c]
mov dword [edi], eax
mov dword [0x5f2f9c], edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14