CmpMarkKeyValuesDirty

char __fastcall CmpMarkKeyValuesDirty(PVOID Hive, void *a2, __int64 a3){
  bool v3; 
  char v6; 
  void *v8; 
  void *v9; 
  __int64 v10; 
  __int64 v11; 
  __int64 v12; 
  __int64 v13; 
  __int64 v14; 
  int v15[4]; 
  int v16; 
  int v17; 
  int v18; 
  int v19; 

  v3 = (*(_BYTE *)(a3 + 2) & 2) == 0;
  v15[0] = -1;
  v15[1] = 0;
  v6 = 1;
  v16 = -1;
  v17 = 0;
  v18 = -1;
  v19 = 0;
  if( !v3 )
    return v6;
  if( HvpMarkCellDirty(Hive, a2, 0, CmHiveDirtyNormal) )
  {
    v8 = (void *)*(unsigned int *)(a3 + 48);
    if( (_DWORD)v8 == -1 || HvpMarkCellDirty(Hive, v8, 0, CmHiveDirtyNormal) )
    {
      v9 = (void *)*(unsigned int *)(a3 + 44);
      if( (_DWORD)v9 == -1 )
        goto LABEL_14;
      if( HvpMarkCellDirty(Hive, v9, 0, CmHiveDirtyNormal) )
      {
        v10 = (*((__int64(__fastcall **)(PVOID, _QWORD, int *))Hive + 1))(Hive, *(unsigned int *)(a3 + 44), &v16);
        v11 = v10;
        if( v10 )
        {
          v6 = HvpMarkCellDirty(Hive, (PVOID)*(unsigned int *)(v10 + 4), 0, CmHiveDirtyNormal)
            && HvpMarkCellDirty(Hive, (PVOID)*(unsigned int *)(v11 + 8), 0, CmHiveDirtyNormal);
          (*((void(__fastcall **)(PVOID, int *))Hive + 2))(Hive, &v16);
          if( !v6 )
            return v6;
LABEL_14:
          if( *(_DWORD *)(a3 + 36) )
          {
            if( HvpMarkCellDirty(Hive, (PVOID)*(unsigned int *)(a3 + 40), 0, CmHiveDirtyNormal)
              && (v12 = (*((__int64(__fastcall **)(PVOID, _QWORD, int *))Hive + 1))(
                          Hive,
                          *(unsigned int *)(a3 + 40),
                          v15)) != 0 )
            {
              v13 = 0i64;
              if( *(_DWORD *)(a3 + 36) )
              {
                while( HvpMarkCellDirty(Hive, (PVOID)*(unsigned int *)(v12 + 4 * v13), 0, CmHiveDirtyNormal) )
                {
                  v14 = (*((__int64(__fastcall **)(PVOID, _QWORD, int *))Hive + 1))(
                          Hive,
                          *(unsigned int *)(v12 + 4 * v13),
                          &v18);
                  if( !v14 )
                    break;
                  v6 = CmpMarkValueDataDirty(Hive, v14);
                  (*((void(__fastcall **)(PVOID, int *))Hive + 2))(Hive, &v18);
                  if( v6 )
                  {
                    v13 = (unsigned int)(v13 + 1);
                    if( (unsigned int)v13 < *(_DWORD *)(a3 + 36) )
                      continue;
                  }
                  goto LABEL_25;
                }
                v6 = 0;
              }
LABEL_25:
              (*((void(__fastcall **)(PVOID, int *))Hive + 2))(Hive, v15);
            }
            else
            {
              return 0;
            }
          }
          return v6;
        }
      }
    }
  }
  return 0;
}

Referenced by:

CmpFreeKeyValues