CmpLightWeightCommitDeleteKeyUoW

VOID __stdcall CmpLightWeightCommitDeleteKeyUoW(_CM_KCB_UOW *UoW, _LARGE_INTEGER *CommitTime){
  __int64 v2; 
  UINT64 *PrepareDataPointer; 
  __int64 v4; 
  _CM_KEY_CONTROL_BLOCK *KeyControlBlock; 
  UINT64 KeyHive; 
  int v9; 
  _CM_KEY_CONTROL_BLOCK *ParentKcb; 
  __int64 v11; 
  LONGLONG QuadPart; 
  __int64 v13; 
  _CM_UOW_SET_VALUE_KEY_DATA *ValueData; 
  _CM_KEY_CONTROL_BLOCK *v15; 
  int v16; 
  int v17[2]; 
  __int64 v18; 
  _EVENT_DATA_DESCRIPTOR v19; 
  int *v20; 
  int v21; 
  int v22; 
  __int64 *v23; 
  int v24; 
  int v25; 

  v17[0] = -1;
  PrepareDataPointer = (UINT64 *)UoW->PrepareDataPointer;
  v4 = v2;
  v17[1] = 0;
  KeyControlBlock = UoW->KeyControlBlock;
  KeyHive = (UINT64)KeyControlBlock->KeyHash.KeyHive;
  if( (int)CmpFreeKeyByCell(KeyHive, KeyControlBlock->KeyHash.KeyCell, 0) < 0
    && *(&stru_140C00F40 + 1148) > 5u
    && tlgKeywordOn((__int64)&stru_140C00F40 + 4592, 0x200000000000i64) )
  {
    v22 = 0;
    v25 = 0;
    v20 = &v16;
    v16 = v9;
    v23 = &v18;
    v21 = 4;
    v18 = 0x1000000i64;
    v24 = 8;
    tlgWriteTransfer_EtwWriteTransfer(
      (__int64)&stru_140C00F40 + 4592,
      (unsigned __int8 *)byte_140022E69,
      0i64,
      0i64,
      4u,
      &v19);
  }
  ParentKcb = UoW->KeyControlBlock->ParentKcb;
  if( *(_DWORD *)PrepareDataPointer == 1 )
    CmpLightWeightSwapParentSubKeyList(KeyHive, ParentKcb->KeyHash.KeyCell, (INT64)PrepareDataPointer);
  CmpCleanUpSubKeyInfo((INT64)ParentKcb, 1);
  v11 = (*(__int64(__fastcall **)(UINT64, _QWORD, int *))(KeyHive + 8))(KeyHive, ParentKcb->KeyHash.KeyCell, v17);
  ParentKcb->KcbMaxNameLen = *(_WORD *)(v11 + 52);
  *(_LARGE_INTEGER *)(v11 + 4) = *CommitTime;
  QuadPart = CommitTime->QuadPart;
  ++ParentKcb->SequenceNumber;
  ParentKcb->KcbLastWriteTime.QuadPart = QuadPart;
  (*(void(__fastcall **)(UINT64, int *))(KeyHive + 16))(KeyHive, v17);
  CmpFlushNotifiesOnAllUnbackedHigherLayerKcbs((__int64)UoW->KeyControlBlock, v13, v4, 1);
  CmpFlushNotifiesOnKeyBodyList((__int64)UoW->KeyControlBlock, 8i64, v4, 1);
  CmpMarkKeyUnbacked((__int64)UoW->KeyControlBlock, v4);
  ValueData = UoW->ValueData;
  v15 = UoW->KeyControlBlock;
  if( ValueData )
  {
    CmpCommitDiscardAndReplaceKcbAndUnbackedHigherLayers(v15, (_CMP_DISCARD_AND_REPLACE_KCB_CONTEXT *)ValueData);
    CmpCleanupDiscardReplaceContext(UoW->DiscardReplaceContext);
    CmSiFreeMemory((PPRIVILEGE_SET)UoW->ValueData);
    UoW->ValueData = 0i64;
  }
  else
  {
    CmpDiscardKcb((UINT64)v15, v4);
  }
  CmpLightWeightCleanupModifyKeyDataUoW(KeyHive, PrepareDataPointer);
  UoW->PrepareDataPointer = 0i64;
}

Referenced by:

CmpProcessLightWeightUOW