PfPowerActionNotify
VOID __fastcall PfPowerActionNotify(INT64 a1, INT64 a2, INT64 a3){
unsigned int v3;
int v4;
int v5;
int v6;
NTSTATUS v7;
int v8;
unsigned int v9;
int v10;
int v11;
v11 = 0;
v3 = 1;
v4 = a3;
v10 = 2 * a1;
if( (a2 & 1) != 0 )
v10 = (2 * a1) | 1;
if( !(_DWORD)a1 )
{
if( (unsigned int)(a3 - 2) > 2 )
{
if( (_DWORD)a3 != 5 )
return;
v3 = (a2 & 4) != 0 ? 5 : 2;
}
PfpScenCtxScenarioSet((INT64)&qword_140C50020, 0i64, v3, 0i64);
return;
}
v5 = a1 - 1;
if( v5 )
{
v6 = v5 - 1;
if( v6 )
{
if( v6 == 5 && (unsigned int)(a3 - 2) <= 2 )
PfpLogScenarioEvent();
LABEL_7:
v11 = ((KUSER_SHARED_DATA.TickCountMultiplier * KUSER_SHARED_DATA.TickCount.High1Time) << 8)
+ ((KUSER_SHARED_DATA.TickCount.LowPart * (unsigned __int64)KUSER_SHARED_DATA.TickCountMultiplier) >> 24);
LABEL_8:
PfLogEvent(
28i64,
dword_140C5001C
+ (unsigned int)((((KUSER_SHARED_DATA.TickCountMultiplier
* (unsigned __int64)KUSER_SHARED_DATA.ReservedTickCountOverlay[1]) << 8)
+ ((KUSER_SHARED_DATA.TickCountMultiplier * (unsigned __int64)KUSER_SHARED_DATA.TickCount.LowPart) >> 24)) >> 10),
&v10,
8ui64);
return;
}
PfpPowerActionStartScenarioTracing((__int64)&qword_140C50020, a2);
if( dword_140C50050 == 5 )
PfSnBeginBootPhase(4ui64);
PfpScenCtxScenarioSet((INT64)&qword_140C50020, 1i64, 0i64, 0i64);
PfpScenCtxScenarioSet((INT64)&qword_140C50020, 2i64, 0i64, 0i64);
PfpScenCtxScenarioSet((INT64)&qword_140C50020, 5i64, 0i64, 0i64);
if( (int)PfpStartLoggingHardFaultEvents() >= 0 )
goto LABEL_7;
}
else if( (unsigned int)(a3 - 2) <= 3 )
{
MmPerformMemoryListCommand();
v7 = PfTSetTraceWorkerPriority(16i64);
PfGenerateTrace((INT64)&Thread, 1i64);
if( v7 <= 31 )
PfTSetTraceWorkerPriority((unsigned int)v7);
v8 = 5;
if( v4 == 5 )
{
v9 = HIDWORD(qword_140C4FE54);
if( dword_140C50050 == 5 )
v9 = dword_140C4FE5C;
if( dword_140C50050 != 5 )
v8 = 2;
}
else
{
v9 = qword_140C4FE54;
v8 = 1;
}
v11 = PfpScenCtxPrefetchWait((ULONG_PTR)&qword_140C50020, v8, v9);
PfpServiceMainThreadUnboost(0i64);
goto LABEL_8;
}
}Referenced by:
PfpProcessScenarioPhase
PopDispatchSuperfetchNotification
PopIssueActionRequest
PopTransitionSystemPowerStateEx
PopUmpoProcessPowerMessage
PopUmpoSendLegacyEvent