Function at 0x10010220
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
mov eax, 0xcccccccc
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov eax, dword [0x1004b040]
xor eax, ebp
mov dword [ebp - 4], eax
imul eax, dword [ebp + 8], 0x2c
add eax, dword [0x1004e4f0]
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], 5
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x10010290
mov eax, dword [ebp - 0x1c]
sub eax, 5
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
add ecx, 2
mov dword [ebp - 0x18], ecx
mov esi, esp
lea edx, [ebp - 0x10]
push edx
push 0x40
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.1003ad24
test eax, eax
jne 0x100102bb
mov eax, 0xa
jmp 0x100103bd
cmp dword [ebp + 0xc], 0
je 0x10010307
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov byte [eax], 0xe9
mov ecx, dword [ebp - 0x1c]
add ecx, 5
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
sub eax, ecx
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 1], eax
mov edx, dword [ebp - 8]
mov al, byte [edx + 0x14]
and al, 1
movzx ecx, al
test ecx, ecx
je 0x10010305
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
mov byte [ecx], 0xeb
mov edx, dword [ebp - 0x24]
mov byte [edx + 1], 0xf9
jmp 0x10010343
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x14]
and cl, 1
movzx edx, cl
test edx, edx
je 0x1001032e
push 7
mov eax, dword [ebp - 8]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.100209a0
add esp, 0xc
jmp 0x10010343
push 5
mov edx, dword [ebp - 8]
add edx, 0xc
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.100209a0
add esp, 0xc
mov esi, esp
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.1003ad24
mov esi, esp
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov edi, esp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp edi, esp
call fcn.1003ad24
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp esi, esp
call fcn.1003ad24
mov cl, byte [ebp + 0xc]
and cl, 1
shl cl, 1
mov edx, dword [ebp - 8]
mov al, byte [edx + 0x14]
and al, 0xfd
or al, cl
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x14], al
mov dl, byte [ebp + 0xc]
and dl, 1
shl dl, 2
mov eax, dword [ebp - 8]
mov cl, byte [eax + 0x14]
and cl, 0xfb
or cl, dl
mov edx, dword [ebp - 8]
mov byte [edx + 0x14], cl
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x100103e8]
call fcn.1003acd0
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1001cf2e
add esp, 0x24
cmp ebp, esp
call fcn.1003ad24
mov esp, ebp
pop ebp
ret