LookupAceFlagsInTable

_STRSD_KEY_LOOKUP *__stdcall LookupAceFlagsInTable(WCHAR *String, UINT64 AceFlags, UINT64 LookupFlags){
  char v3; 
  _STRSD_KEY_LOOKUP *v4; 
  char *v5; 
  unsigned int v6; 
  char v7; 
  int v8; 
  int v9; 
  unsigned int v13; 

  v4 = 0i64;
  v5 = (char *)&stru_140C00F40 + 3044;
  v6 = 0;
  v7 = v3;
  v8 = LookupFlags;
  v9 = AceFlags;
  do
  {
    if( (v8 & *((_DWORD *)v5 - 1)) == v8 )
    {
      if( *(_DWORD *)v5 )
      {
        v13 = 0;
        while( *(_BYTE *)(v13 + *(_QWORD *)(v5 + 4)) != v7 )
        {
          if( ++v13 >= *(_DWORD *)v5 )
            goto LABEL_7;
        }
      }
      if( String ? wcsnicmp(String, *(const wchar_t **)(v5 - 20), *((_DWORD *)v5 - 3)) == 0 : v9 == *((_DWORD *)v5 - 2) )
        break;
    }
LABEL_7:
    ++v6;
    v5 += 32;
  }
  while( v6 < 9 );
  if( v6 < 9 )
    return(_STRSD_KEY_LOOKUP *)((char *)&stru_140C00F40 + 32 * v6 + 3024);
  return v4;
}

Referenced by:

LocalConvertAclToString
LocalGetAclForString