MapCmDevicePropertyToRegValue

const wchar_t *__fastcall MapCmDevicePropertyToRegValue(__int64 a1, int a2){
  int v2; 
  int v3; 
  int v5; 
  int v6; 
  int v7; 
  int v8; 
  int v9; 
  int v10; 
  int v11; 
  int v12; 
  int v13; 
  int v14; 
  int v15; 
  int v16; 
  int v17; 
  int v18; 
  if( a2 > 16 )
  {
    if( a2 > 27 )
    {
      v14 = a2 - 28;
      if( !v14 )
        return L"DeviceCharacteristics";
      v15 = v14 - 1;
      if( !v15 )
        return L"Address";
      v16 = v15 - 1;
      if( !v16 )
        return L"UINumberDescFormat";
      v17 = v16 - 4;
      if( !v17 )
        return L"RemovalPolicy";
      if( v17 == 3 )
        return L"ContainerID";
    }
    else
    {
      if( a2 == 27 )
        return L"Exclusive";
      v5 = a2 - 17;
      if( !v5 )
        return L"UINumber";
      v6 = v5 - 1;
      if( !v6 )
        return L"UpperFilters";
      v7 = v6 - 1;
      if( !v7 )
        return L"LowerFilters";
      v18 = v7 - 5;
      if( !v18 )
        return L"Security";
      if( v18 == 2 )
        return L"DeviceType";
    }
    return 0i64;
  }
  if( a2 == 16 )
    return L"Capabilities";
  if( a2 > 9 )
  {
    v8 = a2 - 10;
    if( !v8 )
      return L"Driver";
    v11 = v8 - 1;
    if( !v11 )
      return L"ConfigFlags";
    v12 = v11 - 1;
    if( !v12 )
      return L"Mfg";
    v13 = v12 - 1;
    if( !v13 )
      return L"FriendlyName";
    if( v13 == 1 )
      return L"LocationInformation";
    return 0i64;
  }
  if( a2 == 9 )
    return L"ClassGUID";
  v2 = a2 - 1;
  if( !v2 )
    return L"DeviceDesc";
  v3 = v2 - 1;
  if( !v3 )
    return L"HardwareID";
  v9 = v3 - 1;
  if( !v9 )
    return L"CompatibleIDs";
  v10 = v9 - 2;
  if( !v10 )
    return L"Service";
  if( v10 != 3 )
    return 0i64;
  return L"Class";
}

Referenced by:

CmGetDeviceRegPropWorker
CmSetDeviceRegPropWorker