Ejemplo n.º 1
0
 public static byte[] smethod_2(Uri uri_0, TimeSpan timeSpan_0)
 {
     try
     {
         string str = GClass88.smethod_11(uri_0.smethod_14());
         if (!str.smethod_15(timeSpan_0))
         {
             return(File.ReadAllBytes(str));
         }
         try
         {
             byte[] bytes = new GClass78().method_2(uri_0.ToString());
             File.WriteAllBytes(str, bytes);
             return(bytes);
         }
         catch
         {
             return(File.Exists(str) ? File.ReadAllBytes(str) : (byte[])null);
         }
     }
     catch
     {
         return((byte[])null);
     }
 }
Ejemplo n.º 2
0
 public static void smethod_3(Uri uri_0, TimeSpan timeSpan_0, Action <GClass87> action_0, Action action_1)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     GClass88.Class66 class66 = new GClass88.Class66();
     // ISSUE: reference to a compiler-generated field
     class66.uri_0 = uri_0;
     // ISSUE: reference to a compiler-generated field
     class66.action_0 = action_0;
     // ISSUE: reference to a compiler-generated field
     class66.action_1 = action_1;
     // ISSUE: reference to a compiler-generated field
     // ISSUE: reference to a compiler-generated field
     class66.string_0 = GClass88.smethod_11(class66.uri_0.smethod_14());
     // ISSUE: reference to a compiler-generated field
     if (class66.string_0.smethod_15(timeSpan_0))
     {
         // ISSUE: reference to a compiler-generated method
         Task.Run(new Action(class66.method_0));
     }
     else
     {
         // ISSUE: reference to a compiler-generated field
         if (new FileInfo(class66.string_0).Length <= 0L)
         {
             return;
         }
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         class66.action_0(new GClass87(File.ReadAllBytes(class66.string_0), class66.string_0, true));
     }
 }
Ejemplo n.º 3
0
 public virtual void vmethod_0(string string_0, TimeSpan timeSpan_0)
 {
     if (!Uri.IsWellFormedUriString(string_0, UriKind.Absolute))
     {
         // ISSUE: reference to a compiler-generated field
         EventHandler eventHandler0 = this.eventHandler_0;
         if (eventHandler0 == null)
         {
             return;
         }
         eventHandler0((object)this, (EventArgs)null);
     }
     else
     {
         GClass88.smethod_3(new Uri(string_0), timeSpan_0, (Action <GClass87>)(gclass87_0 =>
         {
             // ISSUE: reference to a compiler-generated field
             EventHandler <GClass87> eventHandler1 = this.eventHandler_1;
             if (eventHandler1 == null)
             {
                 return;
             }
             eventHandler1((object)this, gclass87_0);
         }), (Action)(() =>
         {
             // ISSUE: reference to a compiler-generated field
             EventHandler eventHandler0 = this.eventHandler_0;
             if (eventHandler0 == null)
             {
                 return;
             }
             eventHandler0((object)this, (EventArgs)null);
         }));
     }
 }
Ejemplo n.º 4
0
 internal static string smethod_12(string string_1)
 {
     if (GClass88.smethod_1(string_1))
     {
         return(File.ReadAllText(GClass88.smethod_11(string_1)));
     }
     return((string)null);
 }
Ejemplo n.º 5
0
 public static byte[] smethod_4(string string_1)
 {
     if (GClass88.smethod_1(string_1))
     {
         return(File.ReadAllBytes(GClass88.smethod_11(string_1)));
     }
     return((byte[])null);
 }
Ejemplo n.º 6
0
 public static string[] smethod_7(string string_1)
 {
     if (GClass88.smethod_1(string_1))
     {
         return(File.ReadAllLines(GClass88.smethod_11(string_1)));
     }
     return((string[])null);
 }
Ejemplo n.º 7
0
 public static byte[] smethod_0(string string_0, TimeSpan timeSpan_0)
 {
     if (Uri.IsWellFormedUriString(string_0, UriKind.Absolute))
     {
         return(GClass88.smethod_2(new Uri(string_0), timeSpan_0));
     }
     return((byte[])null);
 }
Ejemplo n.º 8
0
 public static byte[] smethod_4(string string_1)
 {
     if (GClass88.Check_If_Exists_In_Cache_Dir(string_1))
     {
         return(File.ReadAllBytes(GClass88.Combine_Cache_Dir_With_String_1(string_1)));
     }
     return((byte[])null);
 }
Ejemplo n.º 9
0
 public static void smethod_0(string string_1)
 {
     if (!GClass88.Check_If_Exists_In_Cache_Dir(string_1))
     {
         return;
     }
     GClass6.smethod_6(GClass88.Combine_Cache_Dir_With_String_1(string_1));
 }
Ejemplo n.º 10
0
 internal static string smethod_12(string string_1)
 {
     if (GClass88.Check_If_Exists_In_Cache_Dir(string_1))
     {
         return(File.ReadAllText(GClass88.Combine_Cache_Dir_With_String_1(string_1)));
     }
     return((string)null);
 }
Ejemplo n.º 11
0
 public static void smethod_0(string string_1)
 {
     if (!GClass88.smethod_1(string_1))
     {
         return;
     }
     GClass6.smethod_6(GClass88.smethod_11(string_1));
 }
Ejemplo n.º 12
0
 public static void smethod_0()
 {
     GClass30.list_0 = new List <string>();
     if (!GClass88.smethod_1("installed"))
     {
         return;
     }
     GClass30.list_0.AddRange((IEnumerable <string>)GClass88.smethod_7("installed"));
 }
Ejemplo n.º 13
0
 public static void smethod_0()
 {
     GClass30.list_0 = new List <string>();
     if (!GClass88.Check_If_Exists_In_Cache_Dir("installed"))
     {
         return;
     }
     GClass30.list_0.AddRange((IEnumerable <string>)GClass88.smethod_7("installed"));
 }
Ejemplo n.º 14
0
 protected Texture2D method_4(string string_0)
 {
     using (MemoryStream memoryStream = new MemoryStream(GClass88.smethod_2(new Uri(string_0), TimeSpan.FromDays(999.0))))
     {
         try
         {
             return(Texture2D.FromStream(GClass138.graphicsDevice_0, (Stream)memoryStream));
         }
         catch
         {
             return((Texture2D)null);
         }
     }
 }
Ejemplo n.º 15
0
        private void method_15()
        {
            this.gclass32_0 = new GClass32[50];
            List <GClass32> list = GClass28.dictionary_0.Values.Where <GClass32>((Func <GClass32, bool>)(gclass32_0 => gclass32_0.Boolean_1)).ToList <GClass32>();

            try
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                Class120.Class119 class119 = new Class120.Class119();
                // ISSUE: reference to a compiler-generated field
                class119.string_0 = GClass88.smethod_7("guiGames");
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                for (class119.int_0 = 0; class119.int_0 < class119.string_0.Length && class119.int_0 < this.gclass32_0.Length; class119.int_0++)
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated method
                    GClass32 gclass32 = list.Find(class119.predicate_0 ?? (class119.predicate_0 = new Predicate <GClass32>(class119.method_0)));
                    if (gclass32 != null && !((IEnumerable <GClass32>) this.gclass32_0).Contains <GClass32>(gclass32))
                    {
                        // ISSUE: reference to a compiler-generated field
                        this.gclass32_0[class119.int_0] = gclass32;
                    }
                }
                foreach (GClass32 gclass32 in list.Where <GClass32>((Func <GClass32, bool>)(gclass32_1 => !((IEnumerable <GClass32>) this.gclass32_0).Contains <GClass32>(gclass32_1))).ToArray <GClass32>())
                {
                    for (int index = 0; index < this.gclass32_0.Length; ++index)
                    {
                        if (this.gclass32_0[index] == null)
                        {
                            this.gclass32_0[index] = gclass32;
                            break;
                        }
                    }
                }
            }
            catch
            {
                for (int index = 0; index < this.gclass32_0.Length && index < list.Count; ++index)
                {
                    this.gclass32_0[index] = list[index];
                }
            }
        }
Ejemplo n.º 16
0
        public byte[] method_4(string string_0, int int_1)
        {
            string string_1 = GClass88.smethod_8(string_0);

            if (GClass88.smethod_1(string_1))
            {
                if ((DateTime.Now - GClass88.smethod_6(string_1)).TotalHours <= (double)int_1)
                {
                    return(GClass88.smethod_4(string_1));
                }
                byte[] byte_1 = new WebClient().UploadValues(string.Format("{0}/requestZipHash.php", (object)Class67.String_0), new NameValueCollection()
                {
                    {
                        "url",
                        Convert.ToBase64String(Encoding.UTF8.GetBytes(string_0))
                    }
                });
                using (MD5 md5 = MD5.Create())
                {
                    byte[] buffer = GClass88.smethod_4(string_1);
                    if (GClass27.smethod_1(md5.ComputeHash(buffer), byte_1))
                    {
                        return(buffer);
                    }
                }
            }
            using (MemoryStream memoryStream = new MemoryStream(this.method_2(string.Format("{0}/zipProxy.php?url=", (object)Class67.String_0) + Convert.ToBase64String(Encoding.UTF8.GetBytes(string_0)))))
            {
                using (ZipArchive zipArchive = new ZipArchive((Stream)memoryStream))
                {
                    ZipArchiveEntry entry    = zipArchive.GetEntry("content");
                    byte[]          numArray = new byte[entry.Length];
                    using (Stream stream = entry.Open())
                        stream.Read(numArray, 0, numArray.Length);
                    GClass88.smethod_9(new Uri(string_0), numArray);
                    return(numArray);
                }
            }
        }
Ejemplo n.º 17
0
 internal static string smethod_14(this Uri uri_0)
 {
     return(GClass88.smethod_8(uri_0.AbsoluteUri));
 }
Ejemplo n.º 18
0
 public static bool Check_If_Exists_In_Cache_Dir(string string_1)
 {
     return(File.Exists(GClass88.Combine_Cache_Dir_With_String_1(string_1)));
 }
Ejemplo n.º 19
0
 public static byte[] smethod_5(Uri uri_0)
 {
     return(GClass88.smethod_4(uri_0.smethod_14()));
 }
Ejemplo n.º 20
0
 public static DateTime smethod_6(string string_1)
 {
     return(new FileInfo(GClass88.smethod_11(string_1)).LastWriteTime);
 }
Ejemplo n.º 21
0
 public static void smethod_1()
 {
     GClass88.smethod_10("installed", GClass30.list_0.ToArray());
 }
Ejemplo n.º 22
0
 public static void smethod_9(Uri uri_0, byte[] byte_0)
 {
     File.WriteAllBytes(GClass88.smethod_11(uri_0.smethod_14()), byte_0);
 }
Ejemplo n.º 23
0
 public static void smethod_10(string string_1, string[] string_2)
 {
     File.WriteAllLines(GClass88.smethod_11(string_1), string_2);
 }
Ejemplo n.º 24
0
 internal static string smethod_11(this string string_1)
 {
     return(GClass88.smethod_16(string_1));
 }
Ejemplo n.º 25
0
 private void method_19()
 {
     lock (this)
         GClass88.smethod_10("guiGames", ((IEnumerable <GClass32>) this.gclass32_0).Select <GClass32, string>((Func <GClass32, string>)(gclass32_0 => gclass32_0?.TitleId.IdRaw)).ToArray <string>());
 }
Ejemplo n.º 26
0
 public static void smethod_0(string string_4, string string_5, string string_6, string string_7, string string_8, string string_9, bool bool_0, byte[] byte_0, byte[] byte_1, byte[] byte_2, GStruct2 gstruct2_0, Action <int> action_0 = null)
 {
     ServicePointManager.ServerCertificateValidationCallback += (RemoteCertificateValidationCallback)((object_0, x509Certificate_0, x509Chain_0, sslPolicyErrors_0) => true);
     ServicePointManager.DefaultConnectionLimit = 8;
     GClass26.string_0 = string_5;
     GClass26.string_1 = string_6;
     GClass26.string_2 = string_7;
     GClass88.Check_For_Create_Cache_Dir(GClass26.string_0);
     Directory.CreateDirectory(GClass17.string_0);
     Class67.WiiU_USB_Helper_Domain = string_8;
     GClass28.string_5 = Class67.smethod_22();
     GClass28.list_2   = Class67.smethod_2();
     GClass28.string_4 = string_4;
     GClass28.dictionary_0.Clear();
     GClass28.list_6.Clear();
     GClass28.dictionary_3.Clear();
     GClass28.dictionary_1.Clear();
     GClass28.dictionary_2.Clear();
     GClass30.smethod_0();
     Class67.smethod_13();
     Class67.JSON_Game_Custom_Injection_Import("out/games.json");
     Class67.JSON_Game_Custom_Injection_Import("out/customs.json");
     Class67.JSON_Game_Custom_Injection_Import("out/injections.json");
     Class67.JSON_Game_Custom_Injection_Import("out/games3ds.json");
     Class67.JSON_Game_Custom_Injection_Import("out/gamesWii.json");
     Class67.JSON_Update_Import("out/updates.json");
     Class67.JSON_Update_Import("out/updates3ds.json");
     Class67.JSON_DLC_Import("out/dlcs.json");
     Class67.JSON_DLC_Import("out/dlcs3ds.json");
     if (!bool_0)
     {
         try
         {
             GClass26.smethod_5(byte_0);
         }
         catch
         {
             Settings.Default.TicketsPath    = "";
             Settings.Default.TicketsPath3DS = "";
             Settings.Default.TicketsPathWii = "";
             int num = (int)RadMessageBox.Show("The application was unable to parse the specified archive. The app will now restart. Please specify another archive or use the title key site instead (recommended)");
             Settings.Default.Save();
             Application.Restart();
             return;
         }
     }
     else
     {
         string string_4_1 = "";
         string string_5_1 = "";
         string string_6_1 = "";
         if (byte_0 != null)
         {
             string_4_1 = Encoding.UTF8.GetString(byte_0);
         }
         if (byte_1 != null)
         {
             string_5_1 = Encoding.UTF8.GetString(byte_1);
         }
         if (byte_2 != null)
         {
             string_6_1 = Encoding.UTF8.GetString(byte_2);
         }
         GClass26.smethod_6(string_4_1, string_5_1, string_6_1);
     }
     if (GClass28.dictionary_0.Count == 0)
     {
         throw new Exception("No titles available. Please check your ticket source.");
     }
     foreach (GClass32 gclass32 in GClass28.dictionary_0.Values)
     {
         foreach (GClass31 gclass31 in GClass28.list_6)
         {
             if (!(gclass32.TitleId.High != gclass31.TitleId.High) && gclass32.System == gclass31.System)
             {
                 gclass31.Name = gclass32.Name;
                 gclass32.Dlc  = gclass31;
                 break;
             }
         }
     }
     if (GClass88.Check_If_Exists_In_Cache_Dir("lasttitles"))
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: reference to a compiler-generated method
         GClass28.NewTitles = GClass28.dictionary_0.Values.Where <GClass32>(new Func <GClass32, bool>(new GClass26.Class34()
         {
             string_0 = GClass88.smethod_7("lasttitles")
         }.method_0)).ToList <GClass32>();
     }
     GClass88.smethod_10("lasttitles", GClass28.dictionary_0.Values.Select <GClass32, string>((Func <GClass32, string>)(gclass32_0 => gclass32_0.TitleId.IdRaw)).ToArray <string>());
     if (GClass88.Check_If_Exists_In_Cache_Dir("lastUpdates"))
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: reference to a compiler-generated method
         GClass28.NewUpdates = GClass28.dictionary_0.Values.Where <GClass32>((Func <GClass32, bool>)(gclass32_0 =>
         {
             if (gclass32_0.Boolean_5)
             {
                 return(gclass32_0.AreThereUpdates);
             }
             return(false);
         })).Select <GClass32, GClass33>((Func <GClass32, GClass33>)(gclass32_0 => gclass32_0.Updates.Last <GClass33>())).Where <GClass33>(new Func <GClass33, bool>(new GClass26.Class35()
         {
             string_0 = GClass88.smethod_7("lastUpdates")
         }.method_0)).ToList <GClass33>();
     }
     GClass88.smethod_10("lastUpdates", GClass28.dictionary_0.Values.Where <GClass32>((Func <GClass32, bool>)(gclass32_0 =>
     {
         if (!gclass32_0.AreThereUpdates)
         {
             return(false);
         }
         if (!gclass32_0.Boolean_5)
         {
             return(gclass32_0.Boolean_1);
         }
         return(true);
     })).Select <GClass32, string>((Func <GClass32, string>)(gclass32_0 => gclass32_0.Updates.Last <GClass33>().ToString())).ToArray <string>());
     try
     {
         GClass26.smethod_3((IEnumerable <DirectoryInfo>) new DirectoryInfo(Path.Combine(string_4, "DATA_3DS")).GetDirectories("*.*", System.IO.SearchOption.AllDirectories));
     }
     catch
     {
     }
     GClass26.smethod_1("http://wiiu.titlekeys.gq/rss");
     GClass26.smethod_1("http://3ds.titlekeys.gq/rss");
     GClass3.smethod_4();
     GClass28.dictionary_1.Clear();
     GClass28.dictionary_2.Clear();
     GClass28.dictionary_3.Clear();
     GClass28.string_5 = (string[])null;
 }
Ejemplo n.º 27
0
 public static void smethod_3()
 {
     GClass88.smethod_0("dl");
 }
Ejemplo n.º 28
0
 public static bool smethod_1(string string_1)
 {
     return(File.Exists(GClass88.smethod_11(string_1)));
 }
Ejemplo n.º 29
0
        private static void Main(string[] args)
        {
            try
            {
                Class7.smethod_2();
                ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
            }
            catch
            {
            }
            if (string.IsNullOrEmpty(Settings.Default.AppId))
            {
                Settings.Default.AppId = Guid.NewGuid().ToString();
                Settings.Default.Save();
            }
            GClass88.smethod_13(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\USB_HELPER\\");
            Class108.smethod_1();
            AppDomain.CurrentDomain.UnhandledException += (UnhandledExceptionEventHandler)((sender, e) =>
            {
                Class108.smethod_1();
                Exception exceptionObject = e.ExceptionObject as Exception;
                string str1 = "NONE";
                try
                {
                    str1 = new ComputerInfo().OSFullName;
                }
                catch
                {
                }
                try
                {
                    if (exceptionObject != null)
                    {
                        string str2 = "NONE";
                        if (GClass28.gclass30_0 != null)
                        {
                            str2 = GClass28.gclass30_0.TitleId.IdRaw + "v" + GClass28.gclass30_0.Version ?? "0";
                        }
                        Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
                        string str3 = Class102.string_0 ?? ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
                        GClass6.smethod_19(string.Format("{0}/postBug.php", (object)Class67.String_4), new NameValueCollection()
                        {
                            {
                                "bug_target_site",
                                exceptionObject.ToString()
                            },
                            {
                                "bug_message",
                                exceptionObject.Message
                            },
                            {
                                "bug_stacktrace",
                                exceptionObject.StackTrace
                            },
                            {
                                "app_version",
                                str3 ?? ""
                            },
                            {
                                "os_revision",
                                str1
                            },
                            {
                                "data_path",
                                Settings.Default.Path
                            },
                            {
                                "extraction_path",
                                Settings.Default.ExtractFolder ?? ""
                            },
                            {
                                "last_unpacking_title",
                                str2
                            }
                        });
                        if (exceptionObject.Message.Contains("Nullable object must have a value."))
                        {
                            if (Class112.bool_1)
                            {
                                return;
                            }
                            Class112.bool_1 = true;
                            System.Windows.Forms.Application.Restart();
                            return;
                        }
                    }
                }
                catch
                {
                }
                if (exceptionObject is UnauthorizedAccessException)
                {
                    int num1 = (int)new frmException().ShowDialog();
                }
                else if (exceptionObject is FileNotFoundException && exceptionObject.Message.Contains("Telerik"))
                {
                    int num2 = (int)new frmDownloadDotNet().ShowDialog();
                }
                else
                {
                    int num3 = (int)new frmUnhandledException(exceptionObject).ShowDialog();
                }
                GClass9.smethod_0();
                System.Windows.Forms.Application.Exit();
            });
            if (args.Length == 1)
            {
                Class102.string_0 = args[0];
            }
            if (!ApplicationDeployment.IsNetworkDeployed && Class102.string_0 == null)
            {
                int num = (int)RadMessageBox.Show("You cannot execute this application directly. Please use the default shortcut on your desktop or execute Updater.exe");
                System.Windows.Forms.Application.Exit();
            }
            else
            {
                foreach (string resourcePath in ((IEnumerable <string>)Assembly.GetExecutingAssembly().GetManifestResourceNames()).Where <string>((Func <string, bool>)(string_0 => Path.GetExtension(string_0) == ".tssp")))
                {
                    ThemeResolutionService.LoadPackageResource(resourcePath);
                }
                System.Windows.Forms.Application.EnableVisualStyles();
                if (Settings.Default.ThemeName == "VisualStudio2012Dark")
                {
                    Settings.Default.ThemeName = "DarkBlue";
                }
                if (Settings.Default.ThemeName == "VisualStudio2012Light")
                {
                    Settings.Default.ThemeName = "Light";
                }
                Settings.Default.Save();
                ThemeResolutionService.ApplicationThemeName = Settings.Default.ThemeName;
                if (Settings.Default.LaunchCount == 0 && !Class112.smethod_0())
                {
                    int num = (int)new frmSupportOver().ShowDialog();
                    System.Windows.Forms.Application.Exit();
                    Environment.Exit(0);
                }
                else
                {
                    if (Settings.Default.Region == "NONE")
                    {
                        Class112.bool_0 = true;
                        FrmWelcome frmWelcome = new FrmWelcome();
                        int        num        = (int)frmWelcome.ShowDialog();
                        if (frmWelcome.bool_0)
                        {
                            Class108.smethod_1();
                            System.Windows.Forms.Application.Exit();
                            return;
                        }
                    }
                    using (Mutex mutex = new Mutex(true, "Global\\WIIU_USB_HELPER"))
                    {
                        try
                        {
                            if (!mutex.WaitOne(0, true))
                            {
                                int num = (int)RadMessageBox.Show("An instance of WiiU USB Helper is already running.");
                                return;
                            }
                        }
                        catch (AbandonedMutexException ex)
                        {
                        }
                        SystemEvents.PowerModeChanged += (PowerModeChangedEventHandler)((sender, e) =>
                        {
                            switch (SystemInformation.PowerStatus.BatteryChargeStatus)
                            {
                            case BatteryChargeStatus.Charging:
                                Class108.smethod_0();
                                break;

                            case BatteryChargeStatus.NoSystemBattery:
                                Class108.smethod_0();
                                break;

                            default:
                                Class108.smethod_1();
                                break;
                            }
                        });
                        Class108.smethod_0();
                        Class91.smethod_0();
                        System.Windows.Forms.Application.Run((Form) new NusGrabberForm());
                        Class91.smethod_1();
                        Class108.smethod_1();
                    }
                }
            }
        }
Ejemplo n.º 30
0
 internal static string Combine_Cache_Dir_With_String_1(this string string_1)
 {
     return(GClass88.Combine_Cache_Dir_With_String(string_1));
 }