HvlLpWriteMultipleMsr

NTSTATUS __stdcall HvlLpWriteMultipleMsr(UINT64 LpIndex, UINT64 Count, UINT64 *MsrIndices, UINT64 *MsrValues){
  int v5; 
  UINT64 v6; 
  __int64 v8; 
  int v9; 
  char *v11; 
  _DWORD *v12; 
  int v13; 
  __int64 v14; 
  __int16 v15; 
  NTSTATUS v16; 
  __int128 PageInfo[3]; 

  v5 = Count;
  v6 = 32i64 * (unsigned int)Count;
  v8 = (unsigned int)Count;
  v9 = LpIndex;
  memset(PageInfo, 0, 32);
  if( v6 > 0x1000 )
    return -1073741811;
  v11 = (char *)HvlpAcquireHypercallPage((PHYSICAL_ADDRESS *)PageInfo, 1ui64, 0i64, v6);
  if( v5 )
  {
    v12 = v11 + 8;
    do
    {
      *(v12 - 2) = v9;
      *(v12 - 1) = 65537;
      v13 = *(_DWORD *)MsrIndices;
      MsrIndices = (UINT64 *)((char *)MsrIndices + 4);
      *v12 = v13;
      v12 += 8;
      v14 = *MsrValues++;
      *((_QWORD *)v12 - 3) = v14;
      --v8;
    }
    while( v8 );
  }
  HvcallInitiateHypercall();
  v16 = v15 != 0 ? 0xC0000001 : 0;
  HvlpReleaseHypercallPage((_HVLP_HYPERCALL_PAGE_INFO *)PageInfo);
  return v16;
}

Referenced by:

No references.