CmpCloneKCBValueListForTrans

INT64 __fastcall CmpCloneKCBValueListForTrans(
        _CM_KEY_CONTROL_BLOCK *KeyControlBlock,
        _CM_TRANS *CmTrans,
        UINT8 *ValueListDuplicated){
  INT64 result; 
  unsigned int v4; 
  INT64 v8; 
  unsigned int v9; 
  _HHIVE *KeyHive; 
  int v11; 
  int v12; 

  v11 = -1;
  result = 0i64;
  v4 = 0;
  v12 = 0;
  *ValueListDuplicated = 0;
  if( KeyControlBlock->TransValueListOwner )
    goto LABEL_2;
  result = (INT64)KeyControlBlock->KeyHash.KeyHive->GetCellRoutine(
                    KeyControlBlock->KeyHash.KeyHive,
                    KeyControlBlock->KeyHash.KeyCell,
                    &v11);
  v8 = result;
  if( result )
  {
    if( !*(_DWORD *)(result + 36) )
    {
      KeyControlBlock->TransValueCache.List = -1;
      goto LABEL_7;
    }
    v9 = HvDuplicateCell(KeyControlBlock->KeyHash.KeyHive, *(unsigned int *)(result + 40), 1, 1u);
    KeyControlBlock->TransValueCache.List = v9;
    if( v9 != -1 )
    {
      v4 = *(_DWORD *)(v8 + 36);
LABEL_7:
      KeyControlBlock->TransValueCache.Count = v4;
      KeyControlBlock->TransValueListOwner = CmTrans;
      KeyHive = KeyControlBlock->KeyHash.KeyHive;
      *ValueListDuplicated = 1;
      result = ((__int64(__fastcall *)(_HHIVE *, int *))KeyHive->ReleaseCellRoutine)(KeyHive, &v11);
LABEL_2:
      LOBYTE(result) = 1;
      return result;
    }
    result = ((__int64(__fastcall *)(_HHIVE *, int *))KeyControlBlock->KeyHash.KeyHive->ReleaseCellRoutine)(
               KeyControlBlock->KeyHash.KeyHive,
               &v11);
  }
  LOBYTE(result) = 0;
  return result;
}

Referenced by:

CmDeleteValueKey
CmSetValueKey