CmpIsKeyStackSymlink

_BOOL __fastcall CmpIsKeyStackSymlink(INT64 a1){
  __int16 v1; 
  __int64 v2; 

  v1 = *(_WORD *)(a1 + 2);
  if( v1 < 0 )
    return 0;
  while( 1 )
  {
    v2 = v1 >= 2 ? *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8i64 * v1 - 16) : *(_QWORD *)(a1 + 8i64 * v1 + 8);
    if( *(_DWORD *)(v2 + 40) != -1 )
      break;
    if( --v1 < 0 )
      return 0;
  }
  return(*(_DWORD *)(v2 + 184) & 0x100000) != 0;
}

Referenced by:

CmQueryLayeredKey
CmSetValueKey
CmpDoParseKey