SmpUtilsGetControlDevice
INT64 __stdcall SmpUtilsGetControlDevice(PVOID *HandleOut, DEVICE_OBJECT **DeviceObjectOut){
_DEVICE_OBJECT **v2;
_DEVICE_OBJECT **v4;
NTSTATUS v5;
DEVICE_OBJECT *v6;
UINT64 v8;
UINT64 ShareAccess;
UINT64 CreateDisposition;
UINT64 CreateOptions;
UINT64 v12;
struct _UNICODE_STRING DestinationString;
struct _IO_STATUS_BLOCK IoStatusBlock;
struct _OBJECT_ATTRIBUTES ObjectAttributes;
void *FileHandle;
PVOID Object;
*(&ObjectAttributes.Length + 1) = 0;
*(&ObjectAttributes.Attributes + 1) = 0;
FileHandle = 0i64;
v4 = v2;
DestinationString = 0i64;
IoStatusBlock = 0i64;
RtlInitUnicodeString(&DestinationString, L"\\Device\\RdyBoost", (WCHAR)v2);
LODWORD(v12) = 0;
ObjectAttributes.RootDirectory = 0i64;
LODWORD(CreateOptions) = 32;
LODWORD(CreateDisposition) = 1;
LODWORD(ShareAccess) = 7;
LODWORD(v8) = 0;
ObjectAttributes.Length = 48;
ObjectAttributes.Attributes = 576;
ObjectAttributes.ObjectName = &DestinationString;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
v5 = ZwCreateFile(
&FileHandle,
0x12019Fui64,
&ObjectAttributes,
&IoStatusBlock,
0i64,
v8,
ShareAccess,
CreateDisposition,
CreateOptions,
0i64,
v12);
if( v5 >= 0 )
{
Object = 0i64;
v5 = ObReferenceObjectByHandle(FileHandle, 3u, 0i64, 0, &Object, 0i64);
if( v5 >= 0 )
{
*v4 = IoGetRelatedDeviceObject((_FILE_OBJECT *)Object);
v6 = (DEVICE_OBJECT *)FileHandle;
FileHandle = 0i64;
v5 = 0;
*DeviceObjectOut = v6;
}
if( Object )
HalPutDmaAdapter((PADAPTER_OBJECT)Object);
}
if( FileHandle )
ZwClose(FileHandle);
return(unsigned int)v5;
}Referenced by:
SmcCacheManagerStart