CmGetKeyFlags

__int64 __fastcall CmGetKeyFlags(__int64 a1, __int64 a2, INT64 a3){
  int v3; 
  unsigned int v5; 
  LIST_ENTRY *v7; 
  __int64 v8; 
  __int64 v9; 
  LIST_ENTRY *ListIterator; 

  v3 = *(_DWORD *)(a1 + 184);
  ListIterator = 0i64;
  v5 = v3 & 0xF;
  if( a2 )
  {
    v7 = (LIST_ENTRY *)(a1 + 208);
    while( 1 )
    {
      LODWORD(v8) = CmListGetPrevElement(v7, &ListIterator, a3);
      v9 = v8;
      if( !v8 )
        break;
      if( CmEqualTrans(*(_QWORD *)(v8 + 56), a2) && *(_DWORD *)(v9 + 68) == 7 )
        return *(unsigned int *)(v9 + 88);
    }
  }
  return v5;
}

Referenced by:

CmQueryKey
CmQueryLayeredKey