HvlpReleaseHypercallPage

PSLIST_ENTRY __fastcall HvlpReleaseHypercallPage(unsigned int *a1){
  PSLIST_ENTRY result; 
  __int64 v2; 
  struct _SLIST_ENTRY *v3; 
  unsigned __int64 v4; 
  struct _KPRCB *CurrentPrcb; 
  unsigned int v6; 
  result = (PSLIST_ENTRY)*a1;
  v2 = 0i64;
  if( ((unsigned __int8)result & 1) != 0 )
  {
    v3 = (struct _SLIST_ENTRY *)*((_QWORD *)a1 + 2);
    v3[1].Next = (_SLIST_ENTRY *)*((_QWORD *)a1 + 3);
    return RtlpInterlockedPushEntrySList((PSLIST_HEADER)(*((_QWORD *)a1 + 1) + 33600i64), v3);
  }
  else if( ((unsigned __int8)result & 2) != 0 )
  {
    v4 = *((unsigned __int8 *)a1 + 8);
    if( (unsigned __int8)v4 < 2u )
    {
      result = (PSLIST_ENTRY)(unsigned int)KiIrqlFlags;
      __writecr8(v4);
    }
  }
  else
  {
    CurrentPrcb = KeGetCurrentPrcb();
    v6 = a1[3];
    if( (v6 & 1) != 0 )
    {
      v2 = *((_QWORD *)CurrentPrcb + 4208);
    }
    else if( (v6 & 2) != 0 )
    {
      v2 = *((_QWORD *)CurrentPrcb + 4208) + 4096i64;
    }
    result = (PSLIST_ENTRY)*((_QWORD *)a1 + 3);
    *(_QWORD *)(v2 + 16) = result;
    if( *((_BYTE *)a1 + 8) )
      _enable();
  }
  return result;
}

Referenced by:

HvlCollectLivedump
HvlDmaGetDmaGuardEnabled
HvlDmaMapDeviceLogicalRange
HvlDmaMapDeviceSparsePages
HvlDmaUnmapDeviceSparsePages
HvlEnterSleepState
HvlGetCoverageData
HvlGetCoverageInfo
HvlGetSparseGpaPagesAccessState
HvlHvDebuggerPowerHandler
HvlLpReadCpuid
HvlLpReadMultipleMsr
HvlLpWriteMultipleMsr
HvlLpWritebackInvalidate
HvlMapDeviceInterrupt
HvlMapGpaPages
HvlMapSparseGpaPages
HvlNotifyAcpiReenabled
HvlNotifyAllProcessorsStarted
HvlNotifyDebugDeviceAvailable
HvlNotifyHpetEnabled
HvlNotifyRootCrashdump
HvlPrepareForHibernate
HvlPrepareForSecureHibernate
HvlQueryAssociatedProcessors
HvlQueryHypervisorTscAdjustment
HvlQueryNumaDistance
HvlRegisterDeviceId
HvlResetCoverageVector
HvlRetargetDeviceInterrupt
HvlSetHpetConfig
HvlSetPartitionProperty
HvlSetQpcBias
HvlSetSystemMachineCheckProperty
HvlSetSystemSleepProperty
HvlSetupPhysicalFaultNotificationQueue
HvlStartBootLogicalProcessors
HvlSvmGetDeviceCapabilities
HvlUnmapDeviceInterrupt
HvlpAddPhysicalMemory
HvlpCheckTscSync
HvlpConfigureLegacyPowerPolicySetting
HvlpCreateRootVirtualProcessor
HvlpDepositPages
HvlpDetermineEnlightenments
HvlpGetLogicalProcessorProperty
HvlpGetVpIndexFromApicId
HvlpInvokeGetPageListHypercall
HvlpLogGuestStateScrubbingStatus
HvlpLogIommuInitStatus
HvlpLpCpuid
HvlpMapStatisticsPage
HvlpQueryExtendedCapabilities
HvlpQueryHypervisorSchedulerType
HvlpSetLogicalProcessorProperty
HvlpSetPowerProperty
HvlpSetupSchedulerAssist
HvlpSlowAcknowledgePageRequest
HvlpSlowFlushAddressSpaceTb
HvlpSlowFlushAddressSpaceTbEx
HvlpSlowFlushListTb
HvlpSlowFlushListTbEx
HvlpSlowFlushPasidAddressList
HvlpSlowSendSyntheticClusterIpiEx
HvlpStartLogicalProcessor
HvlpStartVirtualProcessor