HalpWdatArmTimer
NTSTATUS __stdcall HalpWdatArmTimer(PVOID TimerData, _TIMER_MODE Mode, UINT64 TickCount, INT64 a4){
NTSTATUS result;
__int64 v7;
_WD_INSTRUCTION *v8;
UINT64 v9;
UINT64 v10;
unsigned __int64 v11;
unsigned __int64 v12;
_WD_INSTRUCTION *v13;
if( Mode != TimerModeOneShot )
return -1073741811;
if( *((_BYTE *)TimerData + 40) )
{
v7 = *((_QWORD *)TimerData + 4);
if( v7 )
{
if( TickCount == v7 )
{
v8 = (_WD_INSTRUCTION *)((char *)TimerData + 48);
return WdInstrExecuteAction(v8);
}
}
}
*((_QWORD *)TimerData + 4) = TickCount;
v9 = TickCount / 0x37E;
v10 = v9 + 1;
v11 = *((unsigned int *)TimerData + 6);
if( TickCount == 894 * v9 )
v10 = v9;
v12 = v10 / v11;
if( v10 % v11 )
++v12;
v13 = (_WD_INSTRUCTION *)((char *)TimerData + 48);
if( v12 > *((unsigned int *)TimerData + 4) )
{
WdInstrExecuteAction(v13);
return -1073741811;
}
result = WdInstrExecuteAction(v13);
if( result >= 0 )
{
if( !*((_BYTE *)TimerData + 40) )
{
result = WdInstrExecuteAction((_WD_INSTRUCTION *)((char *)TimerData + 48));
if( result < 0 )
return result;
*((_BYTE *)TimerData + 40) = 1;
}
v8 = (_WD_INSTRUCTION *)((char *)TimerData + 48);
return WdInstrExecuteAction(v8);
}
return result;
}Referenced by:
No references.