SepAdtClassifyObjectIntoSubCategory
UINT16 __fastcall SepAdtClassifyObjectIntoSubCategory(
VOID *Object,
_UNICODE_STRING *ObjectTypeName,
UINT8 AccessGranted,
UINT8 AccessDenied){
_UNICODE_STRING *v5;
POBJECT_TYPE *v6;
INT64 v7;
__int64 v8;
UINT16 v9;
INT64 v10;
_DEVICE_OBJECT *v11;
v5 = ObjectTypeName;
if( !Object )
{
if( !ObjectTypeName )
return 118;
if( !(unsigned int)RtlCompareUnicodeString(ObjectTypeName, &SepFileTypeName, 0) )
return 116;
if( (unsigned int)RtlCompareUnicodeString(v5, &SepRegistryTypeName, 0) )
return 118;
return 117;
}
v6 = (POBJECT_TYPE *)ObTypeIndexTable[(unsigned __int8)ObHeaderCookie ^ (unsigned __int8)*((char *)Object - 24) ^ (unsigned __int64)(unsigned __int8)((unsigned __int16)((_WORD)Object - 48) >> 8)];
if( v6 == CmKeyObjectType )
return 117;
if( v6 == IoFileObjectType )
{
LOBYTE(v7) = AccessDenied;
LOBYTE(ObjectTypeName) = AccessGranted;
if( SepAuditingEnabledForSubcategory(0x80ui64, (INT64)ObjectTypeName, v7)
&& SepIsRemovableStorageDevice(*(_DEVICE_OBJECT **)(v8 + 8)) == 1 )
{
return v9;
}
return 116;
}
if( v6 == (POBJECT_TYPE *)IoDeviceObjectType )
{
LOBYTE(v10) = AccessDenied;
LOBYTE(ObjectTypeName) = AccessGranted;
if( SepAuditingEnabledForSubcategory(0x80ui64, (INT64)ObjectTypeName, v10) && SepIsRemovableStorageDevice(v11) == 1 )
return v9;
}
return 118;
}Referenced by:
ObpCreateHandle
SeAuditHandleCreation
SeOpenObjectAuditAlarmWithTransaction
SeOperationAuditAlarm
SepAdtAuditObjectAccessWithContext