Function at 0x438360
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x6c
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [eax]
cmp dword [0x625ff8], esi
jne 0x4383a3
push 0x61ee58
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push esi
push 0x61ee70
call fcn.0050e6a0
add esp, 0xc
mov dword [0x625ff8], 1
push 0x61ee58
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, edi
call fcn.00437d80
mov ebx, eax
mov eax, dword [ebp + 0xc]
call fcn.00437d80
push 0x50
lea ecx, [esp + 0x2c]
push esi
push ecx
mov dword [ebp + 0xc], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call fcn.0050e6a0
add esp, 0xc
lea edx, [esp + 0x20]
push edx
push ebx
call fcn.00438260
mov edi, eax
add esp, 8
cmp edi, 5
jb 0x43858d
push edi
push ebx
call fcn.004380f0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push edx
push eax
mov eax, ebx
call fcn.00437e00
mov esi, eax
add esp, 0x18
test esi, esi
je 0x438588
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x14]
push ecx
push 0x40
push edi
push ebx
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x438545
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push 0x40
push 0x6c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x438521
lea eax, [esi + 0x2c]
mov dword [esp + 0x18], 0
test edi, edi
jbe 0x4384a3
mov edx, dword [esp + 0x18]
mov ecx, ebx
sub ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x438494
mov ecx, dword [esp + 0x1c]
mov cl, byte [ecx + eax]
mov byte [eax], cl
mov byte [esi + edx + 0x4c], cl
inc edx
inc eax
cmp edx, edi
jb 0x438490
lea ecx, [edi + ebx]
lea eax, [esi + edi + 0x2c]
call fcn.00437dc0
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
jae 0x4384bc
mov eax, ebx
sub eax, ecx
jmp 0x4384c0
mov eax, ecx
sub eax, ebx
cmp eax, 0x7fff0000
jbe 0x4384e7
lea eax, [esi + 0xc]
call fcn.00437dc0
mov ecx, dword [esp + 0xc]
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.00437dc0
mov edx, dword [ebp + 0xc]
push edi
lea eax, [esi + 0x2c]
push eax
mov eax, dword [esp + 0x14]
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 [esp + 0x10]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
push edx
push 0x6c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov ecx, dword [esp + 0xc]
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x14]
push edx
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [esi], 0
je 0x438554
mov eax, dword [ebp + 8]
lea edx, [esi + 0x2c]
mov dword [eax], edx
jmp 0x438588
xor eax, eax
cmp dword [eax*4 + 0x61ee70], esi
je 0x438567
inc eax
cmp eax, 0x40
jb 0x438556
jmp 0x438586
push 0x8000
push 0
push esi
mov dword [eax*4 + 0x61ee70], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x625ffc]
xor esi, esi
call fcn.00438060
push 0x61ee58
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