WmipGetFilePDO
NTSTATUS __stdcall WmipGetFilePDO(VOID *FileHandle, INT8 Mode, _DEVICE_OBJECT **Pdo){
int v4;
_FILE_OBJECT *v5;
INT64 v6;
INT64 v7;
INT64 v8;
_DEVICE_OBJECT *v9;
_DEVICE_OBJECT *v10;
INT64 v11;
VOID **Irp;
_IRP *v13;
_WORD *v14;
_DEVICE_OBJECT **Information;
_FILE_OBJECT *FileObject;
FileObject = 0i64;
v4 = ObReferenceObjectByHandle(FileHandle, 0i64, (_OBJECT_TYPE *)IoFileObjectType, Mode, (VOID **)&FileObject, 0i64);
if( v4 >= 0 )
{
v5 = FileObject;
LODWORD(v6) = IoGetRelatedDeviceObject((INT64)FileObject);
LODWORD(v9) = IoGetAttachedDeviceReference(v6, v7, v8);
v10 = v9;
LOBYTE(v11) = v9->StackSize;
Irp = IoAllocateIrp(v11, 0);
v13 = (_IRP *)Irp;
if( Irp )
{
v14 = Irp[23];
*(v14 - 36) = 1819;
*((_DWORD *)v14 - 16) = 4;
*((_QWORD *)v14 - 3) = v5;
v13->IoStatus.Status = -1073741637;
v4 = IoSynchronousCallDriver(v10, v13);
if( v4 >= 0 )
{
Information = (_DEVICE_OBJECT **)v13->IoStatus.Information;
*Pdo = Information[1];
ExFreePoolWithTag(Information, 0);
v4 = 0;
}
IoFreeIrp(v13);
}
else
{
v4 = -1073741670;
}
HalPutDmaAdapter((PADAPTER_OBJECT)v10);
if( v5 )
HalPutDmaAdapter((PADAPTER_OBJECT)v5);
}
return v4;
}Referenced by:
IoWMIHandleToInstanceName
WmipTranslateFileHandle