Function at 0x10030650
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
xor edx, edx
sub esp, 8
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x18], 0xffffffff
mov dword [ecx + 0x14], edx
cmp dword [ebp + 0xc], edx
je 0x10030876
mov dword [ebp - 8], connect
test al, 1
je 0x1003068d
mov dword [ebp - 8], 0x40000000
jmp 0x10030698
test al, 2
je 0x10030698
mov dword [ebp - 8], 0xc0000000
mov ecx, eax
and ecx, 0x500
mov dword [ebp - 4], 3
cmp ecx, 0x500
jne 0x100306b8
mov dword [ebp - 4], 1
jmp 0x100306ef
mov ecx, eax
and ecx, 0x300
cmp ecx, 0x300
jne 0x100306d1
mov dword [ebp - 4], 2
jmp 0x100306ef
test eax, 0x100
je 0x100306e1
mov dword [ebp - 4], 4
jmp 0x100306ef
test eax, 0x200
je 0x100306ef
mov dword [ebp - 4], 5
push ebx
push esi
xor esi, esi
push edi
test al, 0x40
je 0x100306fd
mov esi, 0x4000100
test eax, eax
jns 0x10030707
or esi, 0x80000000
test eax, 0x40000000
je 0x10030714
or esi, 0x40000000
test eax, 0x20000000
je 0x10030721
or esi, 0x20000000
test eax, 0x10000000
je 0x1003072e
or esi, 0x10000000
test eax, 0x8000000
je 0x1003073b
or esi, 0x8000000
test eax, 0x4000000
je 0x10030748
or esi, 0x4000000
test eax, 0x2000000
je 0x10030755
or esi, 0x2000000
test eax, 0x1000000
je 0x10030762
or esi, 0x1000000
mov edi, eax
xor ebx, ebx
and edi, 8
je 0x1003077a
mov ebx, dword [sym.ACE.dll_void___ACE_OS_Object_Manager::preallocated_object]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
mov eax, dword [ebp - 4]
movzx ecx, word [ebp + 0x10]
push edx
push esi
push eax
mov eax, dword [ebp + 0xc]
push edx
mov edx, dword [ebp - 8]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
je 0x10030802
mov dword [ebp - 8], 0
cmp esi, 0xffffffff
je 0x100307fb
push 2
lea ecx, [ebp - 8]
push ecx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x100307fb
call edi
test eax, eax
je 0x100307fb
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov edi, dword [sym.imp.MSVCR100.dll__errno]
mov esi, eax
call edi
mov dword [eax], esi
lea eax, [esi - 3]
cmp eax, 0x4d
ja case.0x10030824.4
movzx edx, byte [eax + 0x10030890]
jmp dword [edx*4 + 0x1003087c]
call edi
mov dword [eax], 0x11
jmp case.0x10030824.4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp esi, 0xffffffff
jne 0x1003084a
call edi
mov edi, dword [sym.imp.MSVCR100.dll__errno]
mov esi, eax
call edi
mov dword [eax], esi
lea eax, [esi - 3]
cmp eax, 0x4d
ja case.0x10030824.4
movzx eax, byte [eax + 0x100308f4]
jmp dword [eax*4 + 0x100308e0]
call edi
mov dword [eax], 0xc
jmp case.0x10030824.4
call edi
mov dword [eax], 0xd
jmp case.0x10030824.4
call edi
mov dword [eax], 2
or esi, 0xffffffff
mov edi, dword [ebp + 8]
mov dword [edi + 0x18], esi
cmp esi, 0xffffffff
je 0x10030865
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR100.dll__strdup]
add esp, 4
mov dword [edi + 0x14], eax
xor eax, eax
cmp dword [edi + 0x18], 0xffffffff
pop edi
setne al
pop esi
pop ebx
dec eax
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret