HalpDynamicDeviceInterfaceNotification

NTSTATUS __stdcall HalpDynamicDeviceInterfaceNotification(PVOID Notification, PVOID Context){
  int v2; 
  __int64 v3; 
  _ADAPTER_OBJECT *v4; 
  __int64 v5; 
  PDEVICE_OBJECT v6; 
  PDEVICE_OBJECT DeviceObject; 
  PFILE_OBJECT FileObject; 

  DeviceObject = 0i64;
  v2 = (int)Context;
  FileObject = 0i64;
  v3 = *(_QWORD *)((char *)Notification + 4) - *(_QWORD *)&GUID_DEVICE_INTERFACE_REMOVAL.Data1;
  if( !v3 )
    v3 = *(_QWORD *)((char *)Notification + 12) - *(_QWORD *)GUID_DEVICE_INTERFACE_REMOVAL.Data4;
  if( v3 )
  {
    if( IoGetDeviceObjectPointer(*((_UNICODE_STRING **)Notification + 5), 0x100003ui64, &FileObject, &DeviceObject) >= 0 )
    {
      KeWaitForSingleObject((UINT64)&unk_140C49EA0, 7, 0, 0, 0i64);
      v5 = v2;
      v6 = DeviceObject;
      *((_QWORD *)&stru_140CF2E80 + v5 + 921) = DeviceObject;
      KeSetEvent((PRKEVENT)&unk_140C49EA0, 0, 0);
      ObfReferenceObject(v6);
      HalPutDmaAdapter((PADAPTER_OBJECT)FileObject);
    }
  }
  else
  {
    KeWaitForSingleObject((UINT64)&unk_140C49EA0, 7, 0, 0, 0i64);
    v4 = (_ADAPTER_OBJECT *)*((_QWORD *)&stru_140CF2E80 + v2 + 921);
    if( v4 )
    {
      HalPutDmaAdapter(v4);
      *((_QWORD *)&stru_140CF2E80 + v2 + 921) = 0i64;
    }
    KeSetEvent((PRKEVENT)&unk_140C49EA0, 0, 0);
  }
  return 0;
}

Referenced by:

No references.