Ejemplo n.º 1
0
 public static void smethod_1()
 {
     Task.Run((Action)(() =>
     {
         try
         {
             foreach (string user in SteamManager.GetUsers(SteamManager.GetSteamFolder()))
             {
                 foreach (VDFEntry vdfEntry in ((IEnumerable <VDFEntry>)SteamManager.ReadShortcuts(user)).Where <VDFEntry>((Func <VDFEntry, bool>)(vdfentry_0 =>
                 {
                     if (vdfentry_0.Tags.Length >= 1)
                     {
                         return(vdfentry_0.Tags[0] == "Wii U USB Helper");
                     }
                     return(false);
                 })))
                 {
                     try
                     {
                         ulong num = GClass128.smethod_3(vdfEntry.AppName, vdfEntry.Exe);
                         string str = System.IO.Path.Combine(user, "config", "grid");
                         System.IO.Directory.CreateDirectory(str);
                         if (!System.IO.File.Exists(System.IO.Path.Combine(str, ((long)num).ToString() + ".png")))
                         {
                             TitleId index = new TitleId(System.IO.Path.GetFileNameWithoutExtension(vdfEntry.Exe));
                             GClass128.smethod_2(GClass28.dictionary_0[index]);
                         }
                     }
                     catch
                     {
                     }
                 }
             }
         }
         catch
         {
         }
     }));
 }
Ejemplo n.º 2
0
 private static void smethod_7(GClass32 gclass32_0, GClass95 gclass95_0)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     GClass128.Class114 class114 = new GClass128.Class114();
     // ISSUE: reference to a compiler-generated field
     class114.gclass32_0 = gclass32_0;
     if (GClass6.smethod_16("Steam"))
     {
         int num1 = (int)RadMessageBox.Show("Games cannot be added while Steam is running. Please close it and try again");
     }
     else
     {
         string steamFolder = SteamManager.GetSteamFolder();
         if (!System.IO.Directory.Exists(steamFolder))
         {
             int num2 = (int)RadMessageBox.Show("Steam is not installed. Cannot proceed.");
         }
         else
         {
             string[] users = SteamManager.GetUsers(steamFolder);
             if (users.Length == 0)
             {
                 int num3 = (int)RadMessageBox.Show("USB Helper was unable to find any registered Steam user. Make sure you have logged in at least once.");
             }
             else
             {
                 string str1 = System.IO.Path.Combine(GClass128.String_0, "backup");
                 System.IO.Directory.CreateDirectory(GClass128.String_0);
                 System.IO.Directory.CreateDirectory(str1);
                 // ISSUE: reference to a compiler-generated field
                 string str2 = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".tmp");
                 // ISSUE: reference to a compiler-generated field
                 string filename = System.IO.Path.Combine(GClass128.String_0, "icon" + class114.gclass32_0.TitleId.IdRaw + ".png");
                 // ISSUE: reference to a compiler-generated field
                 new GClass78().method_5(class114.gclass32_0.IconUrl, str2, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                 Image image = Image.FromFile(str2);
                 image.Save(filename, ImageFormat.Png);
                 image.Dispose();
                 GClass6.smethod_6(str2);
                 // ISSUE: reference to a compiler-generated field
                 string str3 = GClass128.smethod_4(class114.gclass32_0, gclass95_0);
                 // ISSUE: reference to a compiler-generated field
                 VDFEntry vdfEntry = new VDFEntry()
                 {
                     AppName = class114.gclass32_0.Name, Exe = str3, Icon = filename, Tags = new string[1] {
                         "Wii U USB Helper"
                     }
                 };
                 foreach (string userPath in users)
                 {
                     List <VDFEntry> source = new List <VDFEntry>();
                     try
                     {
                         source = new List <VDFEntry>((IEnumerable <VDFEntry>)SteamManager.ReadShortcuts(userPath));
                     }
                     catch
                     {
                     }
                     // ISSUE: reference to a compiler-generated field
                     // ISSUE: reference to a compiler-generated field
                     // ISSUE: reference to a compiler-generated method
                     if (!source.Any <VDFEntry>(class114.func_0 ?? (class114.func_0 = new Func <VDFEntry, bool>(class114.method_0))))
                     {
                         source.Add(vdfEntry);
                         string str4 = userPath + "\\config\\shortcuts.vdf";
                         System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(str4));
                         if (System.IO.File.Exists(str4))
                         {
                             System.IO.File.Copy(str4, System.IO.Path.Combine(str1, DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds.ToString()), true);
                         }
                         SteamManager.WriteShortcuts(source.ToArray(), str4);
                     }
                 }
                 // ISSUE: reference to a compiler-generated field
                 GClass128.smethod_2(class114.gclass32_0);
             }
         }
     }
 }