Function at 0x4579e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x6c
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [eax]
cmp dword [0x4e1764], esi
jne 0x457a0d
push 0x4e1314
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4e1764], 1
push 0x4e1314
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.00457320
mov ecx, dword [ebp + 0xc]
mov ebx, eax
call fcn.00457320
push 0x50
lea ecx, [ebp - 0x60]
push esi
push ecx
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
call fcn.0047cc30
add esp, 0xc
lea edx, [ebp - 0x68]
push edx
push ebx
call fcn.00457900
mov edi, eax
add esp, 8
cmp edi, 5
jb 0x457c1f
push ebx
mov ecx, edi
call fcn.00457780
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
add esp, 4
push eax
mov eax, dword [ebp - 0x68]
push ecx
push edx
push eax
push ebx
call fcn.00457550
mov esi, eax
xor eax, eax
add esp, 0x14
cmp esi, eax
je 0x457c1a
lea ecx, [ebp - 8]
push ecx
push 0x40
push edi
push ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x457bb7
lea edx, [ebp - 4]
push edx
push 0x40
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x457b98
lea eax, [esi + 0x2c]
mov dword [ebp - 0xc], 0
test edi, edi
je 0x457ae8
mov edx, dword [ebp - 0xc]
mov ecx, ebx
sub ecx, eax
mov dword [ebp - 0x10], ecx
jmp 0x457ad9
mov ecx, dword [ebp - 0x10]
mov cl, byte [ecx + eax]
mov byte [eax], cl
mov byte [esi + edx + 0x4c], cl
inc edx
inc eax
cmp edx, edi
jb 0x457ad6
lea eax, [esi + edi + 0x2c]
lea ecx, [edi + ebx]
lea edx, [eax + 5]
mov dword [ebp - 0x10], ecx
cmp edx, ecx
jbe 0x457afd
sub edx, ecx
jmp 0x457b07
mov edx, ecx
lea ecx, [eax + 5]
sub edx, ecx
mov ecx, dword [ebp - 0x10]
cmp edx, 0x7fff0000
ja 0x457b1c
lea edx, [eax + 5]
sub ecx, edx
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
jmp 0x457b29
lea edx, [eax + 6]
mov word [eax], 0x25ff
mov dword [eax + 2], edx
mov dword [edx], ecx
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
jae 0x457b36
mov eax, ebx
sub eax, ecx
jmp 0x457b3a
mov eax, ecx
sub eax, ebx
cmp eax, 0x7fff0000
jbe 0x457b63
lea eax, [esi + 0xc]
call fcn.00457380
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [esi + 0xc]
mov eax, ebx
call fcn.00457380
mov eax, dword [ebp + 0xc]
mov dword [esi + 8], eax
push edi
lea eax, [esi + 0x2c]
push eax
mov dword [esi + 4], edi
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 4]
lea ecx, [ebp - 4]
push ecx
push edx
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ecx, dword [ebp - 8]
lea eax, [ebp - 8]
push eax
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ecx, ecx
cmp dword [esi], ecx
je 0x457bc7
mov eax, dword [ebp + 8]
lea edx, [esi + 0x2c]
mov dword [eax], edx
jmp 0x457c1a
mov eax, dword [esi + 0x6c]
cmp eax, ecx
je 0x457bd4
mov edx, dword [esi + 0x70]
mov dword [eax + 0x70], edx
mov eax, dword [esi + 0x70]
cmp eax, ecx
je 0x457be1
mov edx, dword [esi + 0x6c]
mov dword [eax + 0x6c], edx
cmp dword [0x4e1768], esi
jne 0x457bf1
mov eax, dword [esi + 0x70]
mov dword [0x4e1768], eax
mov dword [esi + 0x70], ecx
mov dword [esi + 0x6c], ecx
mov edx, dword [0x4e176c]
mov dword [esi + 0x70], edx
mov eax, dword [0x4e176c]
cmp eax, ecx
je 0x457c0c
mov dword [eax + 0x6c], esi
dec dword [0x4e1770]
mov dword [0x4e176c], esi
xor esi, esi
call fcn.004576f0
push 0x4e1314
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