SepAdtClassifyObjectIntoSubCategory

UINT16 __stdcall SepAdtClassifyObjectIntoSubCategory(
        VOID *Object,
        _UNICODE_STRING *ObjectTypeName,
        UINT8 AccessGranted,
        UINT8 AccessDenied){
  POBJECT_TYPE *v5; 
  __int64 v6; 
  UINT16 v7; 
  _DEVICE_OBJECT *v8; 

  if( !Object )
  {
    if( !ObjectTypeName )
      return 118;
    if( !RtlCompareUnicodeString(ObjectTypeName, &SepFileTypeName, 0) )
      return 116;
    if( RtlCompareUnicodeString(ObjectTypeName, &SepRegistryTypeName, 0) )
      return 118;
    return 117;
  }
  v5 = (POBJECT_TYPE *)ObTypeIndexTable[(unsigned __int8)ObHeaderCookie ^ (unsigned __int8)*((char *)Object - 24) ^ (unsigned __int64)(unsigned __int8)((unsigned __int16)((_WORD)Object - 48) >> 8)];
  if( v5 == CmKeyObjectType )
    return 117;
  if( v5 == IoFileObjectType )
  {
    if( SepAuditingEnabledForSubcategory(0x80ui64, AccessGranted, AccessDenied) == 1
      && SepIsRemovableStorageDevice(*(_DEVICE_OBJECT **)(v6 + 8)) == 1 )
    {
      return v7;
    }
    return 116;
  }
  if( v5 == (POBJECT_TYPE *)IoDeviceObjectType
    && SepAuditingEnabledForSubcategory(0x80ui64, AccessGranted, AccessDenied) == 1
    && SepIsRemovableStorageDevice(v8) == 1 )
  {
    return v7;
  }
  return 118;
}

Referenced by:

ObpCreateHandle
SeAuditHandleCreation
SeOpenObjectAuditAlarmWithTransaction
SeOperationAuditAlarm
SepAdtAuditObjectAccessWithContext