SeAssignSecurityEx2

NTSTATUS __stdcall SeAssignSecurityEx2(
        PVOID ParentDescriptor,
        PVOID ExplicitDescriptor,
        PVOID *NewDescriptor,
        GUID *ObjectType,
        BOOL IsDirectoryObject,
        UINT64 AutoInheritFlags,
        _SECURITY_OBJECT_AI_PARAMS *AutoInheritParams,
        SECURITY_SUBJECT_CONTEXT *SubjectContext,
        GENERIC_MAPPING *GenericMapping){
  int v10; 
  _GUID **v11; 
  UINT64 v13; 
  UINT64 AutoInheritFlagsa; 
  GUID *v15; 
  v15 = ObjectType;
  if( AutoInheritParams && AutoInheritParams->Size != 8 )
    return -1073741811;
  if( ObjectType )
  {
    v10 = 1;
    v11 = &v15;
  }
  else
  {
    v10 = 0;
    v11 = 0i64;
  }
  LODWORD(AutoInheritFlagsa) = AutoInheritFlags;
  LODWORD(v13) = v10;
  return RtlpNewSecurityObject(
           ParentDescriptor,
           ExplicitDescriptor,
           NewDescriptor,
           v11,
           v13,
           IsDirectoryObject,
           AutoInheritFlagsa,
           SubjectContext,
           GenericMapping,
           AutoInheritParams);
}

Referenced by:

ObInsertObjectEx
ObpAssignSecurity
SeAssignSecurityEx