PiDqActionDataGetAllPropertiesInAllLanguages
__int64 __fastcall PiDqActionDataGetAllPropertiesInAllLanguages(
__int64 a1,
int a2,
unsigned int a3,
__int64 a4,
const void **a5,
unsigned int *a6,
unsigned int *a7){
int v7;
unsigned int v9;
char *v10;
PVOID v11;
int v12;
INT64 v13;
unsigned int *v14;
unsigned int *v15;
UINT64 v16;
UINT64 v17;
const void **v18;
const wchar_t *pszSrc;
UINT64 v20;
const void **v21;
UINT64 v22;
__int64 v23;
UINT64 v24;
unsigned int v25;
const void **v26;
UINT64 v27;
int v29;
HANDLE Handle;
PVOID P;
VOID *v32;
UINT64 MaxPropertyCount;
INT64 v35;
v35 = a4;
v7 = 0;
Handle = 0i64;
v32 = 0i64;
P = 0i64;
v9 = 0;
if( a2 != 1 )
v9 = a3;
LODWORD(MaxPropertyCount) = 0;
v29 = v9;
v10 = 0i64;
v11 = 0i64;
v12 = PiDqOpenObjectRegKey(a2, a4, a3, 1, 0, a1, (__int64)&Handle);
if( v12 >= 0 )
{
v12 = PiDqPnPGetObjectPropertyKeys(a4, v9, Handle, v13, &v32, &MaxPropertyCount);
if( v12 >= 0 && (_DWORD)MaxPropertyCount )
{
v14 = a7;
v15 = a6;
v10 = (char *)v32;
while( 1 )
{
v32 = &v10[20 * v7];
v12 = PiDqPnPGetObjectPropertyLocales(v35, v9, Handle, (INT64)v32, &P);
if( v12 < 0
|| !*v14
&& (v16 = (unsigned int)MaxPropertyCount,
v17 = *v15,
v18 = a5,
*v14 = MaxPropertyCount,
v12 = PiDqGrowPropertyArray((const _DEVPROPERTY **)v18, v17, v16),
v12 < 0) )
{
v11 = P;
goto LABEL_25;
}
v11 = P;
pszSrc = (const wchar_t *)P;
if( *(_WORD *)P )
break;
LABEL_18:
ExFreePoolWithTag(v11, 0x58706E50u);
v24 = *v15;
v25 = *v14;
v11 = 0i64;
P = 0i64;
if( (_DWORD)v24 != v25
|| (v26 = a5,
v27 = 2 * v25,
*v14 = v27,
v12 = PiDqGrowPropertyArray((const _DEVPROPERTY **)v26, v24, v27),
v12 >= 0) )
{
v9 = v29;
v12 = PiDqPnPGetObjectProperty(v35, v29, (char *)Handle, (__int64)v32, a2, 0i64, (__int64)*a5 + 48 * *v15);
if( v12 >= 0 )
{
++*v15;
if( ++v7 < (unsigned int)MaxPropertyCount )
continue;
}
}
goto LABEL_25;
}
v20 = *v15;
while( 1 )
{
if( (_DWORD)v20 == *v14 )
{
v21 = a5;
v22 = 2 * *v14;
*v14 = v22;
v12 = PiDqGrowPropertyArray((const _DEVPROPERTY **)v21, v20, v22);
if( v12 < 0 )
break;
}
v12 = PiDqPnPGetObjectProperty(v35, v29, (char *)Handle, (__int64)v32, a2, pszSrc, (__int64)*a5 + 48 * *v15);
if( v12 < 0 )
break;
v20 = ++*v15;
v23 = -1i64;
do
++v23;
while( pszSrc[v23] );
pszSrc += v23 + 1;
if( !*pszSrc )
goto LABEL_18;
}
}
else
{
v10 = (char *)v32;
}
}
LABEL_25:
if( Handle )
ZwClose(Handle);
if( v10 )
ExFreePoolWithTag(v10, 0x58706E50u);
if( v11 )
ExFreePoolWithTag(v11, 0x58706E50u);
return(unsigned int)v12;
}Referenced by:
PiDqActionDataCreate