HvlLpReadMultipleMsr
INT64 __stdcall HvlLpReadMultipleMsr(UINT64 LpIndex, UINT64 Count, UINT64 *MsrIndices, UINT64 *MsrValues){
unsigned int v4;
int v7;
__int64 v8;
LONGLONG *v9;
__int64 v10;
_DWORD *v11;
int v12;
__int16 v13;
unsigned int v14;
UINT64 v15;
LONGLONG *v17;
__int128 v18[2];
__int128 v19[2];
v4 = Count;
v7 = LpIndex;
memset(v19, 0, sizeof(v19));
memset(v18, 0, sizeof(v18));
if( (unsigned int)(16 * Count) > 0x1000 )
return 3221225485i64;
v8 = (unsigned int)Count;
v17 = HvlpAcquireHypercallPage((PHYSICAL_ADDRESS *)v19, 1, 0i64, 16i64 * (unsigned int)Count);
v9 = HvlpAcquireHypercallPage((PHYSICAL_ADDRESS *)v18, 2, 0i64, 16i64 * v4);
if( v4 )
{
v10 = v4;
v11 = v17 + 1;
do
{
*(v11 - 2) = v7;
*(v11 - 1) = 65537;
v12 = *(_DWORD *)MsrIndices;
MsrIndices = (UINT64 *)((char *)MsrIndices + 4);
*v11 = v12;
v11 += 4;
--v10;
}
while( v10 );
}
HvcallInitiateHypercall();
v14 = v13 != 0 ? 0xC0000001 : 0;
if( v4 )
{
do
{
v15 = *v9;
v9 += 2;
*MsrValues++ = v15;
--v8;
}
while( v8 );
}
HvlpReleaseHypercallPage((unsigned int *)v18);
HvlpReleaseHypercallPage((unsigned int *)v19);
return v14;
}Referenced by:
No references.