SeSetLearningModeObjectInformation
VOID __stdcall SeSetLearningModeObjectInformation(_LEARNING_MODE_OBJECT_INFORMATION *ObjectInformation){
VOID *v2;
VOID **PoolWithTag;
VOID **v4;
NTSTATUS v5;
VOID **v6;
__int64 v7;
VOID **v8;
WCHAR *v9;
__int64 v10;
UINT64 NumberOfBytes;
PVOID Object;
LODWORD(NumberOfBytes) = 0;
if( byte_140C5424C )
{
*(_OWORD *)(ObjectInformation + 10) = 0i64;
v2 = (VOID *)*((_QWORD *)ObjectInformation + 4);
if( !v2 )
goto LABEL_16;
Object = 0i64;
if( ObReferenceObjectByHandle(v2, 0i64, 0i64, KeGetCurrentThread()->PreviousMode, &Object, 0i64) < 0 )
goto LABEL_16;
PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x210ui64, 1330799955i64);
v4 = PoolWithTag;
if( PoolWithTag )
{
v5 = ObQueryNameString(Object, (_OBJECT_NAME_INFORMATION *)PoolWithTag, 0x210ui64, &NumberOfBytes);
if( v5 != -1073741820 )
goto LABEL_8;
ExFreePoolWithTag(v4, 0);
v6 = ExAllocatePoolWithTag(1ui64, (unsigned int)NumberOfBytes, 1330799955i64);
v4 = v6;
if( v6 )
{
v5 = ObQueryNameString(Object, (_OBJECT_NAME_INFORMATION *)v6, (unsigned int)NumberOfBytes, &NumberOfBytes);
LABEL_8:
if( v5 >= 0 )
{
if( v4[1] )
{
v7 = *(unsigned __int16 *)(*((_QWORD *)ObjectInformation + 3) + 2i64) + 2i64 + *((unsigned __int16 *)v4 + 1);
v8 = ExAllocatePoolWithTag(1ui64, v7, 1330799955i64);
v9 = (WCHAR *)v8;
if( v8 )
{
memset(v8, 0i64, v7);
RtlStringCbCopyW(v9, v7, (WCHAR *)v4[1]);
if( *(_QWORD *)(*((_QWORD *)ObjectInformation + 3) + 8i64) )
{
RtlStringCbCatW(v9, v7, (WCHAR *)L"\\");
RtlStringCbCatW(v9, v7, *(WCHAR **)(*((_QWORD *)ObjectInformation + 3) + 8i64));
}
RtlInitUnicodeString((PUNICODE_STRING)(ObjectInformation + 10), v9);
}
}
}
ExFreePoolWithTag(v4, 0);
}
}
HalPutDmaAdapter((PADAPTER_OBJECT)Object);
LABEL_16:
ObjectInformation[2] = SepGetCurrentLogLevel();
*(_QWORD *)ObjectInformation = *(_QWORD *)(v10 + 1448);
*(_QWORD *)(v10 + 1448) = ObjectInformation;
}
}Referenced by:
ObOpenObjectByNameEx
ObReferenceObjectByName
ObReferenceObjectByNameEx
ObpLookupObjectName
RtlpAllowsLowBoxAccess