示例#1
0
        private GClass99 method_11(GClass30 gclass30_0)
        {
            this.method_17("Fetching Ticket...");
            string str = Path.Combine(gclass30_0.OutputPath, "title.tik");

            if (gclass30_0.Platform != Platform.Wii_U_Custom && (!(gclass30_0 is GClass33) || gclass30_0.System != SystemType.SystemWiiU))
            {
                if (!gclass30_0.bool_0)
                {
                    this.method_17("Generating ticket");
                    System.IO.File.WriteAllBytes(str, gclass30_0.TicketArray);
                    return(gclass30_0.Ticket);
                }
                this.method_17("Downloading ticket from that site");
                byte[] bytes = System.IO.File.ReadAllBytes(Path.Combine(Path.Combine(GClass88.DirectoryCache, "tickets"), gclass30_0.TitleId.IdRaw + ".tik"));
                gclass30_0.TicketArray = bytes;
                System.IO.File.WriteAllBytes(str, bytes);
                gclass30_0.Ticket = GClass99.smethod_7(gclass30_0.TicketArray, gclass30_0.System);
                return(gclass30_0.Ticket);
            }
            this.method_17("Downloading Ticket from NUS");
            this.gclass78_0.method_5(string.Format("{0}cetk", (object)gclass30_0.CDN_URL_PLUS_TITLEID), str, 0UL, GClass78.GEnum4.const_0, this.Proxy, 0L, (byte[])null, (byte[])null, (byte)0);
            gclass30_0.TicketArray = System.IO.File.ReadAllBytes(str);
            gclass30_0.Ticket      = GClass99.smethod_6(str, gclass30_0.System);
            return(gclass30_0.Ticket);
        }
示例#2
0
        private GClass32 method_1(TitleId titleId_0, string string_5, string string_6, string string_7, DataSize dataSize_0)
        {
            GClass32 gclass32 = new GClass32(string_5, titleId_0, "ALL", (byte[])null, dataSize_0, (List <GClass33>)null, "0", "CTR-P-CTAP", "", "http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/", Platform.Unknown, GEnum3.const_0);

            gclass32.CfwOnly       = true;
            gclass32.TicketArray   = GClass99.smethod_0(titleId_0.IdRaw, string_7, 0);
            gclass32.byte_0        = string_6.smethod_6();
            gclass32.Ticket        = GClass99.smethod_7(gclass32.TicketArray, GEnum3.const_0);
            gclass32.Ticket.Byte_0 = string_6.smethod_6();
            return(gclass32);
        }
示例#3
0
 private GClass99 method_5()
 {
     if (this.gclass30_0 is GClass33 || this.gclass30_0.Platform == Platform.Wii_U_Custom)
     {
         return(GClass99.smethod_7(new GClass78().DownloadFile(this.gclass30_0.CDN_URL_PLUS_TITLEID + "cetk"), SystemType.SystemWiiU));
     }
     if (this.gclass30_0.bool_0)
     {
         return(GClass99.smethod_7(new GClass78().DownloadFile(this.gclass30_0.string_0), SystemType.SystemWiiU));
     }
     return(GClass99.smethod_7(this.gclass30_0.TicketArray, SystemType.SystemWiiU));
 }
示例#4
0
 private GClass99 method_5()
 {
     if (this.gclass30_0 is GClass33 || this.gclass30_0.Platform == Platform.Wii_U_Custom)
     {
         return(GClass99.smethod_7(new GClass78().method_2(this.gclass30_0.String_1 + "cetk"), GEnum3.const_1));
     }
     if (this.gclass30_0.bool_0)
     {
         return(GClass99.smethod_7(new GClass78().method_2(this.gclass30_0.string_0), GEnum3.const_1));
     }
     return(GClass99.smethod_7(this.gclass30_0.TicketArray, GEnum3.const_1));
 }
示例#5
0
 protected GClass30(string string_7, TitleId titleId_1, string string_8, byte[] byte_2, DataSize dataSize_1, string string_9, GEnum3 genum3_1)
 {
     this.Name        = string_7;
     this.TitleId     = titleId_1;
     this.Region      = string_8;
     this.TicketArray = byte_2;
     if (this.TicketArray != null)
     {
         this.Ticket = GClass99.smethod_7(byte_2, genum3_1);
     }
     this.Size = dataSize_1;
     this.RootDownloadLocation = string_9;
     this.System = genum3_1;
 }
示例#6
0
        private void method_3(Stream stream_0)
        {
            int num1 = 0;

            for (int index = 0; index < this.gclass100_0.GClass101_0.Length - 1; ++index)
            {
                num1 += GClass27.smethod_0((int)this.gclass100_0.GClass101_0[index].Size.TotalBytes, 64);
            }
            this.gclass108_0.UInt32_0 = (uint)num1 + (uint)(int)this.gclass100_0.GClass101_0[this.gclass100_0.GClass101_0.Length - 1].Size.TotalBytes;
            byte[] buffer1  = File.ReadAllBytes(this.string_2);
            byte[] buffer2  = File.ReadAllBytes(this.string_0);
            byte[] numArray = File.ReadAllBytes(this.string_1);
            GClass99.smethod_7(numArray, GEnum3.const_3);
            this.gclass108_0.UInt32_2 = (uint)(484 + this.gclass100_0.GClass101_0.Length * 36);
            this.gclass108_0.UInt32_1 = 0U;
            stream_0.Seek(0L, SeekOrigin.Begin);
            this.gclass108_0.method_0(stream_0);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(buffer2, 0, buffer2.Length);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(numArray, 0, numArray.Length);
            stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
            stream_0.Write(buffer1, 0, (int)this.gclass108_0.UInt32_2);
            byte[] buffer3 = new byte[4096];
            long   num2    = 0;

            foreach (GClass101 gclass101_0 in this.gclass100_0.GClass101_0)
            {
                stream_0.Seek((long)GClass27.smethod_0((int)stream_0.Position, 64), SeekOrigin.Begin);
                using (FileStream fileStream = File.OpenRead(this.method_2(gclass101_0)))
                {
                    int count;
                    do
                    {
                        count = fileStream.Read(buffer3, 0, buffer3.Length);
                        stream_0.Write(buffer3, 0, count);
                        num2 += (long)count;
                    }while (count > 0);
                }
                this.method_4((int)((double)num2 / (double)this.gclass108_0.UInt32_0 * 100.0));
            }
            while (stream_0.Position % 64L != 0L)
            {
                stream_0.WriteByte((byte)0);
            }
        }
示例#7
0
 public byte[] method_0(GClass12 gclass12_0, ulong ulong_2 = 0)
 {
     if (this.gclass100_0 == null || this.gclass99_0 == null)
     {
         this.gclass100_0 = TMDExcractionAndProcessing.ReadTMDBytes(new GClass78().DownloadFile(this.gclass30_0.CDN_URL_PLUS_TITLEID + "tmd"), SystemType.SystemWiiU);
         this.gclass99_0  = this.method_5();
     }
     if (gclass12_0.bool_1 || gclass12_0.bool_0)
     {
         return((byte[])null);
     }
     using (MemoryStream memoryStream = new MemoryStream())
     {
         this.method_2(gclass12_0, (Stream)memoryStream, true, ulong_2);
         return(memoryStream.ToArray());
     }
 }
示例#8
0
 public byte[] method_0(GClass12 gclass12_0, ulong ulong_2 = 0)
 {
     if (this.gclass100_0 == null || this.gclass99_0 == null)
     {
         this.gclass100_0 = GClass100.smethod_1(new GClass78().method_2(this.gclass30_0.String_1 + "tmd"), GEnum3.const_1);
         this.gclass99_0  = this.method_5();
     }
     if (gclass12_0.bool_1 || gclass12_0.bool_0)
     {
         return((byte[])null);
     }
     using (MemoryStream memoryStream = new MemoryStream())
     {
         this.method_2(gclass12_0, (Stream)memoryStream, true, ulong_2);
         return(memoryStream.ToArray());
     }
 }
示例#9
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)));
            }
        }
示例#10
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)));
            }
        }
示例#11
0
        public static List <GStruct7> smethod_1(GClass30 gclass30_0)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            Class85.Class86 class86 = new Class85.Class86();
            // ISSUE: reference to a compiler-generated field
            class86.gclass30_0 = gclass30_0;
            // ISSUE: reference to a compiler-generated field
            string str1 = Path.Combine(class86.gclass30_0.OutputPath, "title.tmd");
            // ISSUE: reference to a compiler-generated field
            string str2 = Path.Combine(class86.gclass30_0.OutputPath, "title.tik");

            // ISSUE: reference to a compiler-generated field
            if (File.Exists(str1) && (class86.gclass30_0.Ticket != null || File.Exists(str2)))
            {
                if (!File.Exists(str1))
                {
                    return(((IEnumerable <GStruct7>) new GStruct7[1]
                    {
                        new GStruct7((GClass101)null, new List <int>(), false, true)
                    }).ToList <GStruct7>());
                }
                // ISSUE: reference to a compiler-generated field
                TMDExcractionAndProcessing gclass100 = TMDExcractionAndProcessing.smethod_0(str1, class86.gclass30_0.System);
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                class86.gclass99_0 = class86.gclass30_0.Ticket ?? GClass99.smethod_6(str2, class86.gclass30_0.System);
                // ISSUE: reference to a compiler-generated method
                return(((IEnumerable <GClass101>)gclass100.GClass101_0).Select <GClass101, GStruct7>(new Func <GClass101, GStruct7>(class86.method_0)).ToList <GStruct7>());
            }
            return(((IEnumerable <GStruct7>) new GStruct7[1]
            {
                new GStruct7((GClass101)null, new List <int>(), false, true)
            }).ToList <GStruct7>());
        }
示例#12
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);
        }
示例#13
0
        public void method_2()
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            Class72.Class75 class75 = new Class72.Class75();
            // ISSUE: reference to a compiler-generated field
            class75.class72_0 = this;
            // ISSUE: reference to a compiler-generated field
            class75.frmWait_0 = new FrmWait("USB Helper is preparing the ticket cache", true);
            // ISSUE: reference to a compiler-generated method
            Task.Run(new Action(class75.method_0));
            // ISSUE: reference to a compiler-generated field
            class75.frmWait_0.TopMost = true;
            // ISSUE: reference to a compiler-generated field
            int num1 = (int)class75.frmWait_0.ShowDialog();

            if (this.string_0 != "")
            {
                List <Class72.Class73> source = JsonConvert.DeserializeObject <List <Class72.Class73> >(this.string_0);
                foreach (Class72.Class73 class73 in source.Where <Class72.Class73>((Func <Class72.Class73, bool>)(class73_0 =>
                {
                    if (class73_0.encTitleKey != null && class73_0.titleID != null)
                    {
                        return(new TitleId(class73_0.titleID).IdType == GEnum1.const_0);
                    }
                    return(false);
                })))
                {
                    TitleId key = new TitleId(class73.titleID);
                    if (GClass28.dictionary_3.ContainsKey(key))
                    {
                        for (int index = 0; index < GClass28.dictionary_3[key].Count; ++index)
                        {
                            GClass80.GStruct5 gstruct5 = GClass28.dictionary_3[key][index];
                            GClass28.dictionary_3[key][index] = new GClass80.GStruct5()
                            {
                                dataSize_0 = gstruct5.dataSize_0,
                                titleId_0  = gstruct5.titleId_0,
                                string_0   = gstruct5.string_0,
                                string_2   = class73.titleKey,
                                string_1   = class73.encTitleKey
                            };
                        }
                    }
                }
                foreach (Class72.Class73 class73 in source.Where <Class72.Class73>((Func <Class72.Class73, bool>)(class73_0 =>
                {
                    if (class73_0.encTitleKey != null && class73_0.titleID != null)
                    {
                        return(new TitleId(class73_0.titleID).IdType == GEnum1.const_2);
                    }
                    return(false);
                })))
                {
                    TitleId key = new TitleId(class73.titleID);
                    if (GClass28.dictionary_1.ContainsKey(key))
                    {
                        GClass80.GStruct4 gstruct4  = GClass28.dictionary_1[key];
                        string            string_7  = HttpUtility.HtmlDecode(class73.name.Trim()).Replace("\n", " ");
                        string            str       = class73.region.Trim();
                        TitleId           titleId_1 = key;
                        string            string_8  = str;
                        // ISSUE: variable of the null type
                        __Null   local      = null;
                        DataSize dataSize0  = gstruct4.dataSize_0;
                        string   string_9   = "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/";
                        int      num2       = 0;
                        GClass31 gclass31_1 = new GClass31(string_7, titleId_1, string_8, (byte[])local, dataSize0, string_9, (GEnum3)num2);
                        gclass31_1.CfwOnly     = true;
                        gclass31_1.TicketArray = GClass99.smethod_0((string)key, class73.encTitleKey, 1);
                        gclass31_1.byte_0      = class73.titleKey.smethod_6();
                        GClass31 gclass31_2 = gclass31_1;
                        gclass31_2.Ticket        = GClass99.smethod_7(gclass31_2.TicketArray, GEnum3.const_0);
                        gclass31_2.Ticket.Byte_0 = class73.titleKey.smethod_6();
                        GClass28.list_6.Add(gclass31_2);
                    }
                }
                foreach (Class72.Class73 class73 in source.Where <Class72.Class73>((Func <Class72.Class73, bool>)(class73_0 =>
                {
                    if (class73_0.encTitleKey != null)
                    {
                        return(class73_0.titleID != null);
                    }
                    return(false);
                })))
                {
                    TitleId index = new TitleId(class73.titleID);
                    if (index.IdRaw == "0004009B00010202")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC1", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00010402")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC2", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00014002")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC3", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00014102")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC4", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00014202")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC5", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00014302")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC6", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "000400DB00010302")
                    {
                        GClass28.list_0.Add(this.method_1(index, "ARC7", class73.titleKey, class73.encTitleKey, new DataSize(1UL)));
                    }
                    if (index.IdRaw == "0004009B00014002")
                    {
                        GClass28.gclass32_0 = this.method_1(index, "Shared Font", class73.titleKey, class73.encTitleKey, new DataSize(1466880UL));
                    }
                    if ((index.IdType == GEnum1.const_3 || index.IdType == GEnum1.const_4) && GClass28.dictionary_2.ContainsKey(index))
                    {
                        DbRow           dbRow    = GClass28.dictionary_2[index];
                        string          str      = HttpUtility.HtmlDecode(class73.name.Trim()).Replace("\n", " ");
                        string          string_8 = class73.region.Trim();
                        List <GClass33> list_2   = new List <GClass33>();
                        if (GClass28.dictionary_3.ContainsKey(new TitleId((string)index.FullUpdate)))
                        {
                            foreach (GClass80.GStruct5 gstruct5 in GClass28.dictionary_3[index.FullUpdate])
                            {
                                if (gstruct5.string_2 != null && gstruct5.string_1 != null)
                                {
                                    GClass33 gclass33_1 = new GClass33(str, gstruct5.titleId_0, string_8, (byte[])null, gstruct5.dataSize_0, gstruct5.string_0, "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/", GEnum3.const_0);
                                    gclass33_1.CfwOnly = true;
                                    GClass33 gclass33_2 = gclass33_1;
                                    gclass33_2.TicketArray   = GClass99.smethod_0((string)gstruct5.titleId_0, gstruct5.string_1, int.Parse(gstruct5.string_0));
                                    gclass33_2.byte_0        = gstruct5.string_2.smethod_6();
                                    gclass33_2.Ticket        = GClass99.smethod_7(gclass33_2.TicketArray, GEnum3.const_0);
                                    gclass33_2.Ticket.Byte_0 = gstruct5.string_2.smethod_6();
                                    list_2.Add(gclass33_2);
                                }
                            }
                        }
                        GClass32 gclass32_1 = new GClass32(str, index, dbRow.Region, (byte[])null, dbRow.Size, list_2, dbRow.EshopId, dbRow.ProductCode, dbRow.IconUrl, "http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/", dbRow.Platform, GEnum3.const_0);
                        gclass32_1.CfwOnly = true;
                        GClass32 gclass32_2 = gclass32_1;
                        gclass32_2.TicketArray   = GClass99.smethod_0(index.IdRaw, class73.encTitleKey, 1);
                        gclass32_2.byte_0        = class73.titleKey.smethod_6();
                        gclass32_2.Ticket        = GClass99.smethod_7(gclass32_2.TicketArray, GEnum3.const_0);
                        gclass32_2.Ticket.Byte_0 = class73.titleKey.smethod_6();
                        GClass28.dictionary_0.Add(index, gclass32_2);
                    }
                }
            }
            if (!(this.string_1 != ""))
            {
                return;
            }
            foreach (Class72.Class74 class74 in this.method_0(this.string_1))
            {
                TitleId index = new TitleId(class74.titleID);
                if (GClass28.dictionary_2.ContainsKey(index))
                {
                    DbRow    dbRow      = GClass28.dictionary_2[index];
                    GClass32 gclass32_1 = new GClass32(class74.name, index, dbRow.Region, (byte[])null, dbRow.Size, new List <GClass33>(), dbRow.EshopId, dbRow.ProductCode, dbRow.IconUrl, "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/", dbRow.Platform, GEnum3.const_3);
                    gclass32_1.CfwOnly = true;
                    GClass32 gclass32_2 = gclass32_1;
                    byte[]   numArray   = GClass99.smethod_1((string)dbRow.TitleId, class74.titleKey, 0);
                    gclass32_2.TicketArray = numArray;
                    gclass32_2.Ticket      = GClass99.smethod_7(gclass32_2.TicketArray, GEnum3.const_3);
                    GClass28.dictionary_0.Add(dbRow.TitleId, gclass32_2);
                }
            }
        }