CmpFullPromoteHiveRootFromKcbStack

INT64 __fastcall CmpFullPromoteHiveRootFromKcbStack(INT64 a1){
  _CM_KEY_CONTROL_BLOCK *KcbAtLayerHeight; 
  int started; 
  INT64 EntryAtLayerHeight; 
  INT64 result[10]; 
  memset((INT64)result, 0i64);
  CmpInitializeKeyNodeStack((INT64)result);
  KcbAtLayerHeight = (_CM_KEY_CONTROL_BLOCK *)CmpGetKcbAtLayerHeight(a1, *(_WORD *)(a1 + 2));
  started = CmpStartKeyNodeStackFromKcbStack((INT64)result, a1);
  if( started >= 0 )
  {
    started = CmpFullPromoteSingleKeyFromKeyNodeStacks(0i64, (INT16 *)result);
    if( started >= 0 )
    {
      EntryAtLayerHeight = CmpKeyNodeStackGetEntryAtLayerHeight((INT64)result, *(_WORD *)(a1 + 2));
      ++KcbAtLayerHeight->SequenceNumber;
      CmpRebuildKcbCacheFromNode(KcbAtLayerHeight, *(_CM_KEY_NODE **)(EntryAtLayerHeight + 16));
      started = 0;
    }
  }
  CmpCleanupKeyNodeStack((INT64)result);
  return(unsigned int)started;
}

Referenced by:

CmpPromoteKey