AuthzBasepDeleteSecurityAttribute

INT64 __fastcall AuthzBasepDeleteSecurityAttribute(_DWORD *a1, INT64 a2){
  int v3; 
  UNICODE_STRING *SecurityAttribute; 
  __int64 v6; 
  UNICODE_STRING *v7; 
  __int64 v9; 
  INT64 v10; 
  INT64 *v11; 
  UNICODE_STRING v12; 
  char v13; 
  v12 = 0i64;
  v3 = 0;
  v13 = 0;
  v12.Length = *(_WORD *)a2;
  v12.MaximumLength = v12.Length;
  v12.Buffer = *(wchar_t **)(a2 + 8);
  SecurityAttribute = AuthzBasepFindSecurityAttribute((__int64)a1, &v12);
  v7 = SecurityAttribute;
  if( !SecurityAttribute || ((__int64)SecurityAttribute[3].Buffer & 4) != 0 )
  {
    return(unsigned int)-1073741275;
  }
  else
  {
    LOBYTE(v6) = 1;
    AuthzBasepAddSecurityAttributeToLists(a1, SecurityAttribute, 0i64, v6);
    if( *(_DWORD *)(a2 + 24) )
    {
      v3 = AuthzBasepDeleteSecurityAttributeValues((__int64)v7, a2, &v13, v9);
      if( v3 < 0 )
        return(unsigned int)v3;
      if( v13 )
        LODWORD(v7[3].Buffer) |= 4u;
    }
    else
    {
      LODWORD(v7[3].Buffer) |= 4u;
      AuthzBasepDeleteAllSecurityAttributeValues((INT64)v7);
    }
    if( ((__int64)v7[3].Buffer & 5) == 4 )
    {
      AuthzBasepRemoveSecurityAttributeFromLists((DEVICE_OBJECT *)a1);
      AuthzBasepFreeSecurityAttributeValues((INT64)v7, 0i64, v10, v11);
      ExFreePoolWithTag(v7, 0);
    }
  }
  return(unsigned int)v3;
}

Referenced by:

AuthzBasepReplaceSecurityAttribute
AuthzBasepSetSecurityAttributesToken