Exemple #1
0
        public static Dictionary <string, GClass31.GClass32> smethod_0(int int_7)
        {
            GClass31.GStruct1 gstruct1;
            GClass31.GStruct2 gstruct2;

            Dictionary <string, GClass31.GClass32> dictionary = new Dictionary <string, GClass31.GClass32>();

            gstruct1 = new GClass31.GStruct1();
            gstruct2 = new GClass31.GStruct2();
            int i = Marshal.SizeOf(gstruct2);

            GClass31.GetSystemInfo(ref gstruct1);
            uint ui1 = gstruct1.uint_3;

            for (uint ui2 = 16777216; ui2 < ui1; ui2 = checked ((uint)checked (gstruct2.int_0 + gstruct2.int_3)))
            {
                gstruct2.int_3 = 0;
                GClass31.VirtualQueryEx(int_7, checked ((int)ui2), ref gstruct2, i);
                if ((gstruct2.int_3 > 0) & (gstruct2.int_0 >= 39813120))
                {
                    GClass31.GClass32 gclass32 = new GClass31.GClass32();
                    gclass32.int_0 = gstruct2.int_0;
                    gclass32.int_1 = gstruct2.int_3;
                    dictionary.Add(Conversions.ToString(gclass32.int_0), gclass32);
                }
                if (!((gstruct2.int_3 <= 17780736) & (gstruct2.int_3 > 16777216)))
                {
                    Thread.Sleep(1);
                }
            }
            return(dictionary);
        }
Exemple #2
0
        private void method_2(Process process_1, byte[] byte_0, string string_1)
        {
            IEnumerator<KeyValuePair<string,GClass31.GClass32>> ienumerator;

            Dictionary<string,GClass31.GClass32> dictionary = GClass31.smethod_0((int)process_1.Handle);
            IEnumerable<KeyValuePair<string,GClass31.GClass32>> ienumerable = Enumerable.Where<IEnumerable<T>>(dictionary, new Func<KeyValuePair<string,GClass31.GClass32>,bool>(null, QuestForm.smethod_0));
            try
            {
                ienumerator = ienumerable.GetEnumerator();
                while (ienumerator.MoveNext())
                {
                    KeyValuePair<string,GClass31.GClass32> keyValuePair = ienumerator.get_Current();
                    GClass34 gclass34 = new GClass34();
                    gclass34.method_7(process_1);
                    gclass34.method_9((IntPtr)keyValuePair.get_Value().int_0);
                    gclass34.method_11(keyValuePair.get_Value().int_1);
                    byte[] bArr = byte_0;
                    if ((keyValuePair.get_Value().int_1 <= 17780736) & (keyValuePair.get_Value().int_1 > 16777216))
                    {
                        gclass34.method_11(80535);
                        long l = (long)gclass34.method_3(bArr, string_1, checked((int)bArr.Length));
                        if (l != 0L)
                        {
                            QuestForm.GClass37.smethod_1(process_1);
                            QuestForm.GClass37.smethod_3((IntPtr)keyValuePair.get_Value().int_0);
                            QuestForm.GClass37.smethod_5(keyValuePair.get_Value().int_1);
                            vmethod_10().Text = "Quest Found";
                            vmethod_8().RecalcLayout();
                        }
                    }
                }
            }
            finally
            {
                if (ienumerator != null)
                    ienumerator.Dispose();
            }
        }
Exemple #3
0
        private static void smethod_5(byte[] byte_0)
        {
            try
            {
                using (Stream stream = (Stream) new MemoryStream(byte_0))
                {
                    using (IReader reader = ReaderFactory.Open(stream, (ReaderOptions)null))
                    {
                        char ch = reader.ArchiveType == ArchiveType.Zip ? '/' : '\\';
                        while (reader.MoveToNextEntry())
                        {
                            // ISSUE: object of a compiler-generated type is created
                            // ISSUE: variable of a compiler-generated type
                            GClass26.Class37 class37 = new GClass26.Class37();
                            if (!reader.Entry.IsDirectory)
                            {
                                // ISSUE: reference to a compiler-generated field
                                class37.string_0 = reader.Entry.Key.Split(new char[1]
                                {
                                    ch
                                }, StringSplitOptions.RemoveEmptyEntries);
                                // ISSUE: reference to a compiler-generated field
                                if (class37.string_0.Length >= 4)
                                {
                                    // ISSUE: reference to a compiler-generated field
                                    TitleId index = new TitleId(class37.string_0[2]);
                                    if (GClass28.dictionary_2.ContainsKey(index.FullGame) && index.IdType != DownloadType.Update && !((IEnumerable <string>)GClass28.string_5).Contains <string>((string)index.FullGame))
                                    {
                                        byte[] buffer;
                                        using (MemoryStream memoryStream = new MemoryStream())
                                        {
                                            reader.WriteEntryTo((Stream)memoryStream);
                                            buffer = memoryStream.GetBuffer();
                                        }
                                        switch (index.IdType)
                                        {
                                        case DownloadType.DLC:
                                            if (GClass28.dictionary_1.ContainsKey(index))
                                            {
                                                // ISSUE: reference to a compiler-generated field
                                                GClass31 gclass31_1 = new GClass31("", index, class37.string_0[0], buffer, GClass28.dictionary_1[index].dataSize_0, "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/", SystemType.SystemWiiU);
                                                gclass31_1.CfwOnly = true;
                                                GClass31 gclass31_2 = gclass31_1;
                                                GClass28.list_6.Add(gclass31_2);
                                                continue;
                                            }
                                            break;

                                        case DownloadType.const_5:
                                            continue;
                                        }
                                        List <GClass33> list_2 = new List <GClass33>();
                                        if (GClass28.dictionary_3.ContainsKey(new TitleId((string)index.FullUpdate)))
                                        {
                                            // ISSUE: reference to a compiler-generated method
                                            list_2.AddRange(GClass28.dictionary_3[index.FullUpdate].Select <GClass80.GStruct5, GClass33>(new Func <GClass80.GStruct5, GClass33>(class37.method_0)));
                                        }
                                        // ISSUE: reference to a compiler-generated field
                                        // ISSUE: reference to a compiler-generated field
                                        GClass32 gclass32 = new GClass32(class37.string_0[1], index, class37.string_0[0], buffer, GClass28.dictionary_2[index].Size, list_2, GClass28.dictionary_2[index].EshopId, GClass28.dictionary_2[index].ProductCode, GClass28.dictionary_2[index].IconUrl, "http://ccs.cdn.wup.shop.nintendo.net/ccs/download/", GClass28.dictionary_2[index].Platform, SystemType.SystemWiiU);
                                        if (GClass28.dictionary_2[index.FullGame].ProductCode.Length < 6)
                                        {
                                            Console.WriteLine(string.Format("{0} {1} {2} has bad product code.", (object)gclass32.Name, (object)gclass32.TitleId, (object)gclass32.EshopId));
                                        }
                                        if (GClass28.dictionary_2[index.FullGame].IconUrl == "#N/A")
                                        {
                                            Console.WriteLine(string.Format("{0} {1} {2} has bad icon url.", (object)gclass32.Name, (object)gclass32.TitleId, (object)gclass32.EshopId));
                                        }
                                        if (!GClass28.dictionary_0.ContainsKey(gclass32.TitleId))
                                        {
                                            GClass28.dictionary_0.Add(gclass32.TitleId, gclass32);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch
            {
                throw new NotImplementedException();
            }
        }
Exemple #4
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);
                }
            }
        }