PnpMultiSzDeleteString

INT8 __fastcall PnpMultiSzDeleteString(UINT8 *dst, WCHAR *Str2){
  UINT8 *v3; 
  int v4; 
  __int64 v5; 
  UINT8 *v6; 
  unsigned int v8; 
  size_t v9; 
  VOID **PoolWithTag; 
  VOID **v11; 

  v3 = dst;
  if( dst && Str2 )
  {
    if( !*(_WORD *)dst )
      return 1;
    while( 1 )
    {
      v4 = wcsicmp((const wchar_t *)v3, Str2);
      v5 = -1i64;
      do
        ++v5;
      while( *(_WORD *)&v3[2 * v5] );
      if( !v4 )
        break;
      v3 += 2 * v5 + 2;
      if( !*(_WORD *)v3 )
        return 1;
    }
    v6 = &v3[2 * v5];
    if( !*((_WORD *)v6 + 1) )
    {
      *(_DWORD *)v3 = 0;
      return 1;
    }
    v8 = 2 * PnpMultiSzGetLen((const WCHAR *)v6 + 1);
    if( v8 )
    {
      v9 = v8;
      PoolWithTag = ExAllocatePoolWithTag(1ui64, v8, 1380994640i64);
      v11 = PoolWithTag;
      if( PoolWithTag )
      {
        memmove(PoolWithTag, v6 + 2, v9);
        memmove(v3, v11, v9);
        ExFreePoolWithTag(v11, 0);
        return 1;
      }
    }
  }
  return 0;
}

Referenced by:

CmGetDeviceSiblings