SepValidateCAPIDs

struct B_TREE_NODE_HDR *__fastcall SepValidateCAPIDs(INT64 a1, INT64 a2){
  unsigned int v2; 
  int v4; 
  char *v5; 
  int v6; 
  v2 = 0;
  v4 = 0;
  while( 1 )
  {
    v5 = *(char **)a2;
    if( !*(_QWORD *)a2 )
      break;
    if( !RtlValidSid(*(PVOID *)a2) )
      return(struct B_TREE_NODE_HDR *)(unsigned int)-1073741704;
    v6 = *(_DWORD *)(v5 + 2) - CAP_AUTHORITY;
    if( !v6 )
      v6 = *((unsigned __int16 *)v5 + 3) - 4352;
    if( v6 )
      return(struct B_TREE_NODE_HDR *)(unsigned int)-1073741692;
    ++v4;
    a2 += 8i64;
    if( v4 )
      return(struct B_TREE_NODE_HDR *)v2;
  }
  return(struct B_TREE_NODE_HDR *)(unsigned int)-1073741811;
}

Referenced by:

SeRmReferenceFindCapName