Function at 0x1003c310
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1015f1d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
mov ebx, dword [ebp + 0xc]
mov edx, 0x70
mov dword [ebp - 0x10], eax
mov eax, ebx
mul edx
push esi
mov dword [ebp - 0xc], 0
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100e13ce
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x1003c366
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100476aa
mov esp, ebp
pop ebp
ret
cmp dword [0x10164748], 0
jne 0x1003c384
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x10164748], 1
push edi
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
test ebx, ebx
jle 0x1003c3d8
lea edx, [esi + 8]
nop dword [eax]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + edi*4]
mov esi, dword [eax]
mov dword [edx - 8], esi
mov eax, dword [0x10164764]
test eax, eax
je 0x1003c3c6
lea ecx, [eax + 0x2c]
cmp ecx, esi
je 0x1003c51b
mov eax, dword [eax + 0x70]
test eax, eax
jne 0x1003c3b4
mov dword [edx + 4], 0
inc edi
add edx, 0x70
cmp edi, ebx
jl 0x1003c3a0
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 8], 0
push eax
call fcn.1003b900
add esp, 8
test eax, eax
je 0x1003c4f3
push dword [ebp - 8]
push ebx
push esi
call fcn.1003c630
add esp, 0xc
xor edi, edi
test ebx, ebx
jle 0x1003c4e3
add esi, 0xc
nop dword [eax + eax]
mov eax, dword [esi]
test eax, eax
je 0x1003c4d4
lea ecx, [ebp - 8]
mov dword [ebp - 8], 0
push ecx
push 0x40
push dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1003c4d4
mov eax, dword [esi]
xor ecx, ecx
mov edx, dword [eax]
cmp dword [eax + 4], ecx
jbe 0x1003c466
mov al, byte [eax + ecx + 0x4c]
mov byte [ecx + edx], al
inc ecx
mov eax, dword [esi]
cmp ecx, dword [eax + 4]
jb 0x1003c455
mov edx, dword [eax]
push dword [eax + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esi]
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 8]
push dword [eax + 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi]
inc dword [ebp - 0xc]
mov ecx, dword [ecx + edi*4]
mov eax, dword [eax]
mov dword [ecx], eax
mov ecx, dword [esi]
mov edx, dword [ecx + 0x6c]
test edx, edx
je 0x1003c4a9
mov eax, dword [ecx + 0x70]
mov dword [edx + 0x70], eax
mov edx, dword [ecx + 0x70]
test edx, edx
je 0x1003c4b6
mov eax, dword [ecx + 0x6c]
mov dword [edx + 0x6c], eax
cmp dword [0x10164764], ecx
jne 0x1003c4c6
mov eax, dword [ecx + 0x70]
mov dword [0x10164764], eax
mov dword [ecx + 0x6c], 0
mov dword [ecx + 0x70], 0
inc edi
add esi, 0x70
cmp edi, ebx
jl 0x1003c420
mov esi, dword [ebp - 0x14]
call fcn.1003c530
push dword [ebp - 0x18]
call fcn.100e13b3
add esp, 4
push esi
call fcn.100e13b3
add esp, 4
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.100476aa
mov esp, ebp
pop ebp
ret
mov dword [edx + 4], eax
test eax, eax
je 0x1003c3cd
mov eax, dword [eax + 4]
mov dword [edx], eax
jmp 0x1003c3cd