PnpParseIndirectResourceString
char __fastcall PnpParseIndirectResourceString(__int64 a1){
int v2;
__int16 v4;
unsigned int v5;
__int64 v6;
__int16 v7;
__int64 i;
__int16 v9;
int v10;
__int64 v11;
__int16 v12;
__int64 v13;
struct _UNICODE_STRING DestinationString;
SIZE_T Value;
Value = 0i64;
DestinationString = 0i64;
if( RtlUnalignedStringCchLengthW((STRSAFE_PCUNZWCH)a1, 0x7FFFui64, &Value) < 0 )
return 0;
v2 = Value;
if( Value < 5 || *(_WORD *)a1 != 64 )
return 0;
v4 = *(_WORD *)(a1 + 2);
v5 = 1;
while( v4 && v4 != 44 )
v4 = *(_WORD *)(a1 + 2i64 * ++v5);
if( *(_WORD *)(a1 + 2i64 * v5) != 44 )
return 0;
v6 = v5 + 1;
v7 = *(_WORD *)(a1 + 2 * v6);
if( v7 != 35 && v7 != 45 )
return 0;
for( i = (unsigned int)(v6 + 1); ; i = (unsigned int)(i + 1) )
{
v9 = *(_WORD *)(a1 + 2 * i);
if( !v9 || v9 == 59 )
break;
}
v10 = 0;
if( *(_WORD *)(a1 + 2 * i) == 59 )
v10 = i;
if( (int)RtlInitUnicodeStringEx(&DestinationString, (WCHAR *)(a1 + 2 * (v6 + 1))) < 0 )
return 0;
if( v10 )
{
DestinationString.Length = 2 * (v10 - v6) - 2;
DestinationString.MaximumLength = DestinationString.Length;
}
if( RtlUnicodeStringToInteger(&DestinationString, 0xAui64, &Value) < 0 )
return 0;
if( v10 )
{
v11 = (unsigned int)(v10 + 1);
v12 = *(_WORD *)(a1 + 2 * v11);
if( v12 )
{
v13 = (unsigned int)(v10 + 2);
do
{
if( v12 == 59 && *(_WORD *)(a1 + 2 * v13) == 40 && *(_WORD *)(a1 + 2i64 * (unsigned int)(v2 - 1)) == 41 )
break;
v11 = (unsigned int)(v11 + 1);
v13 = (unsigned int)(v13 + 1);
v12 = *(_WORD *)(a1 + 2 * v11);
}
while( v12 );
}
}
return 1;
}Referenced by:
CmGetDeviceMappedPropertyFromRegProp
CmGetInstallerClassMappedPropertyFromRegProp
PnpRegQueryValueIndirect