HvpViewMapGetLastView

UINT64 __fastcall HvpViewMapGetLastView(INT64 a1){
  UINT64 result; 
  INT64 v2; 
  signed __int64 v3; 
  int v4; 
  UINT64 v5; 
  result = *(_QWORD *)(a1 + 8);
  if( result )
  {
    v2 = a1 + 40;
    v3 = result - 1;
    result = *(_QWORD *)v2;
    if( (*(_BYTE *)(v2 + 8) & 1) != 0 && result )
      result ^= v2;
    v4 = *(_BYTE *)(v2 + 8) & 1;
    while( result )
    {
      if( v3 >= *(_QWORD *)(result + 40) )
      {
        if( v3 < *(_QWORD *)(result + 48) )
          return result;
        v5 = *(_QWORD *)(result + 8);
      }
      else
      {
        v5 = *(_QWORD *)result;
      }
      if( v4 && v5 )
        result ^= v5;
      else
        result = v5;
    }
  }
  return result;
}

Referenced by:

HvpViewMapExtendStorage