PoAllProcessorsDeepIdle

INT64 __fastcall PoAllProcessorsDeepIdle(){
  struct _KPRCB *CurrentPrcb; 
  __int64 v1; 
  unsigned int v2; 
  INT64 result; 
  __int64 v4; 
  __int64 v5; 
  UINT64 LookupIndex; 
  CurrentPrcb = KeGetCurrentPrcb();
  LODWORD(LookupIndex) = 0;
  v1 = *((_QWORD *)CurrentPrcb + 24);
  v2 = *(unsigned __int16 *)(v1 + 146);
  result = *((unsigned __int8 *)CurrentPrcb + 209);
  if( (*(_QWORD *)(v1 + 64) & ~(1i64 << result)) == (*(_QWORD *)(v1 + 136) & ~(1i64 << (KiProcessorIndexToNumberMappingTable[*((unsigned int *)CurrentPrcb + 9)] & 0x3F))) )
  {
    while( 1 )
    {
      result = MmGetNextNode(v2, &LookupIndex);
      if( (_DWORD)result == -1 )
        break;
      v5 = *(_QWORD *)(v4 + 8i64 * (unsigned int)result + 13771648);
      result = *(_QWORD *)(v5 + 136);
      if( *(_QWORD *)(v5 + 64) != result )
        goto LABEL_4;
    }
    LOBYTE(result) = 1;
  }
  else
  {
LABEL_4:
    LOBYTE(result) = 0;
  }
  return result;
}

Referenced by:

KePrepareClockTimerForIdle