Function at 0x4bcfc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e67a6
mov eax, dword fs:[0]
push eax
mov eax, 0x1018
call fcn.005b8630
mov eax, dword [0x66a074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
test ecx, ecx
je 0x4bd278
test esi, esi
je 0x4bd278
mov ebx, dword [ecx]
push 0x674254
mov dword [ebp - 0x101c], ebx
mov dword [ebp - 0x1020], 0x674254
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [esi], 0xffffffff
je 0x4bd230
cmp dword [esi + 8], 0
jne 0x4bd224
mov eax, dword [esi]
mov edi, dword [ebx + eax*4]
mov eax, dword [esi + 4]
mov dword [ebp - 0x1018], eax
mov eax, dword [0x674250]
test eax, eax
jne 0x4bd09c
push 0x674238
mov dword [ebp - 0x1024], 0x674238
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 1
cmp dword [0x674250], 0
jne 0x4bd088
push 0
push 0
push 0x40000
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x674250], eax
push 0x674238
mov byte [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x674250]
push 0x24
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4bd264
mov eax, dword [ebp - 0x1018]
lea edx, [ebx + 0x20]
mov dword [edx], eax
lea ecx, [ebx + 6]
mov dword [ebx + 0x1c], ecx
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], edi
mov edi, 0x25ff
mov dword [ebx + 0x14], 0x400000
mov dword [ebx + 2], eax
mov eax, 0x35ff
mov word [ebx + 7], ax
lea eax, [ebx + 0x18]
push 0x14
push ebx
mov word [ebx], di
mov byte [ecx], 0x58
mov dword [ebx + 9], eax
mov byte [ebx + 0xd], 0x50
mov word [ebx + 0xe], di
mov dword [ebx + 0x10], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
xor al, al
xor edi, edi
mov byte [ebp - 0x1011], al
cmp edi, 3
jge 0x4bd1a2
mov ecx, dword [ebp - 0x101c]
lea eax, [ebp - 0x1018]
push eax
mov eax, dword [esi]
push 0x40
push 4
mov dword [ebp - 0x1018], 0
lea eax, [ecx + eax*4]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x4bd14c
call fcn.004a3460
jmp 0x4bd191
mov eax, dword [esi]
mov edx, ebx
mov ecx, dword [ebp - 0x101c]
mov eax, dword [ecx + eax*4]
mov dword [ebx + 0x18], eax
push eax
mov eax, dword [esi]
lea ecx, [ecx + eax*4]
call fcn.004bcf30
mov ecx, dword [esi]
add esp, 4
mov byte [ebp - 0x1011], al
lea eax, [ebp - 0x1018]
push eax
mov eax, dword [ebp - 0x101c]
push dword [ebp - 0x1018]
push 4
lea ecx, [eax + ecx*4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov al, byte [ebp - 0x1011]
inc edi
test al, al
je 0x4bd111
jmp 0x4bd1aa
test al, al
je 0x4bd241
cmp byte [0x674e04], 0
mov dword [esi + 8], ebx
jne 0x4bd21e
push 0x1000
lea eax, [ebp - 0x1010]
push 0
push eax
call fcn.005b9c20
add esp, 0xc
lea eax, [ebp - 0x1010]
push 0x800
push eax
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4bd21e
lea eax, [ebp - 0x1018]
mov dword [ebp - 0x1018], 0
push eax
lea eax, [ebp - 0x1010]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
movzx ecx, byte [0x674e04]
test eax, eax
mov eax, 1
cmovne ecx, eax
mov byte [0x674e04], cl
mov ebx, dword [ebp - 0x101c]
add esi, 0xc
cmp dword [esi], 0xffffffff
jne 0x4bd031
push 0x674254
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4bd27d
push ebx
push 0
push dword [0x674250]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x674254
mov esi, 0x80004005
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4bd27d
push 0x674254
mov esi, 0x8007000e
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x4bd27d
mov eax, 0x80070057
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b75ab
mov esp, ebp
pop ebp
ret