PnpSetInvalidIDEvent

INT64 __stdcall PnpSetInvalidIDEvent(PUNICODE_STRING ParentInstance){
  int v3; 
  _DWORD *DeviceEventEntry; 
  __int64 v5; 
  if( PnpShutdownEvent.Header.SignalState )
    return 3221225865i64;
  v3 = ParentInstance->Length + 82;
  DeviceEventEntry = PnpCreateDeviceEventEntry((unsigned int)ParentInstance->Length + 194);
  v5 = (__int64)DeviceEventEntry;
  if( !DeviceEventEntry )
    return 3221225626i64;
  DeviceEventEntry[32] = 8;
  DeviceEventEntry[37] = v3;
  *((GUID *)DeviceEventEntry + 7) = GUID_DEVICE_INVALID_ID;
  memmove((UINT8 *)DeviceEventEntry + 160, (UINT8 *)ParentInstance->Buffer, ParentInstance->Length);
  *(_WORD *)(v5 + 2 * ((unsigned __int64)ParentInstance->Length >> 1) + 160) = 0;
  *(_WORD *)(v5 + 2 * ((unsigned __int64)ParentInstance->Length >> 1) + 162) = 0;
  return PnpInsertEventInQueue(v5);
}

Referenced by:

PiProcessNewDeviceNode
PnpQueryID