LookupAceFlagsInTable

WCHAR **__fastcall LookupAceFlagsInTable(WCHAR *first, INT64 a2, INT64 a3, CHAR a4){
  WCHAR **v4; 
  int *v5; 
  unsigned int v6; 
  int v8; 
  int v9; 
  unsigned int v13; 
  v4 = 0i64;
  v5 = &dword_140C01B24;
  v6 = 0;
  v8 = a3;
  v9 = a2;
  do
  {
    if( (v8 & *(v5 - 1)) == v8 )
    {
      if( *v5 )
      {
        v13 = 0;
        while( *(_BYTE *)(v13 + *(_QWORD *)(v5 + 1)) != a4 )
        {
          if( ++v13 >= *v5 )
            goto LABEL_7;
        }
      }
      if( first ? wcsnicmp(first, *(const wchar_t **)(v5 - 5), (unsigned int)*(v5 - 3)) == 0 : v9 == *(v5 - 2) )
        break;
    }
LABEL_7:
    ++v6;
    v5 += 8;
  }
  while( v6 < 9 );
  if( v6 < 9 )
    return &(&off_140C01B10)[4 * v6];
  return v4;
}

Referenced by:

LocalConvertAclToString
LocalGetAclForString