CmpFreeValueData

CHAR __fastcall CmpFreeValueData(UINT64 a1, INT64 a2, UINT64 a3){
  int v4; 
  ULONG_PTR v5; 
  __int64(__fastcall *v7)(UINT64, INT64, int *); 
  __int64 v8; 
  unsigned __int16 v9; 
  __int64 v10; 
  __int64 v11; 
  __int64 v12; 
  ULONG_PTR v13; 
  int v14[10]; 
  int v15; 
  int v16; 

  v4 = a3 + 0x80000000;
  v5 = a2;
  if( (unsigned int)a3 < 0x80000000 )
    v4 = a3;
  if( (unsigned int)a3 >= 0x80000000 || (_DWORD)a2 == -1 )
    return 1;
  if( *(_DWORD *)(a1 + 212) < 4u || (unsigned int)(v4 - 16345) > 0x7FFFC026 )
  {
LABEL_7:
    HvFreeCell(a1, v5);
    return 1;
  }
  v15 = -1;
  v16 = 0;
  v14[1] = 0;
  v7 = *(__int64(__fastcall **)(UINT64, INT64, int *))(a1 + 8);
  v14[0] = -1;
  v8 = v7(a1, a2, &v15);
  v9 = 0;
  v10 = v8;
  if( v8 )
  {
    v11 = *(unsigned int *)(v8 + 4);
    if( (_DWORD)v11 == -1 )
    {
LABEL_17:
      (*(void(__fastcall **)(UINT64, int *))(a1 + 16))(a1, &v15);
      goto LABEL_7;
    }
    v12 = (*(__int64(__fastcall **)(UINT64, __int64, int *))(a1 + 8))(a1, v11, v14);
    if( v12 )
    {
      while( v9 < *(_WORD *)(v10 + 2) )
      {
        v13 = *(_DWORD *)(v12 + 4i64 * v9);
        if( v13 != -1 )
          HvFreeCell(a1, v13);
        ++v9;
      }
      (*(void(__fastcall **)(UINT64, int *))(a1 + 16))(a1, v14);
      HvFreeCell(a1, *(_DWORD *)(v10 + 4));
      goto LABEL_17;
    }
    (*(void(__fastcall **)(UINT64, int *))(a1 + 16))(a1, &v15);
  }
  return 0;
}

Referenced by:

CmDeleteValueKey
CmpCopyValue
CmpFreeValue
CmpSetValueKeyExisting