Exemplo n.º 1
0
        private static string smethod_9(GClass32 gclass32_0)
        {
            string string_1 = (string)null;

            try
            {
                try
                {
                    string string_0 = string.Format("{0}/res/emulators/banners/{1}.png", (object)Class67.CDNWiiUUSBHelperURL, (object)gclass32_0.TitleId.IdRaw);
                    string_1 = System.IO.Path.Combine(GClass128.String_0, gclass32_0.TitleId.IdRaw + ".banner.png");
                    new GClass78().method_5(string_0, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                    return(string_1);
                }
                catch
                {
                    string_1 = (string)null;
                }
                string html1 = new GClass78().Download_File_UTF8("http://steambanners.booru.org/index.php?page=post&s=list&tags=" + GClass30.smethod_3(GClass30.smethod_3(gclass32_0.Name.ToLower())).Replace(' ', '+'));
                HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
                htmlDocument.LoadHtml(html1);
                IEnumerable <string> source = htmlDocument.DocumentNode.Descendants("a").Where <HtmlNode>((Func <HtmlNode, bool>)(htmlNode_0 => htmlNode_0.Attributes.Contains("id"))).Select <HtmlNode, string>((Func <HtmlNode, string>)(htmlNode_0 => htmlNode_0.Attributes["href"].Value)).Where <string>((Func <string, bool>)(string_0 => string_0.Contains("index.php?page=post")));
                if (source.Any <string>())
                {
                    string html2 = new GClass78().Download_File_UTF8("http://steambanners.booru.org/" + HtmlEntity.DeEntitize(source.ElementAt <string>(0)));
                    htmlDocument.LoadHtml(html2);
                    string string_0_1 = htmlDocument.DocumentNode.Descendants("img").Where <HtmlNode>((Func <HtmlNode, bool>)(htmlNode_0 => htmlNode_0.Attributes.Contains("src"))).Select <HtmlNode, string>((Func <HtmlNode, string>)(htmlNode_0 => htmlNode_0.Attributes["src"].Value)).Where <string>((Func <string, bool>)(string_0 => string_0.Contains("img.booru.org/steambanners//images"))).ElementAt <string>(0);
                    string_1 = System.IO.Path.Combine(GClass128.String_0, gclass32_0.TitleId.IdRaw + ".banner.png");
                    new GClass78().method_5(string_0_1, string_1, 0UL, GClass78.GEnum4.const_0, (WebProxy)null, 0L, (byte[])null, (byte[])null, (byte)0);
                }
            }
            catch
            {
            }
            return(string_1);
        }
Exemplo n.º 2
0
        private void FrmHallOfFame_Load(object sender, EventArgs e)
        {
            List <string> stringList = new List <string>();

            this.txtFame.BackColor = this.BackColor;
            string str1 = new GClass78().Download_File_UTF8(string.Format("{0}/getContributors.php", (object)Class67.RegistrationWiiUUSBHelperURL));

            char[] separator = new char[1] {
                '\n'
            };
            int num = 1;

            foreach (string str2 in str1.Split(separator, (StringSplitOptions)num))
            {
                if (str2.Substring(0, 1) == "!")
                {
                    str2 = str2.Substring(1);
                    stringList.Add(str2);
                }
                RichTextBox txtFame = this.txtFame;
                txtFame.Text = txtFame.Text + str2 + "\n";
            }
            foreach (string str2 in stringList)
            {
                this.txtFame.Find(str2);
                this.txtFame.SelectionColor = Color.Gold;
            }
            this.txtFame.SelectAll();
            this.txtFame.SelectionAlignment = HorizontalAlignment.Center;
            this.timer_0.Start();
        }
Exemplo n.º 3
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);
     }
 }
Exemplo n.º 4
0
        private TMDExcractionAndProcessing method_15(GClass30 gclass30_0, bool bool_5 = true)
        {
            this.method_17("Downloading TMD...");
            string path = Path.Combine(gclass30_0.OutputPath, "title.tmd");

            if (!bool_5 && gclass30_0.Tmd != null)
            {
                return(gclass30_0.Tmd);
            }
            GClass78 gclass78 = new GClass78();

            byte[] numArray = (byte[])null;
            try
            {
                numArray       = !(gclass30_0 is GClass33) ? gclass78.DownloadFile(gclass30_0.CDN_URL_PLUS_TITLEID + "tmd") : gclass78.DownloadFile(string.Format("{0}tmd.{1}", (object)gclass30_0.CDN_URL_PLUS_TITLEID, (object)gclass30_0.Version));
                gclass30_0.Tmd = TMDExcractionAndProcessing.ReadTMDBytes(numArray, gclass30_0.System);
            }
            catch (Exception ex)
            {
                this.method_5("TMD not found\n" + ex.ToString() + "\n" + ex.InnerException?.ToString());
            }
            if (bool_5)
            {
                System.IO.File.WriteAllBytes(path, numArray);
            }
            return(gclass30_0.Tmd);
        }
Exemplo n.º 5
0
        public GClass13 method_15()
        {
            if (this.System != GEnum3.const_1)
            {
                throw new Exception("The FST can only be retrieved for WUP titles.");
            }
            GClass100 gclass100 = !(this is GClass33) ? GClass100.smethod_1(new GClass78().method_2(string.Format("{0}tmd", (object)this.String_1)), GEnum3.const_1) : GClass100.smethod_1(new GClass78().method_2(string.Format("{0}tmd.{1}", (object)this.String_1, (object)this.Version)), GEnum3.const_1);
            GClass99  gclass99  = this is GClass33 || this.Platform == Platform.Wii_U_Custom ? GClass99.smethod_7(new GClass78().method_2(this.String_1 + "cetk"), GEnum3.const_1) : (!this.bool_0 ? GClass99.smethod_7(this.TicketArray, GEnum3.const_1) : GClass99.smethod_7(File.ReadAllBytes(Path.Combine(Path.Combine(GClass88.CachePath, "tickets"), this.TitleId.IdRaw + ".tik")), GEnum3.const_1));

            byte[] inputBuffer = new GClass78().method_2(this.String_1 + gclass100.GClass101_0[0].ContentId.ToString("x8"));
            using (AesCryptoServiceProvider cryptoServiceProvider = new AesCryptoServiceProvider())
            {
                cryptoServiceProvider.Key     = gclass99.Byte_0;
                cryptoServiceProvider.Mode    = CipherMode.CBC;
                cryptoServiceProvider.Padding = PaddingMode.None;
                cryptoServiceProvider.IV      = new byte[16];
                return(new GClass13(cryptoServiceProvider.CreateDecryptor().TransformFinalBlock(inputBuffer, 0, inputBuffer.Length)));
            }
        }
Exemplo n.º 6
0
        public GClass13 method_15()
        {
            if (this.System != SystemType.SystemWiiU)
            {
                throw new Exception("The FST can only be retrieved for WUP titles.");
            }
            TMDExcractionAndProcessing gclass100 = !(this is GClass33) ? TMDExcractionAndProcessing.ReadTMDBytes(new GClass78().DownloadFile(string.Format("{0}tmd", (object)this.CDN_URL_PLUS_TITLEID)), SystemType.SystemWiiU) : TMDExcractionAndProcessing.ReadTMDBytes(new GClass78().DownloadFile(string.Format("{0}tmd.{1}", (object)this.CDN_URL_PLUS_TITLEID, (object)this.Version)), SystemType.SystemWiiU);
            GClass99 gclass99 = this is GClass33 || this.Platform == Platform.Wii_U_Custom ? GClass99.smethod_7(new GClass78().DownloadFile(this.CDN_URL_PLUS_TITLEID + "cetk"), SystemType.SystemWiiU) : (!this.bool_0 ? GClass99.smethod_7(this.TicketArray, SystemType.SystemWiiU) : GClass99.smethod_7(File.ReadAllBytes(Path.Combine(Path.Combine(GClass88.DirectoryCache, "tickets"), this.TitleId.IdRaw + ".tik")), SystemType.SystemWiiU));

            byte[] inputBuffer = new GClass78().DownloadFile(this.CDN_URL_PLUS_TITLEID + gclass100.GClass101_0[0].ContentId.ToString("x8"));
            using (AesCryptoServiceProvider cryptoServiceProvider = new AesCryptoServiceProvider())
            {
                cryptoServiceProvider.Key     = gclass99.Byte_0;
                cryptoServiceProvider.Mode    = CipherMode.CBC;
                cryptoServiceProvider.Padding = PaddingMode.None;
                cryptoServiceProvider.IV      = new byte[16];
                return(new GClass13(cryptoServiceProvider.CreateDecryptor().TransformFinalBlock(inputBuffer, 0, inputBuffer.Length)));
            }
        }
Exemplo n.º 7
0
 private string Get_Custom_Or_Official_WiiU_JSON(string Region)
 {
     try
     {
         int      index    = 0;
         GClass78 gclass78 = new GClass78()
         {
             DownloadAsJSON = true
         };
         if (this.System == SystemType.SystemWii)
         {
             return(gclass78.Download_File_UTF8(string.Format("{0}/wii/info/json/{1}/info", (object)Class67.CDNWiiUUSBHelperURL, (object)this.TitleId.IdRaw)));
         }
         if (this.Platform == Platform.Wii_U_Custom || this.Boolean_0)
         {
             return(gclass78.Download_File_UTF8(string.Format("{0}/wiiu/info/US/{1}", (object)Class67.CDNWiiUUSBHelperURL, (object)this.TitleId.IdRaw)));
         }
         string str1 = gclass78.Download_Metadata_From_Nintendo_as_XML(string.Format("https://samurai.ctr.shop.nintendo.net/samurai/ws/{0}/title/{1}/?shop_id=2", (object)Region, (object)this.EshopId), 604800);
         if (str1 != "")
         {
             return(str1);
         }
         for (; index < GClass32.RegionList.Length; ++index)
         {
             if (GClass32.RegionList[index] != Region)
             {
                 string str2 = gclass78.Download_Metadata_From_Nintendo_as_XML(string.Format("https://samurai.ctr.shop.nintendo.net/samurai/ws/{0}/title/{1}/?shop_id=2", (object)GClass32.RegionList[index], (object)this.EshopId), 604800);
                 if (str2 != "")
                 {
                     return(str2);
                 }
             }
         }
     }
     catch
     {
     }
     return((string)null);
 }
Exemplo n.º 8
0
 private string method_27(string string_15)
 {
     try
     {
         int      index    = 0;
         GClass78 gclass78 = new GClass78()
         {
             bool_0 = true
         };
         if (this.System == GEnum3.const_3)
         {
             return(gclass78.method_6(string.Format("{0}/wii/info/json/{1}/info", (object)Class67.String_2, (object)this.TitleId.IdRaw)));
         }
         if (this.Platform == Platform.Wii_U_Custom || this.Boolean_0)
         {
             return(gclass78.method_6(string.Format("{0}/wiiu/info/US/{1}", (object)Class67.String_2, (object)this.TitleId.IdRaw)));
         }
         string str1 = gclass78.method_7(string.Format("https://samurai.ctr.shop.nintendo.net/samurai/ws/{0}/title/{1}/?shop_id=2", (object)string_15, (object)this.EshopId), 604800);
         if (str1 != "")
         {
             return(str1);
         }
         for (; index < GClass32.string_11.Length; ++index)
         {
             if (GClass32.string_11[index] != string_15)
             {
                 string str2 = gclass78.method_7(string.Format("https://samurai.ctr.shop.nintendo.net/samurai/ws/{0}/title/{1}/?shop_id=2", (object)GClass32.string_11[index], (object)this.EshopId), 604800);
                 if (str2 != "")
                 {
                     return(str2);
                 }
             }
         }
     }
     catch
     {
     }
     return((string)null);
 }
Exemplo n.º 9
0
        private void method_8(object object_0, Class58 class58_0)
        {
            GClass78 gclass78 = (GClass78)object_0;

            if (!this.bool_1)
            {
                this.method_5("Network lost");
            }
            if (!this.bool_0)
            {
                this.gclass78_0.method_0();
            }
            this.gstruct3_0 = gclass78.DownloadSpeed;
            ulong ulong0 = this.gstruct3_0.ulong_0;

            if (ulong0 > this.MaxSpeed)
            {
                this.MaxSpeed = ulong0;
            }
            try
            {
                this.timeSpan_1 = GStruct3.smethod_1(this.dataSize_0.Diff(gclass78.TotalDownloadedCurrentGame), this.gstruct3_0);
                this.timeSpan_2 = GStruct3.smethod_1(this.dataSize_1.Diff(gclass78.TotalDataDownloaded), this.gstruct3_0);
                this.timeSpan_0 = GStruct3.smethod_1(new DataSize((ulong)class58_0.long_2).Diff(new DataSize((ulong)class58_0.long_1)), this.gstruct3_0);
                this.int_4      = GClass80.smethod_0(this.dataSize_0, gclass78.TotalDownloadedCurrentGame);
                this.int_5      = GClass80.smethod_0(this.dataSize_1, gclass78.TotalDataDownloaded);
                this.int_3      = (int)((double)class58_0.long_1 / (double)class58_0.long_2 * 100.0);
                if (this.int_1++ == 8)
                {
                    this.list_0.Add((int)this.gstruct3_0.ulong_0);
                    this.int_1 = 0;
                }
                this.method_16(this.int_4, this.int_5, this.int_3, this.timeSpan_1, this.timeSpan_2, this.timeSpan_0, this.gstruct3_0, (GClass30)null);
            }
            catch
            {
            }
        }
Exemplo n.º 10
0
 private static void smethod_1(string string_4)
 {
     try
     {
         string      xml         = new GClass78().Download_Metadata_From_Nintendo_as_XML(string_4, 7200);
         XmlDocument xmlDocument = new XmlDocument();
         xmlDocument.LoadXml(xml);
         foreach (XmlNode xmlNode in xmlDocument.GetElementsByTagName("description"))
         {
             string innerXml = xmlNode.InnerXml;
             if (!(innerXml == "<![CDATA[Newest Keys]]>"))
             {
                 TitleId key = new TitleId(innerXml.Substring(9, 16));
                 if (GClass28.dictionary_0.ContainsKey(key))
                 {
                     GClass28.list_3.Add(GClass28.dictionary_0[key]);
                 }
             }
         }
     }
     catch
     {
     }
 }
Exemplo n.º 11
0
 public static void smethod_18()
 {
     try
     {
         string path = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Updater.exe");
         string str  = new GClass78().Download_File_UTF8(string.Format("{0}/Updater.hash", (object)Class67.ApplicationWiiUUSBHelperURL));
         using (SHA256 shA256 = SHA256.Create())
         {
             if (File.Exists(path) && Convert.ToBase64String(shA256.ComputeHash(File.ReadAllBytes(path))) == str)
             {
                 return;
             }
             byte[] numArray = new GClass78().DownloadFile(string.Format("{0}/Updater.exe", (object)Class67.ApplicationWiiUUSBHelperURL));
             if (!(Convert.ToBase64String(shA256.ComputeHash(numArray)) == str))
             {
                 return;
             }
             File.WriteAllBytes(path, numArray);
         }
     }
     catch
     {
     }
 }
Exemplo n.º 12
0
 private void cmdSavelink_Click(object sender, EventArgs e)
 {
     this.txtUrl.Text = this.txtUrl.Text.Trim();
     if (this.txtUrl.Text.Contains("wiiu.titlekeys.com"))
     {
         int num = (int)RadMessageBox.Show("This textbox is not meant to be used with this site. Please look below.");
         this.txtUrl.Text = "";
     }
     else
     {
         GClass78 gclass78 = new GClass78();
         try
         {
             gclass78.method_2(this.txtUrl.Text);
             this.FileLocationWiiU = this.txtUrl.Text;
             this.DialogResult     = DialogResult.OK;
             this.Close();
         }
         catch
         {
             int num = (int)RadMessageBox.Show("Sorry but the link you have provided seems invalid.");
         }
     }
 }
Exemplo n.º 13
0
        private GClass80.Enum1 method_14(GClass30 gclass30_0)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GClass80.Class63 class63 = new GClass80.Class63();
            // ISSUE: reference to a compiler-generated field
            class63.gclass30_0 = gclass30_0;
            // ISSUE: reference to a compiler-generated field
            GEnum2 genum20 = class63.gclass30_0.GEnum2_0;

            this.gclass78_0.method_9();
            this.timeSpan_1 = new TimeSpan(0L);
            this.timeSpan_0 = new TimeSpan(0L);
            this.gstruct3_0 = new GStruct3(0UL);
            // ISSUE: reference to a compiler-generated field
            class63.gclass30_0.CurrentlyDownloaded = true;
            // ISSUE: reference to a compiler-generated field
            if (!Directory.Exists(class63.gclass30_0.OutputPath))
            {
                // ISSUE: reference to a compiler-generated field
                Directory.CreateDirectory(class63.gclass30_0.OutputPath);
            }
            // ISSUE: reference to a compiler-generated field
            if (class63.gclass30_0.Boolean_0)
            {
                // ISSUE: reference to a compiler-generated field
                return(this.method_12((GClass32)class63.gclass30_0));
            }
            // ISSUE: reference to a compiler-generated field
            TMDExcractionAndProcessing gclass100_0 = this.method_15(class63.gclass30_0, true);
            // ISSUE: reference to a compiler-generated field
            GClass99 gclass99 = this.method_11(class63.gclass30_0);

            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (class63.gclass30_0.System == SystemType.SystemWiiU || class63.gclass30_0.System == SystemType.SystemWii)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                this.method_9(class63.gclass30_0, gclass100_0, class63.gclass30_0.OutputPath);
            }
            this.dataSize_0 = gclass100_0.DataSize_0;
            this.method_17(string.Format("Content size is {0}", (object)this.dataSize_0));
            // ISSUE: reference to a compiler-generated field
            this.method_16(0, this.int_5, 0, this.timeSpan_1, this.timeSpan_2, this.timeSpan_0, new GStruct3(0UL), class63.gclass30_0);
label_7:
            for (int index = 0; index < (int)gclass100_0.NumOfContents; ++index)
            {
                bool flag1 = false;
                if (!this.bool_0)
                {
                    return(GClass80.Enum1.const_1);
                }
                GClass101 gclass101_0;
                DataSize  size;
                while (true)
                {
                    gclass101_0 = gclass100_0.GClass101_0[index];
                    this.method_17(string.Format("Downloading Content #{0} ({1:x8}) of {2}... ({3})", (object)(index + 1), (object)gclass101_0.ContentId, (object)gclass100_0.NumOfContents, (object)gclass101_0.ContentSize));
                    // ISSUE: reference to a compiler-generated field
                    string string_0 = Path.Combine(class63.gclass30_0.OutputPath, gclass101_0.ContentId.ToString("x8"));
                    ulong  num1     = 0;
                    GClass6.smethod_6(string_0 + ".app.partial");
                    if (System.IO.File.Exists(string_0 + ".app"))
                    {
                        goto label_35;
                    }
label_9:
                    try
                    {
                        int num2 = (int)Class64.SetThreadExecutionState(2147483649U);
                        this.method_17("Downloading content...");
                        if (gclass101_0.Boolean_0)
                        {
                            // ISSUE: reference to a compiler-generated field
                            int num3 = (int)this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_0, 0UL);
                        }
                        bool flag2 = false;
                        // ISSUE: reference to a compiler-generated field
                        if (class63.gclass30_0 is GClass33 && gclass101_0.Boolean_0)
                        {
                            // 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 method
                            foreach (GClass30 gclass30 in class63.gclass30_0.GClass32_0.Updates.Where <GClass33>(class63.func_0 ?? (class63.func_0 = new Func <GClass33, bool>(class63.method_0))))
                            {
                                string str1 = Path.Combine(gclass30.OutputPath, gclass101_0.ContentId.ToString("x8"));
                                string str2 = str1 + ".app";
                                string path = str1 + ".h3";
                                if (System.IO.File.Exists(path) && System.IO.File.Exists(str2) && System.IO.File.ReadAllBytes(path).smethod_5(System.IO.File.ReadAllBytes(string_0 + ".h3")))
                                {
                                    long length = new FileInfo(str2).Length;
                                    size = gclass101_0.ContentSize;
                                    long totalBytes1 = (long)size.TotalBytes;
                                    if (length == totalBytes1)
                                    {
                                        this.method_17("Found similar file in older update. Copying...");
                                        System.IO.File.Copy(str2, string_0 + ".app", true);
                                        GClass78 gclass780             = this.gclass78_0;
                                        DataSize downloadedCurrentGame = gclass780.TotalDownloadedCurrentGame;
                                        size = gclass101_0.ContentSize;
                                        long totalBytes2 = (long)size.TotalBytes;
                                        gclass780.TotalDownloadedCurrentGame = downloadedCurrentGame + (ulong)totalBytes2;
                                        this.gclass78_0.TotalDataDownloaded += gclass101_0.ContentSize;
                                        flag2 = true;
                                        break;
                                    }
                                }
                            }
                        }
                        if (!flag2)
                        {
                            // ISSUE: reference to a compiler-generated field
                            if (this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_1, num1) == GClass80.Enum1.const_1)
                            {
                                return(GClass80.Enum1.const_1);
                            }
                            if (this.bool_2)
                            {
                                if (gclass101_0.Boolean_0)
                                {
                                    if (genum20 != GEnum2.const_2)
                                    {
                                        goto label_7;
                                    }
                                }
                                this.method_17("Verifying download...");
                                this.method_13(true);
                                // ISSUE: reference to a compiler-generated field
                                GStruct7 gstruct7 = Class85.smethod_4(class63.gclass30_0, gclass101_0, gclass99.Byte_0);
                                this.method_13(false);
                                if (!gstruct7.Boolean_0)
                                {
                                    this.gclass78_0.TotalDataDownloaded        -= gclass101_0.ContentSize;
                                    this.gclass78_0.TotalDownloadedCurrentGame -= gclass101_0.ContentSize;
                                    continue;
                                }
                                goto label_7;
                            }
                            else
                            {
                                goto label_7;
                            }
                        }
                        else
                        {
                            goto label_7;
                        }
                    }
                    catch (Exception ex)
                    {
                        bool         flag2 = false;
                        WebException webException;
                        if ((webException = ex as WebException) != null && webException.Status == WebExceptionStatus.ProtocolError && webException.Response != null)
                        {
                            flag2 = ((HttpWebResponse)webException.Response).StatusCode == HttpStatusCode.NotFound;
                        }
                        if (!flag2)
                        {
                            this.method_17(string.Format("Downloading Content #{0} of {1} failed...", (object)(index + 1), (object)gclass100_0.NumOfContents));
                            this.method_17(ex.Message);
                            // ISSUE: reference to a compiler-generated field
                            class63.gclass30_0.CurrentlyDownloaded = false;
                            this.method_5("Downloading Content Failed:\n" + ex.Message);
                            goto label_48;
                        }
                        else
                        {
                            this.method_17(string.Format("Downloading Content #{0} of {1} failed... (File not on NUS)", (object)(index + 1), (object)gclass100_0.NumOfContents));
                            goto label_48;
                        }
                    }
label_35:
                    num1 = (ulong)new FileInfo(string_0 + ".app").Length;
                    this.method_17("Local file detected. Checking size...");
                    long num4 = (long)num1;
                    size = gclass101_0.ContentSize;
                    long totalBytes = (long)size.TotalBytes;
                    if (num4 == totalBytes)
                    {
                        this.method_17("Sizes match. Checking file....");
                        if (gclass101_0.Boolean_0 && !System.IO.File.Exists(string_0 + ".h3"))
                        {
                            // ISSUE: reference to a compiler-generated field
                            int num2 = (int)this.method_10(class63.gclass30_0, gclass101_0, string_0, GClass80.Enum0.const_0, 0UL);
                        }
                        if (this.bool_3)
                        {
                            this.method_13(true);
                            // ISSUE: reference to a compiler-generated field
                            GStruct7 gstruct7 = Class85.smethod_4(class63.gclass30_0, gclass101_0, gclass99.Byte_0);
                            this.method_13(false);
                            if (!gstruct7.Boolean_0)
                            {
                                // ISSUE: reference to a compiler-generated field
                                if (gclass101_0.Boolean_0 && class63.gclass30_0.Platform != Platform.Wii_U_Custom && !flag1)
                                {
                                    this.method_17(string.Format("File has {0} corrupted block(s) for a total of  {1} bytes", (object)gstruct7.list_0.Count, (object)(gstruct7.list_0.Count * 65536)));
                                    this.method_17("Attempting repair. This may take a while depending on the state of the file.");
                                    string str = gclass101_0.ContentId.ToString("x8");
                                    // ISSUE: reference to a compiler-generated field
                                    // ISSUE: reference to a compiler-generated field
                                    GClass78.smethod_0(class63.gclass30_0.String_1 + str, string_0 + ".app", System.IO.File.ReadAllBytes(string_0 + ".h3"), class63.gclass30_0.Ticket.Byte_0, (IEnumerable <int>)gstruct7.list_0);
                                    flag1 = true;
                                }
                                else
                                {
                                    this.method_17("This file is corrupted but cannot be repaired. Now redownloading...");
                                    GClass6.smethod_6(string_0 + ".app");
                                }
                            }
                            else
                            {
                                break;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }
                    else
                    {
                        size = gclass101_0.ContentSize;
                        if (size.TotalBytes < num1)
                        {
                            this.method_17("This file does not qualify for intelligent resuming. Redownloading...");
                            GClass6.smethod_6(string_0 + ".app");
                        }
                        else
                        {
                            this.method_17(string.Format("Sizes mismatch. Resuming download at {0}", (object)new DataSize(num1)));
                            goto label_9;
                        }
                    }
                }
                this.method_17("This file is good, skipping...");
                GClass78 gclass780_1            = this.gclass78_0;
                DataSize downloadedCurrentGame1 = gclass780_1.TotalDownloadedCurrentGame;
                size = gclass101_0.ContentSize;
                long totalBytes3 = (long)size.TotalBytes;
                gclass780_1.TotalDownloadedCurrentGame = downloadedCurrentGame1 + (ulong)totalBytes3;
                this.gclass78_0.TotalDataDownloaded   += gclass101_0.ContentSize;
                continue;
label_48:
                GC.Collect();
            }
            // ISSUE: reference to a compiler-generated field
            this.method_17(string.Format("Downloading Title {0} v{1} Finished...", (object)class63.gclass30_0.TitleId, (object)gclass100_0.TitleVersion));
            // ISSUE: reference to a compiler-generated field
            this.method_16(100, this.int_5, 100, new TimeSpan(0L), this.timeSpan_2, new TimeSpan(0L), this.gstruct3_0, class63.gclass30_0);
            return(GClass80.Enum1.const_0);
        }