CmpLockKcbStackFlusherLocksExclusive

VOID __fastcall CmpLockKcbStackFlusherLocksExclusive(INT64 a1){
  int v2; 
  _CMHIVE *i; 
  INT16 v4; 
  __int16 v5; 
  INT64 v6; 
  _CMHIVE *v7; 

  v2 = *(__int16 *)(a1 + 2) + 1;
  for( i = CmpGetNextActiveHive(0i64); ; i = CmpGetNextActiveHive(v7) )
  {
    v7 = i;
    if( !i )
      break;
    v4 = *(_WORD *)(a1 + 2);
    if( v4 >= 0 )
    {
      while( 1 )
      {
        v6 = *(_QWORD *)(CmpGetKcbAtLayerHeight(a1, v4) + 32);
        if( (_CMHIVE *)v6 == v7 )
          break;
        v4 = v5 - 1;
        if( v4 < 0 )
          goto LABEL_5;
      }
      HvLockHiveFlusherExclusive(v6);
      --v2;
    }
LABEL_5:
    if( !v2 )
    {
      CmpQuitNextActiveHive((_EX_RUNDOWN_REF *)v7);
      return;
    }
  }
}

Referenced by:

CmSaveKey