Function at 0x10016fa8
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0xc]
and eax, 0xffff7fff
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 8]
and dword [eax + 8], 0
mov eax, dword [ebp - 8]
or dword [eax + 4], 0xffffffff
mov ecx, dword [ebp - 8]
add ecx, 0xc
call fcn.10007cde
cmp dword [ebp + 8], 0
je 0x10017010
push 0
push 0x104
push dword [ebp + 8]
call fcn.10016b62
test eax, eax
jl 0x10017010
push dword [ebp + 0x10]
push dword [ebp + 8]
lea eax, [ebp - 0x258]
push eax
call fcn.100175d7
test eax, eax
jne 0x1001700e
xor eax, eax
jmp 0x10017240
jmp 0x1001707f
cmp dword [ebp + 0x10], 0
je 0x10017078
mov eax, dword [ebp + 0x10]
mov dword [eax + 8], 3
mov eax, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 0x40], eax
cmp dword [ebp + 8], 0
jne 0x10017035
and dword [ebp - 0x28], 0
jmp 0x1001706a
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
mov ax, word [eax]
mov word [ebp - 0x1e], ax
add dword [ebp - 0x10], 2
cmp word [ebp - 0x1e], 0
jne 0x10017044
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x38]
sar eax, 1
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
push dword [ebp + 8]
mov ecx, dword [ebp - 0x40]
call fcn.10007c16
xor eax, eax
jmp 0x10017240
mov eax, dword [ebp - 8]
add eax, 0xc
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x258]
push eax
mov ecx, dword [ebp - 0x44]
call fcn.100076ac
and dword [ebp - 0x18], 0
mov eax, dword [ebp + 0xc]
and eax, 3
mov dword [ebp - 0x24], eax
je 0x100170b4
cmp dword [ebp - 0x24], 1
je 0x100170bd
cmp dword [ebp - 0x24], 2
je 0x100170c6
jmp 0x100170cd
mov dword [ebp - 0x18], SysStringLen
jmp 0x100170cd
mov dword [ebp - 0x18], 0x40000000
jmp 0x100170cd
mov dword [ebp - 0x18], 0xc0000000
and dword [ebp - 0xc], 0
mov eax, dword [ebp + 0xc]
and eax, 0x70
mov dword [ebp - 0x14], eax
je 0x100170f4
cmp dword [ebp - 0x14], 0x10
je 0x100170f4
cmp dword [ebp - 0x14], 0x20
je 0x100170fa
cmp dword [ebp - 0x14], 0x30
je 0x10017103
cmp dword [ebp - 0x14], 0x40
je 0x1001710c
and dword [ebp - 0xc], 0
jmp 0x10017113
mov dword [ebp - 0xc], 1
jmp 0x10017113
mov dword [ebp - 0xc], 2
jmp 0x10017113
mov dword [ebp - 0xc], 3
mov dword [ebp - 0x50], 0xc
and dword [ebp - 0x4c], 0
mov eax, dword [ebp + 0xc]
and eax, 0x80
jne 0x10017131
mov dword [ebp - 0x2c], 1
jmp 0x10017135
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
and eax, 0x1000
je 0x10017161
mov eax, dword [ebp + 0xc]
and eax, 0x2000
je 0x10017158
mov dword [ebp - 0x1c], 4
jmp 0x1001715f
mov dword [ebp - 0x1c], 2
jmp 0x10017168
mov dword [ebp - 0x1c], 3
mov dword [ebp - 4], 0x80
mov eax, dword [ebp + 0xc]
and eax, 0x10000
je 0x10017184
mov eax, dword [ebp - 4]
or eax, 0x20000000
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and eax, 0x20000
je 0x10017199
mov eax, dword [ebp - 4]
or eax, 0x80000000
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and eax, 0x40000
je 0x100171ae
mov eax, dword [ebp - 4]
or eax, 0x10000000
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and eax, 0x80000
je 0x100171c3
mov eax, dword [ebp - 4]
or eax, 0x8000000
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x10], 0
je 0x100171f1
push 0
push dword [ebp - 4]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp + 8]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x10]
call fcn.1000cb6f
mov dword [ebp - 0x30], eax
jmp 0x1001720f
push 0
push dword [ebp - 4]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
jne 0x1001722a
push dword [ebp + 8]
push dword [ebp + 0x10]
call fcn.10016c0b
xor eax, eax
jmp 0x10017240
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x34]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 8]
mov dword [eax + 8], 1
xor eax, eax
inc eax
leave
ret 0xc