HalpEnableSecondaryInterrupt
NTSTATUS __stdcall HalpEnableSecondaryInterrupt(_INTERRUPT_CONNECTION_DATA *ConnectionData){
NTSTATUS v2;
unsigned int Gsiv;
_LIST_ENTRY *SecondaryIcEntry;
INT64 v5;
_LIST_ENTRY *Blink;
__int64 v7;
__int64 v8;
if( !byte_140C50754 )
return -1073741637;
if( !(unsigned __int8)HalpCheckInterruptType(ConnectionData) )
return -1073741811;
Gsiv = ConnectionData->Vectors[0].ControllerInput.Gsiv;
SecondaryIcEntry = HalpFindSecondaryIcEntry(Gsiv);
v5 = (INT64)SecondaryIcEntry;
if( !SecondaryIcEntry )
return -1073700575;
Blink = SecondaryIcEntry[3].Blink;
v7 = Gsiv - LODWORD(SecondaryIcEntry[1].Flink) + 10i64;
v8 = Gsiv - LODWORD(SecondaryIcEntry[1].Flink);
HIDWORD(SecondaryIcEntry[v8 + 10].Flink) = ConnectionData->Vectors[0].Mode;
LODWORD(SecondaryIcEntry[v7].Flink) = ConnectionData->Vectors[0].Polarity;
LODWORD(SecondaryIcEntry[v8 + 10].Blink) = ConnectionData->Vectors[0].Vector;
BYTE4(SecondaryIcEntry[v8 + 10].Blink) = 1;
v2 = ((__int64(__fastcall *)(_LIST_ENTRY *, _QWORD, _QWORD, _QWORD, _LIST_ENTRY *))Blink)(
SecondaryIcEntry[2].Flink,
Gsiv,
(unsigned int)ConnectionData->Vectors[0].Mode,
(unsigned int)ConnectionData->Vectors[0].Polarity,
SecondaryIcEntry);
if( v2 < 0 )
{
*(_DWORD *)(v5 + 4 * v8 + 168) |= 0x80000000;
*(_BYTE *)(v5 + 4 * v8 + 172) = 0;
}
HalpReleaseSecondaryIcEntryShared(v5, 1);
return v2;
}Referenced by:
HalEnableInterrupt