KdCallPowerHandlers

NTSTATUS __stdcall KdCallPowerHandlers(_DEVICE_POWER_STATE PowerState){
  unsigned __int8 CurrentIrql; 
  __int64 v4; 
  NTSTATUS v5; 
  if( !KdpPowerListHead )
    return 0;
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(0xFui64);
  KxAcquireSpinLock(&KdpPowerSpinLock);
  v4 = KdpPowerListHead;
  v5 = 0;
  while( (__int64 *)v4 != &KdpPowerListHead )
  {
    v5 = (*(__int64(__fastcall **)(_QWORD, _QWORD))(v4 + 16))((unsigned int)PowerState, *(_QWORD *)(v4 + 24));
    if( v5 < 0 )
      break;
    v4 = *(_QWORD *)v4;
  }
  KxReleaseSpinLock(&KdpPowerSpinLock);
  __writecr8(CurrentIrql);
  return v5;
}

Referenced by:

PopFxDebuggerPowerCriticalTransitionCallback
PpmExitCoordinatedIdle
PpmIdleExecuteTransition