Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NTSTATUS __stdcall IoAssignResources(PUNICODE_STRING RegistryPath, PUNICODE_STRING DriverClassName, PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject, PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources, PCM_RESOURCE_LIST *AllocatedResources)
- {
- __int16 v6; // bx@1
- PDEVICE_NODE DeviceNode; // eax@2
- char *DriverName; // eax@9
- PDEVICE_NODE v9; // eax@11
- PUNICODE_STRING InstancePath; // eax@12
- PUNICODE_STRING ServiceName; // eax@14
- PDEVICE_NODE ParentDeviceNode; // eax@16
- USHORT *Length; // eax@17
- v6 = 0;
- if ( DeviceObject )
- {
- DeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode;
- if ( DeviceNode )
- {
- if ( !(BYTE2(DeviceNode->Flags) & 2) )
- {
- if ( DriverObject )
- {
- IoAddTriageDumpDataBlock(DriverObject, DriverObject->Size);
- if ( DriverObject->DriverName.Length )
- {
- IoAddTriageDumpDataBlock(&DriverObject->DriverName, 2);
- IoAddTriageDumpDataBlock(DriverObject->DriverName.Buffer, DriverObject->DriverName.Length);
- }
- v6 = 0;
- }
- IoAddTriageDumpDataBlock(DeviceObject, DeviceObject->Size);
- if ( DeviceObject->DriverObject )
- {
- IoAddTriageDumpDataBlock(DeviceObject->DriverObject, DeviceObject->DriverObject->Size);
- DriverName = &DeviceObject->DriverObject->DriverName;
- if ( *DriverName != v6 )
- {
- IoAddTriageDumpDataBlock(DriverName, 2);
- IoAddTriageDumpDataBlock(
- DeviceObject->DriverObject->DriverName.Buffer,
- DeviceObject->DriverObject->DriverName.Length);
- }
- }
- v9 = DeviceObject->DeviceObjectExtension->DeviceNode;
- if ( v9 )
- {
- IoAddTriageDumpDataBlock(v9, 292);
- InstancePath = &DeviceObject->DeviceObjectExtension->DeviceNode->InstancePath;
- if ( InstancePath->Length )
- {
- IoAddTriageDumpDataBlock(InstancePath, 2);
- IoAddTriageDumpDataBlock(
- DeviceObject->DeviceObjectExtension->DeviceNode->InstancePath.Buffer,
- DeviceObject->DeviceObjectExtension->DeviceNode->InstancePath.Length);
- }
- ServiceName = &DeviceObject->DeviceObjectExtension->DeviceNode->ServiceName;
- if ( ServiceName->Length )
- {
- IoAddTriageDumpDataBlock(ServiceName, 2);
- IoAddTriageDumpDataBlock(
- DeviceObject->DeviceObjectExtension->DeviceNode->ServiceName.Buffer,
- DeviceObject->DeviceObjectExtension->DeviceNode->ServiceName.Length);
- }
- ParentDeviceNode = DeviceObject->DeviceObjectExtension->DeviceNode->Parent;
- if ( ParentDeviceNode )
- {
- Length = &ParentDeviceNode->ServiceName.Length;
- if ( *Length )
- {
- IoAddTriageDumpDataBlock(Length, 2);
- IoAddTriageDumpDataBlock(
- DeviceObject->DeviceObjectExtension->DeviceNode->Parent->ServiceName.Buffer,
- DeviceObject->DeviceObjectExtension->DeviceNode->Parent->ServiceName.Length);
- }
- }
- }
- KeBugCheckEx(202u, 2u, DeviceObject, 0, 0);
- }
- }
- }
- if ( RequestedResources && (!RequestedResources->AlternativeLists || !RequestedResources->List[0].Count) )
- RequestedResources = 0;
- if ( AllocatedResources )
- *AllocatedResources = 0;
- return IopLegacyResourceAllocation(2, DriverObject, DeviceObject, RequestedResources, AllocatedResources);
- }
Advertisement
Add Comment
Please, Sign In to add comment