예제 #1
0
 public Class17(string Curren_Game_Path, GClass30 gclass30_1)
 {
     if (!Directory.Exists(Curren_Game_Path))
     {
         Directory.CreateDirectory(Curren_Game_Path);
     }
     if (gclass30_1.System != SystemType.SystemWiiU)
     {
         throw new ArgumentException("Only wup titles are compatible");
     }
     this.Current_Game_Path = Curren_Game_Path;
     Directory.CreateDirectory(this.Current_Game_Path);
     this.gclass30_0           = gclass30_1;
     this.gclass95_0           = this.gclass30_0.method_14(false);
     this.gclass95_0.Boolean_1 = true;
     try
     {
         this.list_0 = JsonConvert.DeserializeObject <List <string> >(File.ReadAllText(this.String_0));
     }
     catch
     {
         this.list_0 = new List <string>();
     }
     this.gclass13_0 = gclass30_1.method_15();
     this.class9_0   = new Class9(this.gclass30_0);
     foreach (GClass12 file in this.gclass13_0.Files)
     {
         this.method_0(file);
     }
 }
예제 #2
0
        // Token: 0x06000028 RID: 40 RVA: 0x000177B4 File Offset: 0x000159B4
        public static bool smethod_0(string string_0)
        {
            Class9.Interface4 @interface = null;
            int num = Class9.CreateAssemblyCache(out @interface, 0U);

            if (num != 0)
            {
                return(false);
            }
            num = @interface.imethod_4(0U, string_0, IntPtr.Zero);
            return(num == 0);
        }
예제 #3
0
 private void method_1(RadTreeNode radTreeNode_0, GClass13 gclass13_3, Class9 class9_3)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     frmDownloadSpecificFiles.Class134 class134 = new frmDownloadSpecificFiles.Class134();
     // ISSUE: reference to a compiler-generated field
     class134.radTreeNode_0 = radTreeNode_0;
     // ISSUE: reference to a compiler-generated field
     class134.frmDownloadSpecificFiles_0 = this;
     // ISSUE: reference to a compiler-generated field
     class134.class9_0 = class9_3;
     // ISSUE: reference to a compiler-generated field
     this.lblFullPath.Text = class134.radTreeNode_0.FullPath;
     this.grpPreview.Controls.Clear();
     // ISSUE: reference to a compiler-generated field
     if (class134.radTreeNode_0.Nodes.Count == 0)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         frmDownloadSpecificFiles.Class135 class135 = new frmDownloadSpecificFiles.Class135();
         // ISSUE: reference to a compiler-generated field
         class135.class134_0 = class134;
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated field
         // ISSUE: reference to a compiler-generated method
         class135.gclass12_0 = gclass13_3.Files.Find(new Predicate <GClass12>(class135.class134_0.method_0));
         // ISSUE: reference to a compiler-generated field
         this.lblSize.Text = new DataSize((ulong)class135.gclass12_0.uint_2).ToString();
         // ISSUE: reference to a compiler-generated method
         Task.Run(new Action(class135.method_0));
     }
     else
     {
         this.lblSize.Text = "";
     }
 }
예제 #4
0
        protected void method_2(GClass32 gclass32_1)
        {
            TitleId   titleId    = new TitleId(this.ToInject.TitleId.IdRaw.Replace("00050000F", "000500001").Replace("000500002", "000500001"));
            Class9    class9     = new Class9((GClass30)gclass32_1);
            GClass13  gclass13   = gclass32_1.method_15();
            string    str        = Encoding.UTF8.GetString(class9.method_0(gclass13.Files.First <GClass12>((Func <GClass12, bool>)(gclass12_0 => gclass12_0.string_1 == "meta.xml")), 0UL));
            XDocument xdocument1 = XDocument.Parse(Encoding.UTF8.GetString(class9.method_0(gclass13.Files.First <GClass12>((Func <GClass12, bool>)(gclass12_0 => gclass12_0.string_1 == "app.xml")), 0UL)).Trim('\xFEFF'));

            xdocument1.Document.Descendants((XName)"title_id").ElementAt <XElement>(0).Value = titleId.IdRaw;
            xdocument1.Save(this.method_4("rawFiles\\code\\app.xml"));
            string[] strArray = new string[12]
            {
                "ja",
                "en",
                "fr",
                "de",
                "it",
                "es",
                "zhs",
                "ko",
                "nl",
                "pt",
                "ru",
                "zht"
            };
            XDocument xdocument2 = XDocument.Parse(str.Trim('\xFEFF'));

            xdocument2.Document.Descendants((XName)"title_id").ElementAt <XElement>(0).Value     = titleId.IdRaw;
            xdocument2.Document.Descendants((XName)"product_code").ElementAt <XElement>(0).Value = this.ToInject.ProductId;
            foreach (XElement xelement in xdocument2.Document.Descendants().Where <XElement>((Func <XElement, bool>)(xelement_0 => xelement_0.Name.LocalName.Contains("publisher_"))))
            {
                xelement.Value = "Hikari06";
            }
            foreach (XElement xelement in xdocument2.Document.Descendants().Where <XElement>((Func <XElement, bool>)(xelement_0 => xelement_0.Name.LocalName.Contains("longname_"))))
            {
                xelement.Value = this.Name;
            }
            foreach (XElement xelement in xdocument2.Document.Descendants().Where <XElement>((Func <XElement, bool>)(xelement_0 => xelement_0.Name.LocalName.Contains("shortname_"))))
            {
                xelement.Value = this.Name;
            }
            foreach (XElement xelement in xdocument2.Document.Descendants().Where <XElement>((Func <XElement, bool>)(xelement_0 => xelement_0.Name.LocalName.Contains("pc_"))))
            {
                xelement.Value = "0";
            }
            try
            {
                if (this.UseGamepad)
                {
                    xdocument2.Document.Descendants((XName)"drc_use").ElementAt <XElement>(0).Value = "65537";
                }
                else
                {
                    xdocument2.Document.Descendants((XName)"drc_use").ElementAt <XElement>(0).Value = "0";
                }
            }
            catch
            {
            }
            xdocument2.Save(this.method_4("rawFiles\\meta\\meta.xml"));
        }
예제 #5
0
 public bool method_16(string string_7, bool bool_6, bool bool_7 = false, IEnumerable <GClass12> ienumerable_0 = null, bool bool_8 = false)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     GClass30.Class49 class49 = new GClass30.Class49();
     // ISSUE: reference to a compiler-generated field
     class49.bool_0      = false;
     GClass28.gclass30_0 = this;
     if (bool_6)
     {
         string_7 = Path.Combine(string_7, this.method_12());
     }
     if (this.System == GEnum3.const_1)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         GClass30.Class50 class50 = new GClass30.Class50();
         // ISSUE: reference to a compiler-generated field
         class50.class49_0 = class49;
         try
         {
             DriveInfo driveInfo          = new DriveInfo(Path.GetPathRoot(string_7));
             long      availableFreeSpace = driveInfo.AvailableFreeSpace;
             DataSize  size       = this.Size;
             long      totalBytes = (long)size.TotalBytes;
             if ((ulong)availableFreeSpace < (ulong)totalBytes)
             {
                 string format = "There isn't enough space left of {0}. Please free {1}.";
                 string name   = driveInfo.Name;
                 size = this.Size;
                 // ISSUE: variable of a boxed type
                 __Boxed <DataSize> local = (ValueType) new DataSize(size.TotalBytes - (ulong)driveInfo.AvailableFreeSpace);
                 int num = (int)RadMessageBox.Show(string.Format(format, (object)name, (object)local));
                 return(false);
             }
         }
         catch
         {
         }
         Directory.CreateDirectory(string_7);
         if (this.Boolean_0)
         {
             int num = (int)RadMessageBox.Show("Injectable titles cannot be unpacked");
             return(false);
         }
         // ISSUE: reference to a compiler-generated field
         class50.frmUnpackAnimation_0 = new frmUnpackAnimation(this);
         Class9 class9 = new Class9(this);
         // ISSUE: reference to a compiler-generated method
         class9.Event_1 += new EventHandler <GStruct0>(class50.method_0);
         // ISSUE: reference to a compiler-generated field
         class50.bool_0 = false;
         // ISSUE: reference to a compiler-generated method
         class9.Event_0 += new EventHandler <bool>(class50.method_1);
         // ISSUE: reference to a compiler-generated method
         class9.Event_2 += new EventHandler <Exception>(class50.method_2);
         if (ienumerable_0 != null)
         {
             class9.method_1(string_7, bool_7, ienumerable_0.ToList <GClass12>(), bool_8);
         }
         else
         {
             class9.method_1(string_7, bool_7, (List <GClass12>)null, bool_8);
         }
         // ISSUE: reference to a compiler-generated field
         if (!class50.bool_0)
         {
             // ISSUE: reference to a compiler-generated field
             int num1 = (int)class50.frmUnpackAnimation_0.ShowDialog();
         }
         try
         {
             if (this is GClass32 & bool_6)
             {
                 if (!string_7.Contains("EMULATORS"))
                 {
                     string path = Path.Combine(string_7, "meta", "meta.xml");
                     if (File.Exists(path))
                     {
                         XmlDocument xmlDocument = new XmlDocument();
                         xmlDocument.LoadXml(File.ReadAllText(path));
                         string innerText = xmlDocument.GetElementsByTagName("company_code")[0].InnerText;
                         string name      = new DirectoryInfo(string_7).Name;
                         string newName   = name.Substring(0, name.IndexOf("[")) + "[" + ((GClass32)this).ProductId + innerText.Substring(2) + "]";
                         FileSystem.RenameDirectory(string_7, newName);
                     }
                 }
             }
         }
         catch
         {
         }
     }
     else if (this.System == GEnum3.const_0)
     {
         GClass28.gclass30_0 = (GClass30)null;
         return(false);
     }
     GClass28.gclass30_0 = (GClass30)null;
     // ISSUE: reference to a compiler-generated field
     return(class49.bool_0);
 }