public void LoadData() { Save.ExtractME1Package(0, "load.upk"); ME1Package pcc = MEPackageHandler.OpenME1Package("load.upk"); File.Delete("load.upk"); byte[] buff = pcc.Exports[1].Data; List <PropertyReader.Property> props = PropertyReader.getPropList(pcc.Exports[1]); foreach (PropertyReader.Property p in props) { string name = pcc.getNameEntry(p.Name); switch (name) { case "m_nResourceCredits": textBox1.Text = BitConverter.ToInt32(buff, p.offend - 4).ToString(); break; case "m_nResourceGrenades": textBox2.Text = BitConverter.ToInt32(buff, p.offend - 4).ToString(); break; case "m_fResourceMedigel": textBox3.Text = BitConverter.ToSingle(buff, p.offend - 4).ToString(); break; case "m_fResourceSalvage": textBox4.Text = BitConverter.ToSingle(buff, p.offend - 4).ToString(); break; } } textBox5.Text = BitConverter.ToInt32(Save.Files[1].memory.ToArray(), 0x4A7).ToString(); //Paragon textBox6.Text = BitConverter.ToInt32(Save.Files[1].memory.ToArray(), 0x4A3).ToString(); //Renegade }