Function at 0x10010cb0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x1002f004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov ebx, edx
push edi
xor edi, edi
mov dword [ebp - 0x20], eax
mov esi, dword [eax]
cmp dword [0x10054b18], edi
jne 0x10010ceb
push 0x10054b2c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x10054b18], 1
push 0x10054b2c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, esi
call fcn.10010430
mov esi, eax
mov ecx, ebx
mov dword [ebp - 0x18], esi
call fcn.10010430
push 0x58
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.10012940
add esp, 0xc
lea eax, [ebp - 0x78]
mov ecx, esi
push eax
call fcn.10010bf0
mov ebx, eax
add esp, 4
cmp ebx, 5
jb 0x10010f63
mov edx, ebx
mov ecx, esi
call fcn.10010a50
push dword [ebp - 0x6c]
mov ecx, esi
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
call fcn.100107d0
mov edi, eax
add esp, 0x10
test edi, edi
je 0x10010f5e
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x40
push ebx
push esi
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10010f46
lea eax, [ebp - 8]
push eax
push 0x40
push 0x74
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10010f28
xor ecx, ecx
lea eax, [edi + 0x2c]
test ebx, ebx
je 0x10010dc5
mov dword [ebp - 0x10], esi
mov edx, eax
sub esi, eax
nop dword [eax]
mov al, byte [esi + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
mov byte [edi + ecx + 0x4c], al
inc ecx
cmp ecx, ebx
jb 0x10010db0
mov esi, dword [ebp - 0x18]
lea eax, [ebx + esi]
lea edx, [edi + ebx]
mov dword [ebp - 0x10], eax
lea ecx, [edx + 0x31]
lea esi, [edx + 0x31]
mov dword [ebp - 0x1c], ecx
sub ecx, eax
sub eax, esi
cmp esi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
cmova eax, ecx
cmp eax, 0x7fff0000
ja 0x10010dfa
lea eax, [ebx + esi]
mov byte [edx + 0x2c], 0xe9
sub eax, dword [ebp - 0x1c]
mov dword [edx + 0x2d], eax
jmp 0x10010e0b
lea eax, [edx + 0x32]
mov word [edx + 0x2c], 0x25ff
lea ecx, [ebx + esi]
mov dword [edx + 0x2e], eax
mov dword [eax], ecx
mov edx, dword [ebp - 0x14]
mov ecx, esi
sub ecx, edx
mov eax, edx
sub eax, esi
cmp edx, esi
cmovb eax, ecx
cmp eax, 0x7fff0000
jbe 0x10010ec6
lea edx, [edi + 0xc]
lea eax, [edx + 5]
mov dword [ebp - 0x10], eax
mov ecx, eax
mov eax, dword [ebp - 0x14]
sub ecx, eax
mov esi, dword [ebp - 0x10]
sub eax, esi
cmp esi, dword [ebp - 0x14]
cmova eax, ecx
cmp eax, 0x7fff0000
ja 0x10010e58
mov eax, dword [ebp - 0x14]
sub eax, esi
mov byte [edx], 0xe9
mov dword [edx + 1], eax
add edx, 5
jmp 0x10010e6d
lea eax, [edx + 6]
mov word [edx], 0x25ff
mov dword [edx + 2], eax
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [edx], eax
add edx, 4
sub edx, edi
lea eax, [edi + 0xc]
sub edx, 0xc
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [ebp - 0x18]
lea edx, [edi + 0xc]
lea eax, [esi + 5]
mov dword [ebp - 0x18], eax
mov ecx, eax
sub ecx, edx
mov eax, edx
sub eax, dword [ebp - 0x18]
cmp dword [ebp - 0x18], edx
cmova eax, ecx
cmp eax, 0x7fff0000
ja 0x10010eb4
sub edx, dword [ebp - 0x18]
mov byte [esi], 0xe9
mov dword [esi + 1], edx
mov edx, dword [ebp - 0x14]
jmp 0x10010efe
lea eax, [esi + 6]
mov word [esi], 0x25ff
mov dword [esi + 2], eax
mov dword [eax], edx
mov edx, dword [ebp - 0x14]
jmp 0x10010efe
lea eax, [esi + 5]
mov dword [ebp - 0x10], eax
mov ecx, eax
sub ecx, edx
mov eax, edx
sub eax, dword [ebp - 0x10]
cmp dword [ebp - 0x10], edx
cmova eax, ecx
cmp eax, 0x7fff0000
ja 0x10010ef1
mov eax, edx
mov byte [esi], 0xe9
lea ecx, [esi + 5]
sub eax, ecx
mov dword [esi + 1], eax
jmp 0x10010efe
lea eax, [esi + 6]
mov word [esi], 0x25ff
mov dword [esi + 2], eax
mov dword [eax], edx
push ebx
lea eax, [edi + 0x2c]
mov dword [edi + 4], ebx
push eax
mov dword [edi], esi
mov dword [edi + 8], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x74
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [edi], 0
je 0x10010f55
mov ecx, dword [ebp - 0x20]
lea eax, [edi + 0x2c]
mov dword [ecx], eax
jmp 0x10010f5e
mov ecx, edi
call fcn.10010870
xor edi, edi
call fcn.100109c0
push 0x10054b2c
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.10010f86
mov esp, ebp
pop ebp
ret