Function at 0x577280
Capabilities:
Allocate or change rwx memory

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x64
push ebx
push ebp
push esi
xor ebp, ebp
xor esi, esi
push edi
mov edi, dword [eax]
cmp dword [0x66f3d8], ebp
jne 0x5772c1
push 0x66f2c0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push ebp
push 0x66f2d8
call fcn.00591690
add esp, 0xc
mov dword [0x66f3d8], 1
push 0x66f2c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, edi
call fcn.00577000
mov ebx, eax
mov eax, dword [esp + 0x7c]
call fcn.00577000
push 0x50
lea ecx, [esp + 0x28]
push ebp
push ecx
mov dword [esp + 0x88], eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
call fcn.00591690
lea edx, [esp + 0x28]
push edx
push 5
mov ecx, ebx
call fcn.005771b0
mov edi, eax
add esp, 0x14
cmp edi, 5
jb 0x577482
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
mov eax, ebx
call fcn.00577080
mov esi, eax
add esp, 0x10
cmp esi, ebp
je 0x577482
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x18]
push ecx
push 0x40
push edi
mov ebp, eax
xor eax, eax
push ebx
push ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x577437
lea edx, [esp + 0x10]
push edx
push 0x40
push 0x6c
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x57741b
xor ebp, ebp
lea eax, [esi + 0x2c]
test edi, edi
jbe 0x5773a1
mov edx, ebx
sub edx, eax
mov cl, byte [edx + eax]
mov byte [eax], cl
mov byte [esi + ebp + 0x4c], cl
inc ebp
inc eax
cmp ebp, edi
jb 0x577392
lea ecx, [edi + ebx]
lea eax, [esi + edi + 0x2c]
call fcn.00577040
mov ebp, dword [esp + 0x7c]
cmp ebp, ebx
jae 0x5773bb
mov eax, ebx
sub eax, ebp
jmp 0x5773bf
mov eax, ebp
sub eax, ebx
mov ecx, ebp
cmp eax, 0x7fff0000
jbe 0x5773e8
lea eax, [esi + 0xc]
call fcn.00577040
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [esi + 0xc]
mov eax, ebx
call fcn.00577040
push edi
lea eax, [esi + 0x2c]
mov dword [esi + 8], ebp
mov ebp, dword [esp + 0x18]
push eax
push ebp
mov dword [esi + 4], edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x10]
push ecx
push edx
push 0x6c
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x18]
push eax
push ecx
push edi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [esi], 0
je 0x577447
mov eax, dword [esp + 0x78]
lea edx, [esi + 0x2c]
mov dword [eax], edx
jmp 0x577482
xor eax, eax
lea esp, [esp]
cmp dword [eax*4 + 0x66f2d8], esi
je 0x577461
inc eax
cmp eax, 0x40
jb 0x577450
jmp 0x577480
push 0x8000
push 0
push esi
mov dword [eax*4 + 0x66f2d8], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x66f3dc]
xor esi, esi
push 0x66f2c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
xor eax, eax
test esi, esi
pop esi
pop ebp
setne al
pop ebx
add esp, 0x64
ret