Function at 0x4e6c58
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
lea eax, [ebp - 0x40]
mov edx, dword [0x4e235c]
call fcn.0040b0a0
xor eax, eax
push ebp
push 0x4e6ecf
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x51de0c], 0
setne byte [ebp - 0x41]
cmp byte [ebp - 0x41], 0
jne 0x4e6eb3
xor edx, edx
mov eax, dword [0x517304]
call fcn.004e4f1c
mov dword [0x51de0c], eax
cmp dword [0x51de0c], 0
je 0x4e6eb3
xor edx, edx
mov eax, dword [0x5172e4]
call fcn.004e4e10
lea edx, [ebp - 0x40]
call fcn.004e4cc4
cmp byte [ebp - 0x40], 0
jne 0x4e6cde
xor edx, edx
mov eax, dword [0x5172e0]
call fcn.004e4e10
lea edx, [ebp - 0x40]
call fcn.004e4cc4
mov eax, dword [ebp - 0x20]
call fcn.0040be18
test eax, eax
jl 0x4e6ea6
inc eax
xor ebx, ebx
mov esi, ebx
add esi, esi
add esi, esi
add esi, esi
sub esi, ebx
mov edx, dword [ebp - 0x20]
cmp dword [edx + esi*4 + 0x14], 0
jne 0x4e6d13
mov edx, dword [ebp - 0x20]
cmp dword [edx + esi*4 + 0x18], 0
je 0x4e6e9e
mov edx, dword [ebp - 0x20]
mov edx, dword [edx + esi*4 + 0xc]
cmp edx, dword [0x51de0c]
jne 0x4e6e9e
mov eax, dword [ebp - 0x20]
cmp byte [eax + esi*4 + 0x10], 0
je 0x4e6d99
mov eax, dword [ebp - 0x20]
mov edi, dword [eax + esi*4 + 0xc]
mov eax, dword [ebp - 0x20]
sub edi, dword [eax + esi*4 + 0x14]
sub edi, 4
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4e6e81
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
mov dword [0x5173b0], eax
mov eax, dword [0x5173b0]
mov eax, dword [eax]
mov dword [0x5173b4], eax
mov eax, dword [0x5173b0]
mov dword [eax], edi
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
jmp 0x4e6e81
mov eax, dword [ebp - 0x20]
cmp dword [eax + esi*4 + 0x18], 0
je 0x4e6e2a
push 0
push 4
call fcn.004e6238
mov dword [0x5173ac], eax
mov eax, dword [0x5173ac]
mov dword [eax], 0x4e6c14
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4e6e15
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
mov dword [0x5173b8], eax
mov eax, dword [0x5173b8]
mov eax, dword [eax]
mov dword [0x5173bc], eax
mov eax, dword [0x5173b8]
mov edx, dword [0x5173ac]
mov dword [eax], edx
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x18]
push eax
call sub.kernel32.dll_VirtualProtect
lea eax, [ebp - 0x48]
push eax
push 0x20
push 4
mov eax, dword [0x5173ac]
push eax
call sub.kernel32.dll_VirtualProtect
jmp 0x4e6e81
lea eax, [ebp - 0x48]
push eax
push 0x40
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4e6e81
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
mov dword [0x5173b8], eax
mov eax, dword [0x5173b8]
mov eax, dword [eax]
mov dword [0x5173bc], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0xc]
mov edx, dword [0x5173b8]
mov dword [edx], eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x48]
push eax
push 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + esi*4 + 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
cmp dword [0x5173b8], 0
jne 0x4e6e97
cmp dword [0x5173b0], 0
jne 0x4e6e97
xor eax, eax
jmp 0x4e6e99
mov al, 1
mov byte [ebp - 0x41], al
jmp 0x4e6ea6
inc ebx
dec eax
jne 0x4e6cf1
cmp byte [ebp - 0x41], 0
jne 0x4e6eb3
xor eax, eax
mov dword [0x51de0c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e6ed6
lea eax, [ebp - 0x40]
mov edx, dword [0x4e235c]
call fcn.0040b17c
ret