PiDmListInitEnumCallback
NTSTATUS __stdcall PiDmListInitEnumCallback(ULONG_PTR Object, VOID *Context, _BYTE *StopEnumeration){
unsigned int v3;
__int64 v5;
int ObjectProperty;
UINT64 v7;
WCHAR *v8;
NTSTATUS v9;
VOID *v10;
__int64 v11;
void *v13;
VOID **PoolWithTag;
_DWORD v15[3];
WCHAR GuidString[40];
memset(v15, 0, sizeof(v15));
v3 = 1024;
v5 = *(_QWORD *)&Object;
*StopEnumeration = 0;
while( 1 )
{
if( v3 > *((_DWORD *)Context + 2) )
{
v13 = *(void **)Context;
*((_DWORD *)Context + 2) = v3;
if( v13 )
ExFreePoolWithTag(v13, 0x5A706E50u);
PoolWithTag = ExAllocatePoolWithTag(1ui64, *((unsigned int *)Context + 2), 1517317712i64);
*(_QWORD *)Context = PoolWithTag;
if( !PoolWithTag )
break;
}
ObjectProperty = PnpGetObjectProperty(
*(&stru_140CF2E80 + 1214),
*(_QWORD *)(v5 + 16),
*(unsigned int *)(v5 + 28),
0i64,
0i64,
PiDmListDefs[5 * *((int *)Context + 3) + 4],
(INT64)v15,
*(_QWORD *)Context);
if( ObjectProperty != -1073741789 )
goto LABEL_4;
v3 = 0;
}
ObjectProperty = -1073741670;
LABEL_4:
if( ObjectProperty == -1073741275 )
return 0;
if( ObjectProperty >= 0 )
{
if( v15[0] == 13 )
{
PnpStringFromGuid(*(const _GUID **)Context, GuidString, v7);
v8 = GuidString;
}
else
{
if( v15[0] != 18 )
return ObjectProperty;
v8 = *(WCHAR **)Context;
}
v9 = PiDmAddCacheReferenceForObject(PiDmListDefs[5 * *((int *)Context + 3)], v8, (PI_DM_OBJECT **)&v15[1]);
v11 = *(_QWORD *)&v15[1];
ObjectProperty = v9;
if( v9 >= 0 )
PiDmListAddObject(*((_PI_DM_LIST_ID *)Context + 3), *(_PI_DM_OBJECT **)&v15[1], (_PI_DM_OBJECT *)v5, 0i64);
if( v11 )
{
PiDmRemoveCacheReferenceForObject(*(_DWORD *)(v11 + 28), *(WCHAR **)(v11 + 16), v10);
PiDmObjectRelease((_PI_DM_OBJECT *)v11);
}
}
return ObjectProperty;
}Referenced by:
No references.