PipProcessStartPhase1

NTSTATUS __stdcall PipProcessStartPhase1(PVOID DeviceNode, LOGICAL Synchronous, LOGICAL OperationsPending){
  NTSTATUS started; 
  INT64 v8; 
  NTSTATUS v9; 
  void *v10; 
  __int64 v11; 
  PNP_VETO_TYPE VetoType; 

  VetoType = PNP_VetoTypeUnknown;
  if( (byte_140C130BB & 0x10) != 0 )
    McTemplateK0dz_EtwWriteTransfer(
      (__int64)DeviceNode,
      (const _EVENT_DESCRIPTOR *)KMPnPEvt_ProcessDeviceStart_Start,
      *(__int64 *)&OperationsPending,
      1,
      *((const wchar_t **)DeviceNode + 6));
  if( OperationsPending && (*((_DWORD *)DeviceNode + 99) & 0x400000) != 0 )
  {
    started = -1073741267;
  }
  else
  {
    IopUncacheInterfaceInformation(*((PDEVICE_OBJECT *)DeviceNode + 4), 1u);
    if( !*((_DWORD *)DeviceNode + 142)
      || (PpProfileBeginHardwareProfileTransition(0),
          PpProfileIncludeInHardwareProfileTransition((_DEVICE_NODE *)DeviceNode, DOCK_ARRIVING),
          started = PpProfileQueryHardwareProfileChange(0, PROFILE_PERHAPS_IN_PNPEVENT, &VetoType, 0i64),
          started >= 0) )
    {
      if( PipHalIommuSecurityEnabled )
      {
        v8 = *((_QWORD *)DeviceNode + 90);
        if( v8 )
        {
          v9 = PiIommuUnblockDevice(v8);
          v10 = (void *)v9;
          if( v9 < 0 )
          {
            IoAddTriageDumpDataBlock(DeviceNode, (_BYTE *)0x310);
            if( *((_WORD *)DeviceNode + 20) )
            {
              IoAddTriageDumpDataBlock((char *)DeviceNode + 40, (_BYTE *)2);
              IoAddTriageDumpDataBlock(*((VOID **)DeviceNode + 6), (_BYTE *)*((unsigned __int16 *)DeviceNode + 20));
            }
            if( *((_WORD *)DeviceNode + 28) )
            {
              IoAddTriageDumpDataBlock((char *)DeviceNode + 56, (_BYTE *)2);
              IoAddTriageDumpDataBlock(*((VOID **)DeviceNode + 8), (_BYTE *)*((unsigned __int16 *)DeviceNode + 28));
            }
            v11 = *((_QWORD *)DeviceNode + 2);
            if( v11 && *(_WORD *)(v11 + 56) )
            {
              IoAddTriageDumpDataBlock((VOID *)(v11 + 56), (_BYTE *)2);
              IoAddTriageDumpDataBlock(
                *(VOID **)(*((_QWORD *)DeviceNode + 2) + 64i64),
                (_BYTE *)*(unsigned __int16 *)(*((_QWORD *)DeviceNode + 2) + 56i64));
            }
            KeBugCheckEx(0xCAu, (PVOID)0x13, (PVOID)0x1000, v10, DeviceNode);
          }
        }
      }
      started = PnpStartDeviceNode((_DEVICE_NODE *)DeviceNode, 0, Synchronous);
    }
  }
  if( (byte_140C130BB & 0x10) != 0 )
    McTemplateK0dz_EtwWriteTransfer(
      (__int64)DeviceNode,
      (const _EVENT_DESCRIPTOR *)KMPnPEvt_ProcessDeviceStart_Stop,
      *(__int64 *)&OperationsPending,
      1,
      *((const wchar_t **)DeviceNode + 6));
  return started;
}

Referenced by:

PipProcessDevNodeTree