PiDmObjectGetAggregatedBooleanPropertyData
INT64 __fastcall PiDmObjectGetAggregatedBooleanPropertyData(
INT64 a1,
WCHAR *a2,
INT64 a3,
INT64 a4,
INT64 a5,
INT64 a6,
INT64 a7,
INT64 a8,
INT64 a9){
int v9;
_BYTE *v12;
unsigned int v13;
int Object;
int v15;
char *v16;
unsigned int v17;
__int64 v18;
__int64 v20;
__int64 *v21;
INT64 v22;
_ETHREAD *CurrentThread;
ULONG_PTR v24;
ULONG_PTR v25;
int v26;
_QWORD **v27;
_QWORD *v28;
char *v29;
int ObjectProperty;
ULONG v31;
ULONG_PTR BugCheckParameter2;
ULONG_PTR v33;
char v34;
int v35;
int v36;
v36 = HIDWORD(a3);
BugCheckParameter2 = 0i64;
v9 = 0;
v35 = 0;
v31 = 0;
v12 = (_BYTE *)a7;
v13 = a1;
v34 = 0;
Object = -1073741802;
if( a7 )
{
v15 = a8;
v12 = (_BYTE *)(-(__int64)((_DWORD)a8 != 0) & a7);
}
else
{
v15 = 0;
}
if( (int)a1 < 7 && !a4 )
{
v16 = byte_140001538;
v17 = 0;
while( 1 )
{
v18 = *((_QWORD *)v16 + 1);
if( *(_DWORD *)(v18 + 16) == *(_DWORD *)(a5 + 16) )
{
v20 = *(_QWORD *)v18 - *(_QWORD *)a5;
if( *(_QWORD *)v18 == *(_QWORD *)a5 )
v20 = *(_QWORD *)(v18 + 8) - *(_QWORD *)(a5 + 8);
if( !v20 && v13 == *(_DWORD *)v16 )
break;
}
++v17;
v16 += 56;
if( v17 >= 3 )
return(unsigned int)Object;
}
v21 = &PiDmAggregatedBooleanDefs[7 * v17];
if( v21 )
{
*(_DWORD *)a6 = 17;
*(_DWORD *)a9 = 1;
if( v15 )
{
Object = PiDmGetObject(v13, a2, (INT64 *)&BugCheckParameter2);
if( Object >= 0 )
{
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
v24 = BugCheckParameter2;
a7 = v21[6];
v22 = a7;
v33 = BugCheckParameter2;
--*((_WORD *)CurrentThread + 242);
v25 = BugCheckParameter2;
ExAcquirePushLockExclusiveEx(BugCheckParameter2, 0i64);
v26 = *(_DWORD *)(v24 + v22);
if( v26 == 0x80000000 )
{
v27 = (_QWORD **)(v25 + PiDmListDefs[5 * *((int *)v21 + 10) + 1]);
v28 = *v27;
if( *v27 != v27 )
{
do
{
v29 = (char *)v28 - PiDmListDefs[5 * *((int *)v21 + 10) + 3];
ObjectProperty = PnpGetObjectProperty(
PiPnpRtlCtx,
*((_QWORD *)v29 + 2),
*((unsigned int *)v29 + 7),
0i64,
0i64,
v21[1],
&v35,
(unsigned __int64)&v34,
1,
&v31,
0);
Object = ObjectProperty;
if( ObjectProperty < 0 )
{
if( ObjectProperty != -1073741275 )
goto LABEL_19;
}
else if( v35 == 17 && v34 == -1 )
{
++v9;
}
v28 = (_QWORD *)*v28;
}
while( v28 != v27 );
v22 = a7;
}
*(_DWORD *)(v33 + v22) = v9;
v26 = v9;
}
*v12 = (v26 <= 0) - 1;
Object = 0;
LABEL_19:
ExReleasePushLockEx(v25, 0i64);
KeLeaveCriticalRegionThread((__int64)KeGetCurrentThread());
PiDmObjectRelease((CHAR *)BugCheckParameter2);
}
}
else
{
return(unsigned int)-1073741789;
}
}
}
return(unsigned int)Object;
}Referenced by:
PiPnpRtlObjectActionCallback