Function at 0x10010990
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
mov eax, ecx
xor esi, esi
push edi
mov edi, dword [eax]
mov ebx, edx
mov dword [ebp - 0x20], eax
cmp dword [0x1004c894], esi
jne 0x100109d4
push 0x1004c9c0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push esi
push 0x1004c8c0
call fcn.10018360
add esp, 0xc
mov dword [0x1004c894], 1
push 0x1004c9c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.10010480
mov edi, eax
mov ecx, ebx
mov dword [ebp - 0x1c], edi
call fcn.10010480
push 0x50
mov dword [ebp - 8], eax
lea eax, [ebp - 0x70]
xorps xmm0, xmm0
push 0
push eax
movlpd qword [ebp - 0x78], xmm0
call fcn.10018360
add esp, 0xc
lea eax, [ebp - 0x78]
push eax
mov ecx, edi
call fcn.100108d0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
cmp ebx, 5
jb 0x10010c67
mov edx, ebx
mov ecx, edi
call fcn.10010750
push dword [ebp - 0x6c]
mov ecx, edi
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call fcn.100104c0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10010c62
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 0x10]
push ecx
push 0x40
push ebx
push edi
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x10010c1f
lea eax, [ebp - 0xc]
push eax
push 0x40
push 0x6c
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x10010c02
xor ecx, ecx
lea eax, [esi + 0x2c]
test ebx, ebx
je 0x10010ac7
mov dword [ebp - 0x18], edi
mov edx, eax
sub edi, eax
lea ebx, [ebx]
mov al, byte [edi + edx]
mov byte [edx], al
mov byte [esi + ecx + 0x4c], al
inc ecx
lea edx, [edx + 1]
cmp ecx, ebx
jb 0x10010ab0
mov edi, dword [ebp - 0x1c]
lea eax, [esi + 0x2c]
lea edx, [ebx + 5]
lea ecx, [ebx + edi]
add edx, eax
cmp edx, ecx
jbe 0x10010ad9
mov eax, edx
sub eax, ecx
jmp 0x10010add
mov eax, ecx
sub eax, edx
cmp eax, 0x7fff0000
ja 0x10010af1
sub ecx, edx
mov byte [esi + ebx + 0x2c], 0xe9
mov dword [esi + ebx + 0x2d], ecx
jmp 0x10010b05
lea edx, [esi + 0x2c]
lea eax, [ebx + 6]
add eax, edx
mov word [edx + ebx], 0x25ff
mov dword [edx + ebx + 2], eax
mov dword [eax], ecx
mov ecx, dword [ebp - 8]
cmp ecx, edi
jae 0x10010b12
mov eax, edi
sub eax, ecx
jmp 0x10010b16
mov eax, ecx
sub eax, edi
cmp eax, 0x7fff0000
jbe 0x10010ba8
lea ebx, [esi + 0xc]
lea edx, [ebx + 5]
cmp edx, ecx
jbe 0x10010b31
mov eax, edx
sub eax, ecx
jmp 0x10010b35
mov eax, ecx
sub eax, edx
cmp eax, 0x7fff0000
ja 0x10010b4b
mov eax, ecx
sub eax, edx
mov byte [ebx], 0xe9
mov dword [ebx + 1], eax
lea eax, [ebx + 5]
jmp 0x10010b5b
lea eax, [ebx + 6]
mov word [ebx], 0x25ff
mov dword [ebx + 2], eax
mov dword [eax], ecx
add eax, 4
sub eax, esi
sub eax, 0xc
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [edi + 5]
cmp ecx, ebx
jbe 0x10010b78
mov eax, ecx
sub eax, ebx
jmp 0x10010b7c
mov eax, ebx
sub eax, ecx
cmp eax, 0x7fff0000
ja 0x10010b93
sub ebx, ecx
mov ecx, dword [ebp - 8]
mov byte [edi], 0xe9
mov dword [edi + 1], ebx
mov ebx, dword [ebp - 0x14]
jmp 0x10010bd9
mov ecx, dword [ebp - 8]
lea eax, [edi + 6]
mov word [edi], 0x25ff
mov dword [edi + 2], eax
mov dword [eax], ebx
mov ebx, dword [ebp - 0x14]
jmp 0x10010bd9
lea edx, [edi + 5]
cmp edx, ecx
jbe 0x10010bb5
mov eax, edx
sub eax, ecx
jmp 0x10010bb9
mov eax, ecx
sub eax, edx
cmp eax, 0x7fff0000
ja 0x10010bcc
mov eax, ecx
sub eax, edx
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x10010bd9
lea eax, [edi + 6]
mov word [edi], 0x25ff
mov dword [edi + 2], eax
mov dword [eax], ecx
push ebx
lea eax, [esi + 0x2c]
push eax
push dword [ebp - 4]
mov dword [esi + 4], ebx
mov dword [esi], edi
mov dword [esi + 8], ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push 0x6c
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push ebx
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push ebx
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [esi], 0
je 0x10010c2e
mov ecx, dword [ebp - 0x20]
lea eax, [esi + 0x2c]
mov dword [ecx], eax
jmp 0x10010c62
xor eax, eax
cmp dword [eax*4 + 0x1004c8c0], esi
je 0x10010c41
inc eax
cmp eax, 0x40
jb 0x10010c30
jmp 0x10010c60
push 0x8000
push 0
push esi
mov dword [eax*4 + 0x1004c8c0], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x1004c890]
xor esi, esi
call fcn.100106c0
push 0x1004c9c0
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