PnpInitializeDeviceEvents
INT64 __fastcall PnpInitializeDeviceEvents(){
unsigned int v0;
char *PoolWithTag;
__int64 v2;
v0 = 0;
PoolWithTag = (char *)ExAllocatePoolWithTag(NonPagedPoolNx, 0x88ui64, 0x4A706E50ui64);
PnpDeviceEventList = (__int64)PoolWithTag;
if( PoolWithTag )
{
KiInitializeMutant((_KMUTANT *)(PoolWithTag + 8), 0, 1u);
v2 = PnpDeviceEventList;
*(_DWORD *)(PnpDeviceEventList + 64) = 1;
*(_QWORD *)(v2 + 72) = 0i64;
*(_DWORD *)(v2 + 80) = 0;
*(_QWORD *)(v2 + 104) = v2 + 96;
*(_QWORD *)(v2 + 96) = v2 + 96;
*(_WORD *)(v2 + 88) = 1;
*(_BYTE *)(v2 + 90) = 6;
*(_DWORD *)(v2 + 92) = 0;
*(_QWORD *)(v2 + 128) = v2 + 120;
*(_QWORD *)(v2 + 120) = v2 + 120;
*(_DWORD *)v2 = 259;
PnpNotificationInProgressLock.Event.Header.WaitListHead.Blink = &PnpNotificationInProgressLock.Event.Header.WaitListHead;
PnpNotificationInProgressLock.Event.Header.WaitListHead.Flink = &PnpNotificationInProgressLock.Event.Header.WaitListHead;
PnpEventQueueEmpty.Header.WaitListHead.Blink = &PnpEventQueueEmpty.Header.WaitListHead;
PnpEventQueueEmpty.Header.WaitListHead.Flink = &PnpEventQueueEmpty.Header.WaitListHead;
PnpNotificationInProgressLock.Count = 1;
PnpNotificationInProgressLock.Owner = 0i64;
PnpNotificationInProgressLock.Contention = 0;
LOWORD(PnpNotificationInProgressLock.Event.Header.Lock) = 1;
PnpNotificationInProgressLock.Event.Header.Size = 6;
PnpNotificationInProgressLock.Event.Header.SignalState = 0;
LOWORD(PnpEventQueueEmpty.Header.Lock) = 0;
PnpEventQueueEmpty.Header.Size = 6;
PnpEventQueueEmpty.Header.SignalState = 1;
}
else
{
return(unsigned int)-1073741670;
}
return v0;
}Referenced by:
IopInitializePlugPlayServices