CmGetInstallerClassMappedPropertyKeys
NTSTATUS __stdcall CmGetInstallerClassMappedPropertyKeys(
HPNPCTX *hPnpCtx,
const WCHAR *ClassGuid,
VOID *ObjectBaseKey,
INT64 SkipPresenceCheck,
_DEVPROPKEY *PropertyKeys,
UINT64 BufferLength,
UINT64 *PropertyCount){
DEVPROPKEY **v7;
NTSTATUS v8;
unsigned int v9;
VOID *v10;
char v11;
__int64 v12;
WCHAR *v13;
_DEVPROPKEY *v14;
char v15;
NTSTATUS InstallerClassMappedPropertyFromRegProp;
__int64 v17;
__int64 v18;
unsigned int v19;
int v20;
unsigned int v21;
unsigned int v22;
const _DEVPROPKEY **v23;
const _DEVPROPKEY *v24;
char v25;
NTSTATUS InstallerClassMappedPropertyFromRegValue;
__int64 v27;
__int64 v28;
unsigned int v29;
int v30;
unsigned int v31;
unsigned int v32;
DEVPROPKEY **v33;
_DEVPROPKEY *v34;
char v35;
NTSTATUS InstallerClassMappedPropertyFromComposite;
__int64 v37;
__int64 v38;
unsigned int v39;
int v40;
int v41;
unsigned int v42;
NTSTATUS InstallerClassMappedPropertyFromCoInstallers;
__int64 v44;
unsigned int v45;
unsigned int v46;
INT64 v48;
UINT64 *v49;
UINT64 PropertyType[9];
HPNPCTX *hPnpCtxa;
hPnpCtxa = hPnpCtx;
v7 = &CmClassRegPropMap;
v8 = 0;
v9 = 0;
PropertyType[0] = 0i64;
v10 = ObjectBaseKey;
*(_DWORD *)PropertyCount = 0;
v11 = SkipPresenceCheck;
v12 = 0xFFFFFFFFi64;
v13 = (WCHAR *)ClassGuid;
while( 1 )
{
v14 = *v7;
v15 = 0;
if( !*v7 )
goto LABEL_17;
if( v11 )
goto LABEL_73;
LODWORD(v49) = 0;
InstallerClassMappedPropertyFromRegProp = CmGetInstallerClassMappedPropertyFromRegProp(
hPnpCtx,
v13,
v10,
*v7,
(UINT64 *)((char *)PropertyType + 4),
0i64,
(UINT64)v49,
PropertyType);
v8 = InstallerClassMappedPropertyFromRegProp;
if( InstallerClassMappedPropertyFromRegProp == -1073741789 || !InstallerClassMappedPropertyFromRegProp )
{
v15 = 1;
}
else if( InstallerClassMappedPropertyFromRegProp == -1073741772 )
{
goto LABEL_65;
}
v8 = 0;
v12 = 0xFFFFFFFFi64;
if( v15 )
{
LABEL_73:
if( PropertyKeys )
{
v17 = *(unsigned int *)PropertyCount;
if( (unsigned int)v17 < (unsigned int)BufferLength )
{
v18 = v17;
PropertyKeys[v18].fmtid = v14->fmtid;
PropertyKeys[v18].pid = v14->pid;
}
}
v19 = *(_DWORD *)PropertyCount;
v20 = -1;
v21 = *(_DWORD *)PropertyCount + 1;
if( v21 >= *(_DWORD *)PropertyCount )
v20 = *(_DWORD *)PropertyCount + 1;
v8 = v21 < v19 ? 0xC0000095 : 0;
*(_DWORD *)PropertyCount = v20;
if( v21 < v19 )
break;
}
hPnpCtx = hPnpCtxa;
v13 = (WCHAR *)ClassGuid;
LABEL_17:
++v9;
v7 += 3;
if( v9 >= 9 )
goto LABEL_20;
v10 = ObjectBaseKey;
}
*(_DWORD *)PropertyCount = 0;
LABEL_20:
if( v8 < 0 )
return v8;
v22 = 0;
v23 = (const _DEVPROPKEY **)&Create;
while( 1 )
{
v24 = *v23;
v25 = 0;
if( *v23 )
{
if( v11 )
goto LABEL_74;
LODWORD(v49) = 0;
InstallerClassMappedPropertyFromRegValue = CmGetInstallerClassMappedPropertyFromRegValue(
hPnpCtxa,
ClassGuid,
ObjectBaseKey,
*v23,
(UINT64 *)((char *)PropertyType + 4),
0i64,
(UINT64)v49,
PropertyType);
v8 = InstallerClassMappedPropertyFromRegValue;
if( InstallerClassMappedPropertyFromRegValue == -1073741789 || !InstallerClassMappedPropertyFromRegValue )
{
v25 = 1;
}
else if( InstallerClassMappedPropertyFromRegValue == -1073741772 )
{
goto LABEL_65;
}
v8 = 0;
if( v25 )
{
LABEL_74:
if( PropertyKeys )
{
v27 = *(unsigned int *)PropertyCount;
if( (unsigned int)v27 < (unsigned int)BufferLength )
{
v28 = v27;
PropertyKeys[v28].fmtid = v24->fmtid;
PropertyKeys[v28].pid = v24->pid;
}
}
v29 = *(_DWORD *)PropertyCount;
v30 = -1;
v31 = *(_DWORD *)PropertyCount + 1;
if( v31 >= *(_DWORD *)PropertyCount )
v30 = *(_DWORD *)PropertyCount + 1;
v8 = v31 < v29 ? 0xC0000095 : 0;
*(_DWORD *)PropertyCount = v30;
if( v31 < v29 )
break;
}
}
++v22;
v23 += 4;
if( v22 >= 0xD )
goto LABEL_39;
}
*(_DWORD *)PropertyCount = 0;
LABEL_39:
if( v8 < 0 )
return v8;
v32 = 0;
v33 = &off_140983F60;
while( 2 )
{
v34 = *v33;
v35 = 0;
if( !v11 )
{
LODWORD(v49) = 0;
InstallerClassMappedPropertyFromComposite = CmGetInstallerClassMappedPropertyFromComposite(
hPnpCtxa,
(WCHAR *)ClassGuid,
ObjectBaseKey,
*v33,
(UINT64 *)((char *)PropertyType + 4),
0i64,
(UINT64)v49,
PropertyType);
v8 = InstallerClassMappedPropertyFromComposite;
if( InstallerClassMappedPropertyFromComposite == -1073741789 || !InstallerClassMappedPropertyFromComposite )
{
v35 = 1;
}
else if( InstallerClassMappedPropertyFromComposite == -1073741772 )
{
goto LABEL_65;
}
v8 = 0;
if( !v35 )
{
v40 = -1;
goto LABEL_67;
}
}
if( PropertyKeys )
{
v37 = *(unsigned int *)PropertyCount;
if( (unsigned int)v37 < (unsigned int)BufferLength )
{
v38 = v37;
PropertyKeys[v38].fmtid = v34->fmtid;
PropertyKeys[v38].pid = v34->pid;
}
}
v39 = *(_DWORD *)PropertyCount;
v40 = -1;
v41 = -1;
v42 = *(_DWORD *)PropertyCount + 1;
if( v42 >= *(_DWORD *)PropertyCount )
v41 = *(_DWORD *)PropertyCount + 1;
v8 = v42 < v39 ? 0xC0000095 : 0;
*(_DWORD *)PropertyCount = v41;
if( v42 >= v39 )
{
LABEL_67:
++v32;
v33 += 2;
if( v32 >= 4 )
goto LABEL_55;
continue;
}
break;
}
*(_DWORD *)PropertyCount = 0;
LABEL_55:
if( v8 >= 0 )
{
if( !v11 )
{
LODWORD(v48) = 0;
InstallerClassMappedPropertyFromCoInstallers = CmGetInstallerClassMappedPropertyFromCoInstallers(
hPnpCtxa,
ClassGuid,
(const _DEVPROPKEY *)v12,
(UINT64 *)((char *)PropertyType + 4),
0i64,
v48,
PropertyType);
if( InstallerClassMappedPropertyFromCoInstallers != -1073741789 )
{
if( InstallerClassMappedPropertyFromCoInstallers )
return(unsigned int)BufferLength < *(_DWORD *)PropertyCount ? 0xC0000023 : 0;
}
}
if( PropertyKeys )
{
v44 = *(unsigned int *)PropertyCount;
if( (unsigned int)v44 < (unsigned int)BufferLength )
PropertyKeys[v44] = DEVPKEY_DeviceClass_ClassCoInstallers;
}
v45 = *(_DWORD *)PropertyCount;
v46 = *(_DWORD *)PropertyCount + 1;
if( v46 >= *(_DWORD *)PropertyCount )
v40 = *(_DWORD *)PropertyCount + 1;
v8 = v46 < v45 ? 0xC0000095 : 0;
*(_DWORD *)PropertyCount = v40;
if( v46 < v45 )
LABEL_65:
*(_DWORD *)PropertyCount = 0;
else
return(unsigned int)BufferLength < *(_DWORD *)PropertyCount ? 0xC0000023 : 0;
}
return v8;
}Referenced by:
CmDeleteInstallerClassWorker
PnpDispatchInstallerClass