PipProcessPendingObjects
NTSTATUS __stdcall PipProcessPendingObjects(PWCHAR ObjectName, PVOID ObjectKey, PVOID Context, UINT8 *Filter){
_WORD *PoolWithTag;
unsigned int v5;
int v9;
ULONG i;
__int64 v11;
NTSTATUS v12;
int Value;
UINT8 *v14;
__int64 v15;
char v17;
char DependenciesSatisfied[3];
SIZE_T NumberOfBytes;
void *v20;
__int16 v21[264];
NumberOfBytes = 260i64;
PoolWithTag = 0i64;
v17 = 0;
v5 = 0;
v20 = 0i64;
v9 = PnpCtxRegEnumKey((__int64)ObjectName, ObjectName, 0, (char *)v21, (unsigned int *)&NumberOfBytes);
for( i = 1; ; ++i )
{
v12 = v9;
if( v9 == -2147483622 || v9 == -1073741444 )
break;
if( v9 < 0 )
goto LABEL_29;
if( (int)PnpCtxRegOpenKey(PiPnpRtlCtx, (char *)ObjectName, (const WCHAR *)v21, 0, 1u, &v20) >= 0 )
{
if( !ObjectKey )
goto LABEL_8;
v17 = 0;
v12 = ((__int64(__fastcall *)(__int16 *, void *, _QWORD, char *))ObjectKey)(v21, v20, 0i64, &v17);
if( v12 < 0 )
goto LABEL_29;
if( !v17 )
{
LABEL_8:
LODWORD(NumberOfBytes) = v5;
Value = PnpCtxRegQueryValue(
v11,
v20,
L"DependOnFirmware",
(_DWORD *)&NumberOfBytes + 1,
PoolWithTag,
(__int64)&NumberOfBytes);
if( Value == -1073741789 || Value == -2147483643 )
{
if( PoolWithTag )
ExFreePoolWithTag(PoolWithTag, 0x42706E50u);
v5 = NumberOfBytes;
PoolWithTag = ExAllocatePoolWithTag(PagedPool, (unsigned int)NumberOfBytes, 0x42706E50ui64);
if( !PoolWithTag )
return -1073741670;
Value = PnpCtxRegQueryValue(
v15,
v20,
L"DependOnFirmware",
(_DWORD *)&NumberOfBytes + 1,
PoolWithTag,
(__int64)&NumberOfBytes);
}
if( Value == -1073741772 )
{
if( PoolWithTag )
{
if( v5 >= 2 )
*PoolWithTag = 0;
LABEL_19:
if( PoolWithTag )
{
if( v5 >= 2 )
{
if( *PoolWithTag )
{
DependenciesSatisfied[0] = 0;
if( (int)PnpCheckDriverDependencies(PoolWithTag, (UINT8 *)DependenciesSatisfied, v14) < 0
|| !DependenciesSatisfied[0] )
{
goto LABEL_26;
}
}
}
}
}
if( ((int(__fastcall *)(__int16 *, PWCHAR, void *, _QWORD))Filter)(v21, ObjectName, v20, 0i64) >= 0 )
--i;
goto LABEL_26;
}
if( Value < 0 )
goto LABEL_26;
goto LABEL_19;
}
}
LABEL_26:
LODWORD(NumberOfBytes) = 260;
v9 = PnpCtxRegEnumKey(v11, ObjectName, i, (char *)v21, (unsigned int *)&NumberOfBytes);
}
v12 = 0;
LABEL_29:
if( PoolWithTag )
ExFreePoolWithTag(PoolWithTag, 0x42706E50u);
return v12;
}Referenced by:
PipProcessPendingOsExtensionResources
PipProcessPendingServices