PiPnpRtlIsDeviceEnumerableForUser
NTSTATUS __stdcall PiPnpRtlIsDeviceEnumerableForUser(
WCHAR *DeviceIntanceId,
VOID *ObjectBaseKey,
_SECURITY_SUBJECT_CONTEXT *SecuritySubjectContext,
UINT8 *EnumerableForUser){
int ObjectProperty;
int v6;
int v8;
PVOID SecurityObject;
_GENERIC_MAPPING SecurityMapping;
UINT8 *AccessGranted;
v8 = 0;
SecurityObject = 0i64;
SecurityMapping.GenericWrite = 0x20000;
SecurityMapping.GenericExecute = 0x20000;
SecurityMapping.GenericRead = 131073;
SecurityMapping.GenericAll = 983041;
*AccessGranted = 0;
ObjectProperty = PnpGetObjectProperty(
0x47706E50u,
0x200ui64,
(INT64)ObjectBaseKey,
1u,
(INT64)SecuritySubjectContext,
0i64,
(INT64)&DEVPKEY_Device_RestrictedSD,
(INT64)&v8,
(__int64)&SecurityObject,
0i64);
v6 = ObjectProperty;
if( ObjectProperty == -1073741275 )
goto LABEL_2;
if( ObjectProperty >= 0 )
{
if( v8 != 19 )
goto LABEL_3;
v6 = PiAuVerifyAccessToObject(
1ui64,
SecurityObject,
&SecurityMapping,
(_SECURITY_SUBJECT_CONTEXT *)EnumerableForUser,
AccessGranted);
if( v6 < 0 )
{
LABEL_2:
v6 = 0;
LABEL_3:
*AccessGranted = 1;
}
}
if( SecurityObject )
ExFreePoolWithTag(SecurityObject, 0x47706E50u);
return v6;
}Referenced by:
PiPnpRtlApplyMandatoryDeviceFilters