Function at 0x42d180
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [0x4ede84]
cmp dword [0x4ed000], esi
jne 0x42d1c1
push 0x4ecd98
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push pe_nt_image_headers32
push esi
push 0x4ecdb0
call fcn.0047e260
add esp, 0xc
mov dword [0x4ed000], 1
push 0x4ecd98
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, edi
call fcn.0042cbc0
mov ebx, eax
mov eax, 0x43fe80
call fcn.0042cbc0
push 0x50
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x68]
push esi
push eax
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
call fcn.0047e260
lea ecx, [ebp - 0x70]
add esp, 0xc
push ecx
mov ecx, ebx
call fcn.0042d070
mov edi, eax
add esp, 4
cmp edi, 5
jb 0x42d38c
push edi
push ebx
call fcn.0042cf00
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x6c]
push edx
mov edx, dword [ebp - 0x70]
push eax
push ecx
push edx
mov eax, ebx
call fcn.0042cc40
mov esi, eax
add esp, 0x18
test esi, esi
je 0x42d387
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0xc]
push ecx
push 0x40
push edi
push ebx
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x42d343
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 0x40
push 0x6c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x42d323
lea eax, [esi + 0x2c]
mov dword [ebp - 0x14], 0
test edi, edi
jbe 0x42d2aa
mov edx, dword [ebp - 0x14]
mov ecx, ebx
sub ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x42d29b
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + eax]
mov byte [eax], cl
mov byte [esi + edx + 0x4c], cl
inc edx
inc eax
cmp edx, edi
jb 0x42d298
lea ecx, [edi + ebx]
lea eax, [esi + edi + 0x2c]
call fcn.0042cc00
mov ecx, dword [ebp - 0x10]
cmp ecx, ebx
jae 0x42d2c3
mov eax, ebx
sub eax, ecx
jmp 0x42d2c7
mov eax, ecx
sub eax, ebx
cmp eax, 0x7fff0000
jbe 0x42d2ed
lea eax, [esi + 0xc]
call fcn.0042cc00
mov ecx, dword [ebp - 4]
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [esi + 0xc]
mov eax, ebx
call fcn.0042cc00
mov edx, dword [ebp - 0x10]
push edi
lea eax, [esi + 0x2c]
push eax
mov eax, dword [ebp - 4]
push eax
mov dword [esi + 4], edi
mov dword [esi], ebx
mov dword [esi + 8], edx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
lea ecx, [ebp - 8]
push ecx
push edx
push 0x6c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov ecx, dword [ebp - 4]
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [esi], 0
je 0x42d353
lea edx, [esi + 0x2c]
mov dword [0x4ede84], edx
jmp 0x42d387
xor eax, eax
cmp dword [eax*4 + 0x4ecdb0], esi
je 0x42d366
inc eax
cmp eax, 0x40
jb 0x42d355
jmp 0x42d385
push 0x8000
push 0
push esi
mov dword [eax*4 + 0x4ecdb0], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x4ed004]
xor esi, esi
call fcn.0042ce70
push 0x4ecd98
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
test esi, esi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret