Exemplo n.º 1
0
 public GStruct7(GClass101 gclass101_1, List <int> list_1, bool bool_2, bool bool_3)
 {
     this.gclass101_0 = gclass101_1;
     this.list_0      = list_1;
     this.bool_1      = bool_2;
     this.bool_0      = bool_3;
 }
Exemplo n.º 2
0
        private static bool smethod_10(GClass30 gclass30_0, GClass101 gclass101_0, byte[] byte_1)
        {
            string str = Path.Combine(gclass30_0.OutputPath, gclass101_0.ContentId.ToString("x8") + ".app");

            byte[] numArray = Class85.smethod_9(gclass101_0.Index);
            byte[] byte_0;
            if (gclass30_0.System != SystemType.SystemWiiU && gclass30_0.System != SystemType.SystemWii)
            {
                if (gclass30_0.System != SystemType.System3DS)
                {
                    throw new NotImplementedException();
                }
                byte_0 = Class85.smethod_3(str, byte_1, numArray);
            }
            else
            {
                byte[] array = File.ReadAllBytes(str);
                Array.Resize <byte>(ref array, GClass27.smethod_0(array.Length, 16));
                byte_0 = SHA1.Create().ComputeHash(Class85.smethod_5(array, byte_1, numArray), 0, (int)gclass101_0.ContentSize.TotalBytes);
            }
            return(GClass27.smethod_1(byte_0, gclass101_0.Hash));
        }
Exemplo n.º 3
0
        private GClass80.Enum1 method_10(GClass30 gclass30_0, GClass101 gclass101_0, string string_0, GClass80.Enum0 enum0_0, ulong ulong_1 = 0)
        {
            string str = gclass101_0.ContentId.ToString("x8") + (enum0_0 == GClass80.Enum0.const_0 ? ".h3" : "");

            this.method_17(string.Format("Downloading of {0} initiated.", (object)str));
            if (this.Proxy != null)
            {
                this.method_17(string.Format("Using proxy {0}", (object)this.Proxy.Address));
            }
            if (enum0_0 == GClass80.Enum0.const_0)
            {
                this.gclass78_0.method_5(gclass30_0.CDN_URL_PLUS_TITLEID + str, string_0 + ".h3", ulong_1, GClass78.GEnum4.const_0, this.Proxy, 0L, (byte[])null, (byte[])null, (byte)0);
            }
            else if (gclass101_0.Boolean_0)
            {
                this.gclass78_0.method_5(gclass30_0.CDN_URL_PLUS_TITLEID + str, string_0 + ".app", ulong_1, GClass78.GEnum4.const_1, this.Proxy, (long)gclass101_0.ContentSize.TotalBytes, System.IO.File.ReadAllBytes(string_0 + ".h3"), gclass30_0.Ticket.Byte_0, (byte)gclass101_0.Index);
            }
            else
            {
                this.gclass78_0.method_5(gclass30_0.CDN_URL_PLUS_TITLEID + str, string_0 + ".app", ulong_1, GClass78.GEnum4.const_0, this.Proxy, (long)gclass101_0.ContentSize.TotalBytes, (byte[])null, (byte[])null, (byte)0);
            }
            return(!this.gclass78_0.bool_1 ? GClass80.Enum1.const_1 : GClass80.Enum1.const_0);
        }
Exemplo n.º 4
0
 private string method_2(GClass101 gclass101_0)
 {
     return(Path.Combine(this.string_3, gclass101_0.ContentId.ToString("x8") + ".app"));
 }
Exemplo n.º 5
0
        public static GStruct7 smethod_4(GClass30 gclass30_0, GClass101 gclass101_0, byte[] byte_1)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            Class85.Class87 class87 = new Class85.Class87();
            // ISSUE: reference to a compiler-generated field
            class87.byte_1 = byte_1;
            // ISSUE: reference to a compiler-generated field
            class87.gclass101_0 = gclass101_0;
            List <int> list_1 = new List <int>();
            // ISSUE: reference to a compiler-generated field
            string path1 = Path.Combine(gclass30_0.OutputPath, class87.gclass101_0.ContentId.ToString("x8") + ".app");
            // ISSUE: reference to a compiler-generated field
            string path2 = Path.Combine(gclass30_0.OutputPath, class87.gclass101_0.ContentId.ToString("x8") + ".h3");

            // ISSUE: reference to a compiler-generated field
            if (!class87.gclass101_0.Boolean_0)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (!Class85.smethod_10(gclass30_0, class87.gclass101_0, class87.byte_1))
                {
                    // ISSUE: reference to a compiler-generated field
                    return(new GStruct7(class87.gclass101_0, new List <int>(), false, true));
                }
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, new List <int>(), false, false));
            }
            if (!File.Exists(path2))
            {
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, list_1, true, true));
            }
            // ISSUE: reference to a compiler-generated field
            class87.byte_0 = File.ReadAllBytes(path2);
            // ISSUE: reference to a compiler-generated field
            // ISSUE: reference to a compiler-generated field
            if (!GClass27.smethod_1(SHA1.Create().ComputeHash(class87.byte_0), class87.gclass101_0.Hash))
            {
                // ISSUE: reference to a compiler-generated field
                return(new GStruct7(class87.gclass101_0, list_1, true, true));
            }
            using (FileStream fileStream = File.OpenRead(path1))
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                Class85.Class88 class88 = new Class85.Class88();
                // ISSUE: reference to a compiler-generated field
                class88.class87_0 = class87;
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                int int_5 = (int)(class88.class87_0.gclass101_0.Size.TotalBytes / 65536UL);
                int num1  = (int)Math.Ceiling((double)int_5 / 768.0);
                int num2  = 0;
                // ISSUE: reference to a compiler-generated field
                class88.bool_0 = Enumerable.Repeat <bool>(false, 3).ToArray <bool>();
                // ISSUE: reference to a compiler-generated field
                class88.list_0 = Enumerable.Repeat <List <int> >(new List <int>(), 3).ToArray <List <int> >();
                Thread[] threadArray = new Thread[3];
                for (int index = 0; index < 3; ++index)
                {
                    if (Class85.byte_0[index] == null)
                    {
                        Class85.byte_0[index] = new byte[16777216];
                    }
                }
                for (int index1 = 0; index1 < num1; ++index1)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    Class85.Class89 class89 = new Class85.Class89();
                    // ISSUE: reference to a compiler-generated field
                    class89.class88_0 = class88;
                    // ISSUE: reference to a compiler-generated field
                    class89.tuple_0 = Class85.smethod_11(int_5, 3, 256);
                    // ISSUE: reference to a compiler-generated field
                    int_5 -= class89.tuple_0.Item2;
                    for (int index2 = 0; index2 < 3; ++index2)
                    {
                        // ISSUE: object of a compiler-generated type is created
                        // ISSUE: variable of a compiler-generated type
                        Class85.Class90 class90 = new Class85.Class90();
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0 = class89;
                        // ISSUE: reference to a compiler-generated field
                        class90.int_0 = index2;
                        // ISSUE: reference to a compiler-generated field
                        class90.int_1 = num2;
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0.class88_0.bool_0[index2] = false;
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        class90.class89_0.class88_0.list_0[index2] = new List <int>();
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        fileStream.Read(Class85.byte_0[index2], 0, class90.class89_0.tuple_0.Item1[index2] * 65536);
                        if (Class85.byte_0[index2].Length != 0)
                        {
                            // ISSUE: reference to a compiler-generated method
                            threadArray[index2] = new Thread(new ThreadStart(class90.method_0))
                            {
                                IsBackground = true
                            };
                            threadArray[index2].Start();
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            class90.class89_0.class88_0.bool_0[index2] = true;
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            class90.class89_0.class88_0.list_0[index2] = new List <int>();
                        }
                        // ISSUE: reference to a compiler-generated field
                        // ISSUE: reference to a compiler-generated field
                        num2 += class90.class89_0.tuple_0.Item1[index2];
                    }
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    while (!Class85.smethod_7(class89.class88_0.bool_0))
                    {
                        Thread.Sleep(10);
                    }
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: reference to a compiler-generated field
                    foreach (List <int> intList in class89.class88_0.list_0)
                    {
                        list_1.AddRange((IEnumerable <int>)intList);
                    }
                }
            }
            // ISSUE: reference to a compiler-generated field
            return(new GStruct7(class87.gclass101_0, list_1, false, false));
        }