IopGetFileInformation
NTSTATUS __stdcall IopGetFileInformation(
PVOID FileObject,
UINT64 Length,
_FILE_INFORMATION_CLASS FileInformationClass,
VOID *FileInformation,
UINT64 *ReturnedLength){
int v7;
_DEVICE_OBJECT *v9;
UINT64 v10;
_IRP *Irp;
UINT64 v12;
_IRP *v13;
_ETHREAD *CurrentThread;
__int64 v15;
NTSTATUS v16;
__int128 v18;
__int128 Object;
__int64 v20;
VOID *retaddr;
Object = 0i64;
v20 = 0i64;
v7 = Length;
v18 = 0i64;
ObfReferenceObject(FileObject);
KeInitializeEvent((INT64)&Object, 1, 0);
LODWORD(v9) = IoGetRelatedDeviceObject((INT64)FileObject);
v10 = (UINT64)v9;
Irp = IopAllocateIrpExReturn(v9, v9->StackSize, 0, retaddr);
v12 = (UINT64)Irp;
if( Irp )
{
Irp->Tail.OriginalFileObject = (_FILE_OBJECT *)FileObject;
v13 = Irp;
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
*(_QWORD *)(v12 + 88) = 0i64;
*(_QWORD *)(v12 + 152) = CurrentThread;
*(_QWORD *)(v12 + 80) = &Object;
*(_QWORD *)(v12 + 72) = &v18;
v15 = *(_QWORD *)(v12 + 184);
*(_DWORD *)(v12 + 16) = 4100;
*(_BYTE *)(v12 + 64) = 0;
*(_BYTE *)(v15 - 72) = 5;
*(_QWORD *)(v15 - 24) = FileObject;
*(_DWORD *)(v12 + 16) |= 0x10u;
*(_QWORD *)(v12 + 24) = FileInformation;
*(_DWORD *)(v15 - 64) = v7;
*(_DWORD *)(v15 - 56) = FileInformationClass;
IopQueueThreadIrp(v13);
v16 = IofCallDriver(v10, v12);
if( v16 == 259 )
{
KeWaitForSingleObject((UINT64)&Object, 0, 0, 0, 0i64);
v16 = v18;
}
*(_DWORD *)ReturnedLength = DWORD2(v18);
return v16;
}
else
{
HalPutDmaAdapter((PADAPTER_OBJECT)FileObject);
return -1073741670;
}
}Referenced by:
IopGetBasicInformationFile
IopGetRelatedFileName
IopGraftName
IopQueryNameInternal