Function at 0x4a0f90
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x60f520]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x640454]
push edi
xor edi, edi
cmp dword [0x640498], edi
jne 0x4a0fdb
push 0x641960
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push edi
push 0x641860
call fcn.00559380
add esp, 0xc
mov dword [0x640498], 1
push 0x641960
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, esi
call fcn.004a09c0
mov ebx, eax
mov ecx, 0x43d5b0
mov dword [ebp - 0x14], ebx
call fcn.004a09c0
push 0x50
mov dword [ebp - 0x18], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x70]
movlpd qword [ebp - 0x78], xmm0
push 0
push eax
call fcn.00559380
add esp, 0xc
lea eax, [ebp - 0x78]
mov ecx, ebx
push eax
call fcn.004a0ed0
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
cmp esi, 5
jb 0x4a11b5
mov edx, esi
mov ecx, ebx
call fcn.004a0d30
push dword [ebp - 0x6c]
mov ecx, ebx
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call fcn.004a0a40
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4a11b0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x10], eax
push ecx
push 0x40
push esi
push ebx
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4a1198
lea eax, [ebp - 8]
push eax
push 0x40
push 0x6c
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4a117b
xor ecx, ecx
lea eax, [edi + 0x2c]
test esi, esi
je 0x4a10cc
mov dword [ebp - 0x20], ebx
mov edx, eax
sub ebx, eax
mov al, byte [ebx + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
mov byte [edi + ecx + 0x4c], al
inc ecx
cmp ecx, esi
jb 0x4a10b4
mov ebx, dword [ebp - 0x14]
lea eax, [edi + 0x2c]
lea ecx, [eax + esi]
lea eax, [ecx + 5]
lea edx, [esi + ebx]
mov dword [ebp - 0x14], eax
cmp eax, edx
jbe 0x4a10e0
sub eax, edx
jmp 0x4a10e5
mov eax, edx
sub eax, dword [ebp - 0x14]
cmp eax, 0x7fff0000
ja 0x4a10f9
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov dword [ecx + 1], edx
jmp 0x4a1106
lea eax, [ecx + 6]
mov word [ecx], 0x25ff
mov dword [ecx + 2], eax
mov dword [eax], edx
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
jae 0x4a1113
mov eax, ebx
sub eax, ecx
jmp 0x4a1117
mov eax, ecx
sub eax, ebx
mov edx, ecx
cmp eax, 0x7fff0000
jbe 0x4a1148
lea esi, [edi + 0xc]
mov ecx, esi
call fcn.004a0a00
sub eax, edi
sub eax, 0xc
push eax
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, esi
mov ecx, ebx
call fcn.004a0a00
mov esi, dword [ebp - 0x1c]
jmp 0x4a114f
mov ecx, ebx
call fcn.004a0a00
mov eax, dword [ebp - 0x18]
mov dword [edi + 8], eax
lea eax, [edi + 0x2c]
push esi
push eax
push dword [ebp - 0x10]
mov dword [edi + 4], esi
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x6c
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [edi], 0
je 0x4a11a7
lea eax, [edi + 0x2c]
mov dword [0x640454], eax
jmp 0x4a11b0
mov ecx, edi
call fcn.004a0b70
xor edi, edi
call fcn.004a0ca0
push 0x641960
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
xor eax, eax
test edi, edi
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.0055199a
mov esp, ebp
pop ebp
ret