New GUI, Image rendering, fixes

master
1987kostya 4 years ago
parent 9dd220a99f
commit 70f557bf45

@ -76,6 +76,9 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Reference Include="Be.Windows.Forms.HexBox, Version=1.6.0.18788, Culture=neutral, PublicKeyToken=e0e5adf0ebc99863">
<HintPath>C:\Users\ivani\Desktop\Be.HexEditor-1.6.0\sources\Be.Windows.Forms.HexBox\bin\Debug\Be.Windows.Forms.HexBox.dll</HintPath>
</Reference>
<Reference Include="Be.Windows.Forms.HexBox, Version=1.6.1.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll</HintPath>
<Private>True</Private>
@ -114,7 +117,9 @@
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@ -124,19 +129,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="GUI\ChunkNode.cs" />
<Compile Include="GUI\CryptoKeyForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\CryptoKeyForm.Designer.cs">
<DependentUpon>CryptoKeyForm.cs</DependentUpon>
</Compile>
<Compile Include="GUI\FrameViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\FrameViewer.Designer.cs">
<DependentUpon>FrameViewer.cs</DependentUpon>
</Compile>
<Compile Include="GUI\GUIComponents\ChunkNode.cs" />
<Compile Include="GUI\GUIComponents\ObjectBox.cs" />
<Compile Include="GUI\HexViewForm.cs">
<SubType>Form</SubType>
</Compile>
@ -149,19 +149,7 @@
<Compile Include="GUI\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="GUI\MFABuilderForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\MFABuilderForm.Designer.cs">
<DependentUpon>MFABuilderForm.cs</DependentUpon>
</Compile>
<Compile Include="GUI\ObjectBox.cs" />
<Compile Include="GUI\PackDataForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\PackDataForm.Designer.cs">
<DependentUpon>PackDataForm.cs</DependentUpon>
</Compile>
<Compile Include="MMFParser\EXE\Loaders\Objects\Movements.cs" />
<Compile Include="MMFParser\Translation\MFAGenerator.cs" />
<Compile Include="MMFParser\Translation\PAME2MFA.cs" />
<Compile Include="MMFParser\EXE\ChunkList.cs" />
@ -259,9 +247,6 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="GUI\CryptoKeyForm.resx">
<DependentUpon>CryptoKeyForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\FrameViewer.resx">
<DependentUpon>FrameViewer.cs</DependentUpon>
</EmbeddedResource>
@ -271,12 +256,6 @@
<EmbeddedResource Include="GUI\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\MFABuilderForm.resx">
<DependentUpon>MFABuilderForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GUI\PackDataForm.resx">
<DependentUpon>PackDataForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Joveler.ZLibWrapper.1.3.1\build\net45\Joveler.ZLibWrapper.targets" Condition="Exists('..\packages\Joveler.ZLibWrapper.1.3.1\build\net45\Joveler.ZLibWrapper.targets')" />

@ -1,133 +0,0 @@
using System.ComponentModel;
namespace DotNetCTFDumper.GUI
{
partial class CryptoKeyForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CryptoKeyForm));
this.charBox = new System.Windows.Forms.TextBox();
this.hexBox1 = new Be.Windows.Forms.HexBox();
this.plusButton = new System.Windows.Forms.Button();
this.minusButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// charBox
//
this.charBox.BackColor = System.Drawing.Color.Black;
this.charBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.charBox.Dock = System.Windows.Forms.DockStyle.Top;
this.charBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.charBox.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.charBox.Location = new System.Drawing.Point(0, 0);
this.charBox.Name = "charBox";
this.charBox.Size = new System.Drawing.Size(646, 20);
this.charBox.TabIndex = 0;
this.charBox.Text = "54";
this.charBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// hexBox1
//
this.hexBox1.BackColor = System.Drawing.Color.Black;
this.hexBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.hexBox1.ColumnInfoVisible = true;
this.hexBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.hexBox1.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.hexBox1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.hexBox1.LineInfoVisible = true;
this.hexBox1.Location = new System.Drawing.Point(0, 20);
this.hexBox1.Name = "hexBox1";
this.hexBox1.SelectionBackColor = System.Drawing.Color.FromArgb(((int) (((byte) (128)))), ((int) (((byte) (64)))), ((int) (((byte) (0)))));
this.hexBox1.SelectionForeColor = System.Drawing.Color.Red;
this.hexBox1.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int) (((byte) (100)))), ((int) (((byte) (60)))), ((int) (((byte) (188)))), ((int) (((byte) (255)))));
this.hexBox1.Size = new System.Drawing.Size(646, 329);
this.hexBox1.StringViewVisible = true;
this.hexBox1.TabIndex = 5;
this.hexBox1.VScrollBarVisible = true;
//
// plusButton
//
this.plusButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.plusButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.plusButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.plusButton.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.plusButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.plusButton.Location = new System.Drawing.Point(616, 0);
this.plusButton.Name = "plusButton";
this.plusButton.Size = new System.Drawing.Size(30, 20);
this.plusButton.TabIndex = 6;
this.plusButton.Text = "+";
this.plusButton.UseVisualStyleBackColor = false;
this.plusButton.Click += new System.EventHandler(this.plusButton_Click);
//
// minusButton
//
this.minusButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.minusButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.minusButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.minusButton.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.minusButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.minusButton.Location = new System.Drawing.Point(589, 0);
this.minusButton.Name = "minusButton";
this.minusButton.Size = new System.Drawing.Size(30, 20);
this.minusButton.TabIndex = 7;
this.minusButton.Text = "-";
this.minusButton.UseVisualStyleBackColor = false;
this.minusButton.Click += new System.EventHandler(this.minusButton_Click);
//
// CryptoKeyForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
this.BackColor = System.Drawing.SystemColors.ControlText;
this.ClientSize = new System.Drawing.Size(646, 349);
this.Controls.Add(this.minusButton);
this.Controls.Add(this.plusButton);
this.Controls.Add(this.hexBox1);
this.Controls.Add(this.charBox);
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Name = "CryptoKeyForm";
this.Text = "Encryption Key";
this.Load += new System.EventHandler(this.CryptoKeyForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Button minusButton;
private System.Windows.Forms.Button plusButton;
private Be.Windows.Forms.HexBox hexBox1;
private System.Windows.Forms.TextBox charBox;
#endregion
}
}

@ -1,67 +0,0 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using Be.Windows.Forms;
using DotNetCTFDumper.Utils;
namespace DotNetCTFDumper.GUI
{
public partial class CryptoKeyForm : Form
{
private string rawKey;
public CryptoKeyForm(string data,Color color)
{
InitializeComponent();
hexBox1.ForeColor = color;
hexBox1.InfoForeColor = Color.FromArgb(color.R/2, color.G/2, color.B/2);
hexBox1.SelectionForeColor=Color.FromArgb(color.R, color.G, color.B);
hexBox1.SelectionBackColor=Color.FromArgb(color.R/4, color.G/4, color.B/4);
hexBox1.ShadowSelectionColor=Color.FromArgb(150,color.R/4, color.G/4, color.B/4);
plusButton.ForeColor = color;
minusButton.ForeColor = color;
charBox.ForeColor = color;
rawKey = data;
}
private void CryptoKeyForm_Load(object sender, EventArgs e)
{
try
{
var previewKey = Decryption.MakeKeyFromBytes(rawKey, (byte) int.Parse((charBox.Text)));
hexBox1.ByteProvider=new DynamicByteProvider(previewKey);
}
catch
{
// ignored
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
try
{
var previewKey = Decryption.MakeKeyFromBytes(rawKey, (byte) int.Parse((charBox.Text)));
hexBox1.ByteProvider=new DynamicByteProvider(previewKey);
}
catch
{
}
}
private void plusButton_Click(object sender, EventArgs e)
{
charBox.Text = ((byte)int.Parse((charBox.Text))+1).ToString();
}
private void minusButton_Click(object sender, EventArgs e)
{
charBox.Text = ((byte)int.Parse((charBox.Text))-1).ToString();
}
}
}

File diff suppressed because it is too large Load Diff

@ -1,101 +0,0 @@
using System.ComponentModel;
namespace DotNetCTFDumper.GUI
{
partial class MFABuilderForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MFABuilderForm));
this.logBox = new System.Windows.Forms.TextBox();
this.DumpButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// logBox
//
this.logBox.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right)));
this.logBox.BackColor = System.Drawing.Color.Black;
this.logBox.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.logBox.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.logBox.Location = new System.Drawing.Point(384, 12);
this.logBox.Multiline = true;
this.logBox.Name = "logBox";
this.logBox.ReadOnly = true;
this.logBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.logBox.Size = new System.Drawing.Size(222, 299);
this.logBox.TabIndex = 0;
//
// DumpButton
//
this.DumpButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.DumpButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.DumpButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.DumpButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.DumpButton.Location = new System.Drawing.Point(12, 266);
this.DumpButton.Name = "DumpButton";
this.DumpButton.Size = new System.Drawing.Size(99, 45);
this.DumpButton.TabIndex = 1;
this.DumpButton.Text = "Dump MFA";
this.DumpButton.UseVisualStyleBackColor = true;
this.DumpButton.Click += new System.EventHandler(this.DumpButton_Click);
//
// label1
//
this.label1.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.label1.Location = new System.Drawing.Point(13, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(365, 88);
this.label1.TabIndex = 2;
this.label1.Text = "Super Ultimate Awesome Wonderful Decompiler";
//
// MFABuilderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(618, 323);
this.Controls.Add(this.label1);
this.Controls.Add(this.DumpButton);
this.Controls.Add(this.logBox);
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Name = "MFABuilderForm";
this.Text = "MFABuilderForm";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button DumpButton;
private System.Windows.Forms.TextBox logBox;
#endregion
}
}

@ -1,37 +0,0 @@
using System;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using DotNetCTFDumper.MMFParser.Translation;
namespace DotNetCTFDumper.GUI
{
public partial class MFABuilderForm : Form
{
public MFABuilderForm(Color color)
{
InitializeComponent();
foreach (Control control in Controls)
{
control.BackColor=Color.Black;
control.ForeColor = color;
if (control is Button)
{
control.BackColor=Color.FromArgb(30,30,30);
}
}
Pame2Mfa.TranslatingFrame += OnFrameTranslation;
}
public void OnFrameTranslation(object name)
{
logBox.AppendText($"Translating Frame: {name}\r\n");
}
private void DumpButton_Click(object sender, EventArgs e)
{
MFAGenerator.BuildMFA();
}
}
}

File diff suppressed because it is too large Load Diff

@ -41,23 +41,45 @@
this.soundLabel = new System.Windows.Forms.Label();
this.soundBar = new System.Windows.Forms.ProgressBar();
this.FolderBTN = new System.Windows.Forms.Button();
this.MFABtn = new System.Windows.Forms.Button();
this.soundsButton = new System.Windows.Forms.Button();
this.imagesButton = new System.Windows.Forms.Button();
this.loadingLabel = new System.Windows.Forms.Label();
this.cryptKeyBtn = new System.Windows.Forms.Button();
this.showHexBtn = new System.Windows.Forms.Button();
this.dumpSortedBtn = new System.Windows.Forms.Button();
this.ChunkCombo = new System.Windows.Forms.ContextMenuStrip(this.components);
this.saveChunkBtn = new System.Windows.Forms.ToolStripMenuItem();
this.viewHexBtn = new System.Windows.Forms.ToolStripMenuItem();
this.previewFrameBtn = new System.Windows.Forms.ToolStripMenuItem();
this.packDataBtn = new System.Windows.Forms.Button();
this.musicsButton = new System.Windows.Forms.Button();
this.musicBar = new System.Windows.Forms.ProgressBar();
this.musicLabel = new System.Windows.Forms.Label();
this.SortedProgressBar = new System.Windows.Forms.ProgressBar();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.mainTab = new System.Windows.Forms.TabPage();
this.mfaTab = new System.Windows.Forms.TabPage();
this.dumpMFAButton = new System.Windows.Forms.Button();
this.mfaLogBox = new System.Windows.Forms.TextBox();
this.packDataTab = new System.Windows.Forms.TabPage();
this.infoLabel = new System.Windows.Forms.Label();
this.dumpAllPackButton = new System.Windows.Forms.Button();
this.dumpPackButton = new System.Windows.Forms.Button();
this.packDataListBox = new System.Windows.Forms.ListBox();
this.cryptKeyTab = new System.Windows.Forms.TabPage();
this.minusCharButton = new System.Windows.Forms.Button();
this.plusCharBtn = new System.Windows.Forms.Button();
this.hexBox1 = new Be.Windows.Forms.HexBox();
this.charBox = new System.Windows.Forms.TextBox();
this.advDumpTab = new System.Windows.Forms.TabPage();
this.advancedPictureBox = new System.Windows.Forms.PictureBox();
this.advancedTreeView = new System.Windows.Forms.TreeView();
this.packDataDialog = new System.Windows.Forms.SaveFileDialog();
this.ChunkCombo.SuspendLayout();
this.tabControl1.SuspendLayout();
this.mainTab.SuspendLayout();
this.mfaTab.SuspendLayout();
this.packDataTab.SuspendLayout();
this.cryptKeyTab.SuspendLayout();
this.advDumpTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) (this.advancedPictureBox)).BeginInit();
this.SuspendLayout();
//
// button1
@ -66,7 +88,7 @@
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.button1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.button1.Location = new System.Drawing.Point(12, 12);
this.button1.Location = new System.Drawing.Point(8, 10);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(101, 23);
this.button1.TabIndex = 0;
@ -86,14 +108,13 @@
this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right)));
this.treeView1.BackColor = System.Drawing.Color.Black;
this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.treeView1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.treeView1.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.treeView1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.treeView1.Location = new System.Drawing.Point(642, 9);
this.treeView1.Location = new System.Drawing.Point(649, 8);
this.treeView1.Margin = new System.Windows.Forms.Padding(0);
this.treeView1.MaximumSize = new System.Drawing.Size(286, 900);
this.treeView1.MinimumSize = new System.Drawing.Size(286, 489);
this.treeView1.MaximumSize = new System.Drawing.Size(500, 900);
this.treeView1.Name = "treeView1";
this.treeView1.Size = new System.Drawing.Size(286, 489);
this.treeView1.Size = new System.Drawing.Size(286, 460);
this.treeView1.TabIndex = 1;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.DoubleClick += new System.EventHandler(this.treeView1_AfterDblClick);
@ -109,7 +130,7 @@
this.listBox1.FormattingEnabled = true;
this.listBox1.IntegralHeight = false;
this.listBox1.ItemHeight = 17;
this.listBox1.Location = new System.Drawing.Point(342, 9);
this.listBox1.Location = new System.Drawing.Point(349, 8);
this.listBox1.Margin = new System.Windows.Forms.Padding(0);
this.listBox1.MaximumSize = new System.Drawing.Size(300, 50000);
this.listBox1.MinimumSize = new System.Drawing.Size(180, 234);
@ -123,7 +144,7 @@
this.GameInfo.BackColor = System.Drawing.Color.Transparent;
this.GameInfo.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.GameInfo.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.GameInfo.Location = new System.Drawing.Point(9, 55);
this.GameInfo.Location = new System.Drawing.Point(8, 36);
this.GameInfo.Margin = new System.Windows.Forms.Padding(5, 0, 3, 0);
this.GameInfo.Name = "GameInfo";
this.GameInfo.Size = new System.Drawing.Size(182, 45);
@ -136,7 +157,7 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.label1.Location = new System.Drawing.Point(119, 15);
this.label1.Location = new System.Drawing.Point(115, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(176, 17);
this.label1.TabIndex = 4;
@ -147,9 +168,9 @@
this.imageBar.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.imageBar.BackColor = System.Drawing.Color.Black;
this.imageBar.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.imageBar.Location = new System.Drawing.Point(190, 367);
this.imageBar.Location = new System.Drawing.Point(95, 292);
this.imageBar.Name = "imageBar";
this.imageBar.Size = new System.Drawing.Size(126, 23);
this.imageBar.Size = new System.Drawing.Size(126, 24);
this.imageBar.Step = 2;
this.imageBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.imageBar.TabIndex = 8;
@ -162,7 +183,7 @@
this.imageLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.imageLabel.Font = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.imageLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.imageLabel.Location = new System.Drawing.Point(322, 367);
this.imageLabel.Location = new System.Drawing.Point(227, 292);
this.imageLabel.Name = "imageLabel";
this.imageLabel.Size = new System.Drawing.Size(126, 24);
this.imageLabel.TabIndex = 9;
@ -177,7 +198,7 @@
this.soundLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.soundLabel.Font = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.soundLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.soundLabel.Location = new System.Drawing.Point(322, 415);
this.soundLabel.Location = new System.Drawing.Point(227, 340);
this.soundLabel.Name = "soundLabel";
this.soundLabel.Size = new System.Drawing.Size(126, 24);
this.soundLabel.TabIndex = 11;
@ -190,7 +211,7 @@
this.soundBar.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.soundBar.BackColor = System.Drawing.Color.Black;
this.soundBar.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.soundBar.Location = new System.Drawing.Point(190, 415);
this.soundBar.Location = new System.Drawing.Point(95, 340);
this.soundBar.Name = "soundBar";
this.soundBar.Size = new System.Drawing.Size(126, 23);
this.soundBar.Step = 2;
@ -205,7 +226,7 @@
this.FolderBTN.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.FolderBTN.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.FolderBTN.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.FolderBTN.Location = new System.Drawing.Point(101, 309);
this.FolderBTN.Location = new System.Drawing.Point(6, 234);
this.FolderBTN.Name = "FolderBTN";
this.FolderBTN.Size = new System.Drawing.Size(83, 42);
this.FolderBTN.TabIndex = 12;
@ -214,22 +235,6 @@
this.FolderBTN.Visible = false;
this.FolderBTN.Click += new System.EventHandler(this.FolderBTN_Click);
//
// MFABtn
//
this.MFABtn.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MFABtn.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.MFABtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.MFABtn.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.MFABtn.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.MFABtn.Location = new System.Drawing.Point(12, 453);
this.MFABtn.Name = "MFABtn";
this.MFABtn.Size = new System.Drawing.Size(83, 42);
this.MFABtn.TabIndex = 13;
this.MFABtn.Text = "Generate MFA";
this.MFABtn.UseVisualStyleBackColor = false;
this.MFABtn.Visible = false;
this.MFABtn.Click += new System.EventHandler(this.MFABtn_Click);
//
// soundsButton
//
this.soundsButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -237,7 +242,7 @@
this.soundsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.soundsButton.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.soundsButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.soundsButton.Location = new System.Drawing.Point(101, 405);
this.soundsButton.Location = new System.Drawing.Point(6, 330);
this.soundsButton.Name = "soundsButton";
this.soundsButton.Size = new System.Drawing.Size(83, 42);
this.soundsButton.TabIndex = 14;
@ -253,7 +258,7 @@
this.imagesButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.imagesButton.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.imagesButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.imagesButton.Location = new System.Drawing.Point(101, 357);
this.imagesButton.Location = new System.Drawing.Point(6, 282);
this.imagesButton.Name = "imagesButton";
this.imagesButton.Size = new System.Drawing.Size(83, 42);
this.imagesButton.TabIndex = 15;
@ -265,44 +270,14 @@
// loadingLabel
//
this.loadingLabel.BackColor = System.Drawing.Color.Transparent;
this.loadingLabel.Font = new System.Drawing.Font("Courier New", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.loadingLabel.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.loadingLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.loadingLabel.Location = new System.Drawing.Point(119, 12);
this.loadingLabel.Location = new System.Drawing.Point(4, 10);
this.loadingLabel.Name = "loadingLabel";
this.loadingLabel.Size = new System.Drawing.Size(197, 91);
this.loadingLabel.Size = new System.Drawing.Size(110, 23);
this.loadingLabel.TabIndex = 16;
this.loadingLabel.Text = "Loading...";
//
// cryptKeyBtn
//
this.cryptKeyBtn.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.cryptKeyBtn.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.cryptKeyBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cryptKeyBtn.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.cryptKeyBtn.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.cryptKeyBtn.Location = new System.Drawing.Point(12, 357);
this.cryptKeyBtn.Name = "cryptKeyBtn";
this.cryptKeyBtn.Size = new System.Drawing.Size(83, 42);
this.cryptKeyBtn.TabIndex = 17;
this.cryptKeyBtn.Text = "Crypto Key";
this.cryptKeyBtn.UseVisualStyleBackColor = false;
this.cryptKeyBtn.Visible = false;
this.cryptKeyBtn.Click += new System.EventHandler(this.cryptKeyBtn_Click);
//
// showHexBtn
//
this.showHexBtn.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.showHexBtn.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.showHexBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.showHexBtn.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.showHexBtn.Location = new System.Drawing.Point(-171, 191);
this.showHexBtn.Name = "showHexBtn";
this.showHexBtn.Size = new System.Drawing.Size(180, 29);
this.showHexBtn.TabIndex = 18;
this.showHexBtn.Text = "Show hex";
this.showHexBtn.UseVisualStyleBackColor = false;
this.showHexBtn.Visible = false;
//
// dumpSortedBtn
//
this.dumpSortedBtn.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -310,7 +285,7 @@
this.dumpSortedBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpSortedBtn.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpSortedBtn.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.dumpSortedBtn.Location = new System.Drawing.Point(12, 405);
this.dumpSortedBtn.Location = new System.Drawing.Point(6, 426);
this.dumpSortedBtn.Name = "dumpSortedBtn";
this.dumpSortedBtn.Size = new System.Drawing.Size(83, 42);
this.dumpSortedBtn.TabIndex = 19;
@ -344,22 +319,6 @@
this.previewFrameBtn.Size = new System.Drawing.Size(151, 22);
this.previewFrameBtn.Text = "Preview Frame";
//
// packDataBtn
//
this.packDataBtn.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.packDataBtn.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.packDataBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.packDataBtn.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.packDataBtn.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.packDataBtn.Location = new System.Drawing.Point(12, 309);
this.packDataBtn.Name = "packDataBtn";
this.packDataBtn.Size = new System.Drawing.Size(83, 42);
this.packDataBtn.TabIndex = 20;
this.packDataBtn.Text = "Pack Data";
this.packDataBtn.UseVisualStyleBackColor = false;
this.packDataBtn.Visible = false;
this.packDataBtn.Click += new System.EventHandler(this.packDataBtn_Click);
//
// musicsButton
//
this.musicsButton.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@ -367,7 +326,7 @@
this.musicsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.musicsButton.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.musicsButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.musicsButton.Location = new System.Drawing.Point(101, 453);
this.musicsButton.Location = new System.Drawing.Point(6, 378);
this.musicsButton.Name = "musicsButton";
this.musicsButton.Size = new System.Drawing.Size(83, 42);
this.musicsButton.TabIndex = 21;
@ -381,7 +340,7 @@
this.musicBar.Anchor = ((System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.musicBar.BackColor = System.Drawing.Color.Black;
this.musicBar.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.musicBar.Location = new System.Drawing.Point(190, 463);
this.musicBar.Location = new System.Drawing.Point(95, 388);
this.musicBar.Name = "musicBar";
this.musicBar.Size = new System.Drawing.Size(126, 23);
this.musicBar.Step = 2;
@ -396,7 +355,7 @@
this.musicLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.musicLabel.Font = new System.Drawing.Font("Courier New", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.musicLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.musicLabel.Location = new System.Drawing.Point(322, 463);
this.musicLabel.Location = new System.Drawing.Point(227, 388);
this.musicLabel.Name = "musicLabel";
this.musicLabel.Size = new System.Drawing.Size(126, 24);
this.musicLabel.TabIndex = 23;
@ -406,56 +365,321 @@
//
// SortedProgressBar
//
this.SortedProgressBar.Location = new System.Drawing.Point(190, 310);
this.SortedProgressBar.Location = new System.Drawing.Point(95, 236);
this.SortedProgressBar.Name = "SortedProgressBar";
this.SortedProgressBar.Size = new System.Drawing.Size(209, 41);
this.SortedProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.SortedProgressBar.TabIndex = 24;
this.SortedProgressBar.Visible = false;
//
// tabControl1
//
this.tabControl1.AllowDrop = true;
this.tabControl1.Controls.Add(this.mainTab);
this.tabControl1.Controls.Add(this.mfaTab);
this.tabControl1.Controls.Add(this.packDataTab);
this.tabControl1.Controls.Add(this.cryptKeyTab);
this.tabControl1.Controls.Add(this.advDumpTab);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.tabControl1.HotTrack = true;
this.tabControl1.ImeMode = System.Windows.Forms.ImeMode.On;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(943, 507);
this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.FillToRight;
this.tabControl1.TabIndex = 25;
//
// mainTab
//
this.mainTab.BackColor = System.Drawing.Color.Black;
this.mainTab.Controls.Add(this.imagesButton);
this.mainTab.Controls.Add(this.listBox1);
this.mainTab.Controls.Add(this.label1);
this.mainTab.Controls.Add(this.loadingLabel);
this.mainTab.Controls.Add(this.button1);
this.mainTab.Controls.Add(this.SortedProgressBar);
this.mainTab.Controls.Add(this.imageBar);
this.mainTab.Controls.Add(this.treeView1);
this.mainTab.Controls.Add(this.musicLabel);
this.mainTab.Controls.Add(this.imageLabel);
this.mainTab.Controls.Add(this.GameInfo);
this.mainTab.Controls.Add(this.musicBar);
this.mainTab.Controls.Add(this.soundBar);
this.mainTab.Controls.Add(this.musicsButton);
this.mainTab.Controls.Add(this.soundLabel);
this.mainTab.Controls.Add(this.FolderBTN);
this.mainTab.Controls.Add(this.dumpSortedBtn);
this.mainTab.Controls.Add(this.soundsButton);
this.mainTab.Location = new System.Drawing.Point(4, 24);
this.mainTab.Name = "mainTab";
this.mainTab.Padding = new System.Windows.Forms.Padding(3);
this.mainTab.Size = new System.Drawing.Size(935, 479);
this.mainTab.TabIndex = 0;
this.mainTab.Text = "Main";
//
// mfaTab
//
this.mfaTab.BackColor = System.Drawing.Color.Black;
this.mfaTab.Controls.Add(this.dumpMFAButton);
this.mfaTab.Controls.Add(this.mfaLogBox);
this.mfaTab.Location = new System.Drawing.Point(4, 24);
this.mfaTab.Name = "mfaTab";
this.mfaTab.Size = new System.Drawing.Size(935, 479);
this.mfaTab.TabIndex = 2;
this.mfaTab.Text = "MFA Dump";
//
// dumpMFAButton
//
this.dumpMFAButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpMFAButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpMFAButton.ForeColor = System.Drawing.SystemColors.Desktop;
this.dumpMFAButton.Location = new System.Drawing.Point(411, 3);
this.dumpMFAButton.Name = "dumpMFAButton";
this.dumpMFAButton.Size = new System.Drawing.Size(103, 61);
this.dumpMFAButton.TabIndex = 1;
this.dumpMFAButton.Text = "Dump MFA";
this.dumpMFAButton.UseVisualStyleBackColor = true;
this.dumpMFAButton.Click += new System.EventHandler(this.dumpMFAButton_Click);
//
// mfaLogBox
//
this.mfaLogBox.Dock = System.Windows.Forms.DockStyle.Left;
this.mfaLogBox.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.mfaLogBox.Location = new System.Drawing.Point(0, 0);
this.mfaLogBox.MaxLength = 999999999;
this.mfaLogBox.Multiline = true;
this.mfaLogBox.Name = "mfaLogBox";
this.mfaLogBox.ReadOnly = true;
this.mfaLogBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.mfaLogBox.Size = new System.Drawing.Size(405, 479);
this.mfaLogBox.TabIndex = 0;
//
// packDataTab
//
this.packDataTab.BackColor = System.Drawing.Color.Black;
this.packDataTab.Controls.Add(this.infoLabel);
this.packDataTab.Controls.Add(this.dumpAllPackButton);
this.packDataTab.Controls.Add(this.dumpPackButton);
this.packDataTab.Controls.Add(this.packDataListBox);
this.packDataTab.Location = new System.Drawing.Point(4, 24);
this.packDataTab.Name = "packDataTab";
this.packDataTab.Size = new System.Drawing.Size(935, 479);
this.packDataTab.TabIndex = 4;
this.packDataTab.Text = "Pack Data";
//
// infoLabel
//
this.infoLabel.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.infoLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.infoLabel.Location = new System.Drawing.Point(204, 11);
this.infoLabel.Name = "infoLabel";
this.infoLabel.Size = new System.Drawing.Size(255, 91);
this.infoLabel.TabIndex = 7;
this.infoLabel.Text = "Name: PackFile1.mvx\r\nSize: 5 MB\r\n";
//
// dumpAllPackButton
//
this.dumpAllPackButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.dumpAllPackButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpAllPackButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpAllPackButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.dumpAllPackButton.Location = new System.Drawing.Point(204, 148);
this.dumpAllPackButton.Name = "dumpAllPackButton";
this.dumpAllPackButton.Size = new System.Drawing.Size(143, 37);
this.dumpAllPackButton.TabIndex = 6;
this.dumpAllPackButton.Text = "Dump All";
this.dumpAllPackButton.UseVisualStyleBackColor = false;
this.dumpAllPackButton.Click += new System.EventHandler(this.dumpAllPackButton_Click);
//
// dumpPackButton
//
this.dumpPackButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.dumpPackButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpPackButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpPackButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.dumpPackButton.Location = new System.Drawing.Point(204, 105);
this.dumpPackButton.Name = "dumpPackButton";
this.dumpPackButton.Size = new System.Drawing.Size(143, 37);
this.dumpPackButton.TabIndex = 5;
this.dumpPackButton.Text = "Dump";
this.dumpPackButton.UseVisualStyleBackColor = false;
this.dumpPackButton.Click += new System.EventHandler(this.dumpPackButton_Click);
//
// packDataListBox
//
this.packDataListBox.BackColor = System.Drawing.SystemColors.WindowText;
this.packDataListBox.Dock = System.Windows.Forms.DockStyle.Left;
this.packDataListBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.packDataListBox.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.packDataListBox.FormattingEnabled = true;
this.packDataListBox.ItemHeight = 14;
this.packDataListBox.Items.AddRange(new object[] {"PackFile1", "PackFile2", "PackFile3", "PackFile4", "PackFile5", "PackFile6"});
this.packDataListBox.Location = new System.Drawing.Point(0, 0);
this.packDataListBox.Name = "packDataListBox";
this.packDataListBox.Size = new System.Drawing.Size(198, 479);
this.packDataListBox.TabIndex = 4;
this.packDataListBox.SelectedIndexChanged += new System.EventHandler(this.packDataListBox_SelectedIndexChanged);
//
// cryptKeyTab
//
this.cryptKeyTab.BackColor = System.Drawing.Color.Black;
this.cryptKeyTab.Controls.Add(this.minusCharButton);
this.cryptKeyTab.Controls.Add(this.plusCharBtn);
this.cryptKeyTab.Controls.Add(this.hexBox1);
this.cryptKeyTab.Controls.Add(this.charBox);
this.cryptKeyTab.Location = new System.Drawing.Point(4, 24);
this.cryptKeyTab.Name = "cryptKeyTab";
this.cryptKeyTab.Size = new System.Drawing.Size(935, 479);
this.cryptKeyTab.TabIndex = 3;
this.cryptKeyTab.Text = "CryptoKey";
//
// minusCharButton
//
this.minusCharButton.Dock = System.Windows.Forms.DockStyle.Left;
this.minusCharButton.Location = new System.Drawing.Point(0, 21);
this.minusCharButton.Name = "minusCharButton";
this.minusCharButton.Size = new System.Drawing.Size(20, 458);
this.minusCharButton.TabIndex = 3;
this.minusCharButton.Text = "-";
this.minusCharButton.UseVisualStyleBackColor = true;
this.minusCharButton.Click += new System.EventHandler(this.minusCharButton_Click);
//
// plusCharBtn
//
this.plusCharBtn.Dock = System.Windows.Forms.DockStyle.Right;
this.plusCharBtn.Location = new System.Drawing.Point(915, 21);
this.plusCharBtn.Name = "plusCharBtn";
this.plusCharBtn.Size = new System.Drawing.Size(20, 458);
this.plusCharBtn.TabIndex = 2;
this.plusCharBtn.Text = "+";
this.plusCharBtn.UseVisualStyleBackColor = true;
this.plusCharBtn.Click += new System.EventHandler(this.plusCharBtn_Click);
//
// hexBox1
//
this.hexBox1.ColumnInfoVisible = true;
this.hexBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.hexBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
this.hexBox1.LineInfoVisible = true;
this.hexBox1.Location = new System.Drawing.Point(0, 21);
this.hexBox1.Name = "hexBox1";
this.hexBox1.ShadowSelectionColor = System.Drawing.Color.FromArgb(((int) (((byte) (100)))), ((int) (((byte) (60)))), ((int) (((byte) (188)))), ((int) (((byte) (255)))));
this.hexBox1.Size = new System.Drawing.Size(935, 458);
this.hexBox1.StringViewVisible = true;
this.hexBox1.TabIndex = 1;
//
// charBox
//
this.charBox.Dock = System.Windows.Forms.DockStyle.Top;
this.charBox.Location = new System.Drawing.Point(0, 0);
this.charBox.Name = "charBox";
this.charBox.Size = new System.Drawing.Size(935, 21);
this.charBox.TabIndex = 0;
this.charBox.Text = "54";
this.charBox.TextChanged += new System.EventHandler(this.charBox_TextChanged);
//
// advDumpTab
//
this.advDumpTab.BackColor = System.Drawing.Color.DimGray;
this.advDumpTab.Controls.Add(this.advancedPictureBox);
this.advDumpTab.Controls.Add(this.advancedTreeView);
this.advDumpTab.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.advDumpTab.Location = new System.Drawing.Point(4, 24);
this.advDumpTab.Name = "advDumpTab";
this.advDumpTab.Padding = new System.Windows.Forms.Padding(3);
this.advDumpTab.Size = new System.Drawing.Size(935, 479);
this.advDumpTab.TabIndex = 1;
this.advDumpTab.Text = "Advanced";
//
// advancedPictureBox
//
this.advancedPictureBox.BackColor = System.Drawing.Color.DimGray;
this.advancedPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.advancedPictureBox.Location = new System.Drawing.Point(170, 3);
this.advancedPictureBox.Name = "advancedPictureBox";
this.advancedPictureBox.Size = new System.Drawing.Size(762, 473);
this.advancedPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.advancedPictureBox.TabIndex = 1;
this.advancedPictureBox.TabStop = false;
//
// advancedTreeView
//
this.advancedTreeView.Dock = System.Windows.Forms.DockStyle.Left;
this.advancedTreeView.Location = new System.Drawing.Point(3, 3);
this.advancedTreeView.Name = "advancedTreeView";
this.advancedTreeView.Size = new System.Drawing.Size(167, 473);
this.advancedTreeView.TabIndex = 0;
this.advancedTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.advancedTreeView_AfterSelect);
//
// packDataDialog
//
this.packDataDialog.FileOk += new System.ComponentModel.CancelEventHandler(this.packDataDialog_FileOk);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(943, 507);
this.Controls.Add(this.SortedProgressBar);
this.Controls.Add(this.musicLabel);
this.Controls.Add(this.musicBar);
this.Controls.Add(this.musicsButton);
this.Controls.Add(this.packDataBtn);
this.Controls.Add(this.dumpSortedBtn);
this.Controls.Add(this.showHexBtn);
this.Controls.Add(this.cryptKeyBtn);
this.Controls.Add(this.loadingLabel);
this.Controls.Add(this.imagesButton);
this.Controls.Add(this.soundsButton);
this.Controls.Add(this.MFABtn);
this.Controls.Add(this.FolderBTN);
this.Controls.Add(this.soundLabel);
this.Controls.Add(this.soundBar);
this.Controls.Add(this.imageLabel);
this.Controls.Add(this.imageBar);
this.Controls.Add(this.label1);
this.Controls.Add(this.GameInfo);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.treeView1);
this.Controls.Add(this.button1);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(15, 15);
this.Name = "MainForm";
this.Text = "DotNetCTFDumper";
this.Load += new System.EventHandler(this.MainForm_Load);
this.ChunkCombo.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.mainTab.ResumeLayout(false);
this.mainTab.PerformLayout();
this.mfaTab.ResumeLayout(false);
this.mfaTab.PerformLayout();
this.packDataTab.ResumeLayout(false);
this.cryptKeyTab.ResumeLayout(false);
this.cryptKeyTab.PerformLayout();
this.advDumpTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize) (this.advancedPictureBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.PictureBox advancedPictureBox;
private System.Windows.Forms.TreeView advancedTreeView;
private System.Windows.Forms.Button dumpAllPackButton;
private System.Windows.Forms.Button dumpPackButton;
private System.Windows.Forms.SaveFileDialog packDataDialog;
private System.Windows.Forms.ListBox packDataListBox;
private System.Windows.Forms.Label infoLabel;
private System.Windows.Forms.TabPage advDumpTab;
private System.Windows.Forms.TabPage mainTab;
private System.Windows.Forms.TabPage mfaTab;
private System.Windows.Forms.TabPage packDataTab;
private System.Windows.Forms.TextBox charBox;
private System.Windows.Forms.Button minusCharButton;
private System.Windows.Forms.Button plusCharBtn;
private Be.Windows.Forms.HexBox hexBox1;
private System.Windows.Forms.TabPage cryptKeyTab;
private System.Windows.Forms.TextBox mfaLogBox;
private System.Windows.Forms.Button dumpMFAButton;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.ProgressBar SortedProgressBar;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ContextMenuStrip ChunkCombo;
private System.Windows.Forms.Button cryptKeyBtn;
private System.Windows.Forms.Button dumpSortedBtn;
private System.Windows.Forms.Button FolderBTN;
private System.Windows.Forms.Label GameInfo;
@ -465,15 +689,12 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label loadingLabel;
private System.Windows.Forms.Button MFABtn;
private System.Windows.Forms.ProgressBar musicBar;
private System.Windows.Forms.Label musicLabel;
private System.Windows.Forms.Button musicsButton;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button packDataBtn;
private System.Windows.Forms.ToolStripMenuItem previewFrameBtn;
private System.Windows.Forms.ToolStripMenuItem saveChunkBtn;
private System.Windows.Forms.Button showHexBtn;
private System.Windows.Forms.ProgressBar soundBar;
private System.Windows.Forms.Label soundLabel;
private System.Windows.Forms.Button soundsButton;

@ -1,14 +1,17 @@
using System;
using System.CodeDom;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Be.Windows.Forms;
using DotNetCTFDumper.MMFParser;
using DotNetCTFDumper.MMFParser.EXE;
using DotNetCTFDumper.MMFParser.EXE.Loaders;
using DotNetCTFDumper.MMFParser.EXE.Loaders.Banks;
using DotNetCTFDumper.MMFParser.Translation;
using DotNetCTFDumper.Utils;
namespace DotNetCTFDumper.GUI
@ -21,9 +24,9 @@ namespace DotNetCTFDumper.GUI
public static bool BreakImages;
public static bool BreakSounds;
public static bool BreakMusics;
public static bool Loaded;
public Thread LoaderThread;
public Color ColorTheme = Color.FromArgb(223,114,38);
public PackDataForm PackForm;
public delegate void SaveHandler(int index, int all);
@ -41,6 +44,21 @@ namespace DotNetCTFDumper.GUI
item.BackColor=Color.Black;
if(item is Button) item.BackColor=Color.FromArgb(30,30,30);
if (item is Label)
{
item.BackColor = Color.Transparent;
item.Refresh();
}
}
foreach (TabPage tabPage in tabControl1.TabPages)
{
foreach (Control item in tabPage.Controls)
{
item.ForeColor = ColorTheme;
item.BackColor=Color.Black;
if(item is Button) item.BackColor=Color.FromArgb(30,30,30);
if (item is Label)
{
item.BackColor = Color.Transparent;
@ -48,38 +66,51 @@ namespace DotNetCTFDumper.GUI
}
}
}
foreach (var item in ChunkCombo.Items)
{
((ToolStripItem)item).ForeColor = ColorTheme;
((ToolStripItem)item).BackColor=Color.Black;
}
hexBox1.ForeColor = ColorTheme;
hexBox1.InfoForeColor = Color.FromArgb(ColorTheme.R/2, ColorTheme.G/2, ColorTheme.B/2);
hexBox1.SelectionForeColor=Color.FromArgb(ColorTheme.R, ColorTheme.G, ColorTheme.B);
hexBox1.SelectionBackColor=Color.FromArgb(ColorTheme.R/4, ColorTheme.G/4, ColorTheme.B/4);
hexBox1.ShadowSelectionColor=Color.FromArgb(150,ColorTheme.R/4, ColorTheme.G/4, ColorTheme.B/4);
label1.Text = Settings.DumperVersion;
Pame2Mfa.OnMessage += (obj)=>
{
var date = DateTime.Now;
string msg = (string)obj;
mfaLogBox.AppendText(msg.Length > 0
? $"[{date.Hour,2}:{date.Minute,2}:{date.Second,2}:{date.Millisecond,3}] {msg}\r\n"
: "\r\n");
};
tabControl1.Selecting += tabControl1_Selecting;
}
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
{
if (!Loaded)
{
if (e.TabPage != mainTab)
e.Cancel = true;
}
}
}
private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
{
var worker = new BackgroundWorker();
worker.DoWork += worker_DoWork;
worker.RunWorkerCompleted += worker_RunWorkerCompleted;
worker.DoWork +=(workSender,workE)=> StartReading();
worker.RunWorkerCompleted += (workSender,workE)=> AfterLoad();
worker.RunWorkerAsync();
}
void worker_DoWork(object sender, DoWorkEventArgs e)
{
StartReading();
}
void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
AfterLoad();
}
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
@ -97,21 +128,18 @@ namespace DotNetCTFDumper.GUI
var path = openFileDialog1.FileName;
loadingLabel.Visible = true;
Program.ReadFile(path, Settings.Verbose, Settings.DumpImages, Settings.DumpSounds);
imageBar.Value = 0;
soundBar.Value = 0;
GameInfo.Text = "";
imageLabel.Text = "Using nonGUI mode";
soundLabel.Text = "Using nonGUI mode";
MFABtn.Visible = false;
FolderBTN.Visible = false;
imagesButton.Visible = false;
soundsButton.Visible = false;
musicsButton.Visible = false;
cryptKeyBtn.Visible = false;
showHexBtn.Visible = false;
dumpSortedBtn.Visible = false;
packDataBtn.Visible = false;
@ -206,8 +234,6 @@ namespace DotNetCTFDumper.GUI
string ActualName = item.Name;
if (item.Loader is Frame frm) ActualName = ActualName + " " + frm.Name;
ChunkNode newNode = Helper.GetChunkNode(item, ActualName);
//if (item.Loader != null) newNode = new ChunkNode(ActualName, item.Loader);
//else newNode = new ChunkNode(ActualName, item);
treeView1.Nodes.Add(newNode);
if (item.Loader is Frame frame)
{
@ -241,17 +267,17 @@ namespace DotNetCTFDumper.GUI
}
}
MFABtn.Visible = true;
FolderBTN.Visible = true;
imagesButton.Visible = true;
soundsButton.Visible = true;
musicsButton.Visible = true;
cryptKeyBtn.Visible = true;
//showHexBtn.Visible = true;
dumpSortedBtn.Visible = true;
packDataBtn.Visible = true;
GameInfo.Visible = true;
loadingLabel.Visible = false;
Loaded = true;
InitKeyTab();
InitPackDataTab();
InitAdvancedDump();
var toLog = "";
toLog += $"Title:{Exe.Instance.GameData.Name}\n";
toLog += $"Copyright:{Exe.Instance.GameData.Copyright}\n";
@ -259,8 +285,9 @@ namespace DotNetCTFDumper.GUI
toLog += $"Product Version: {Exe.Instance.GameData.ProductVersion}\n";
toLog += $"Build: {Exe.Instance.GameData.Build}\n";
toLog += $"Runtime Version: {Exe.Instance.GameData.RuntimeVersion}\n";
toLog += $"Number Of Images: {Exe.Instance.GameData.Images?.NumberOfItems}\n";
toLog += $"Number Of Sounds: {Exe.Instance.GameData.Sounds?.NumOfItems}\n";
toLog += $"Number Of Images: {Exe.Instance.GameData.Images?.NumberOfItems ?? 0}\n";
toLog += $"Number Of Sounds: {Exe.Instance.GameData.Sounds?.NumOfItems ?? 0}\n";
toLog += $"Number Of Musics: {Exe.Instance.GameData.Music?.NumOfItems ?? 0}\n";
toLog += $"Unique FrameItems: {Exe.Instance.GameData.Frameitems?.NumberOfItems}\n";
toLog += $"Frame Count: {Exe.Instance.GameData.Frames.Count}\n";
toLog += $"Chunks Count: {Exe.Instance.GameData.GameChunks.Chunks.Count}\n";
@ -316,15 +343,11 @@ namespace DotNetCTFDumper.GUI
Process.Start($"{Settings.DumpPath}");
}
private void MFABtn_Click(object sender, EventArgs e)
{
var mfaForm = new MFABuilderForm(ColorTheme);
mfaForm.Show();
}
private void soundsButton_Click(object sender, EventArgs e)
{
if (Exe.Instance.GameData.GameChunks.GetChunk<SoundBank>() == null) return;
if (!IsDumpingSounds)
{
SetSoundElements(true);
@ -341,12 +364,14 @@ namespace DotNetCTFDumper.GUI
}
private void imagesButton_Click(object sender, EventArgs e)
{
if (Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>() == null) return;
if (!IsDumpingImages)
{
SetImageElements(true);
IsDumpingImages = true;
Backend.DumpImages(this,true,true);
}
else
{
@ -357,7 +382,7 @@ namespace DotNetCTFDumper.GUI
}
private void musicsButton_Click(object sender, EventArgs e)
{
if (Exe.Instance.GameData.GameChunks.GetChunk<MusicBank>() == null) return;
if (!IsDumpingMusics)
{
SetMusicElements(true);
@ -396,34 +421,6 @@ namespace DotNetCTFDumper.GUI
musicBar.Value = 0;
}
private void cryptKeyBtn_Click(object sender, EventArgs e)
{
var rawData = "";
if (Settings.Build > 284)
{
rawData += Settings.AppName;
rawData += Settings.Copyright;
rawData += Settings.ProjectPath;
}
else
{
rawData += Settings.ProjectPath;
rawData += Settings.AppName;
rawData += Settings.Copyright;
}
var KeyForm = new CryptoKeyForm(rawData,ColorTheme);
KeyForm.Show();
}
private void ShowHex()
{
if ((ChunkNode) treeView1.SelectedNode != null)
@ -465,30 +462,134 @@ namespace DotNetCTFDumper.GUI
private void tabPage1_Click(object sender, EventArgs e)
private void dumpMFAButton_Click(object sender, EventArgs e)
{
throw new System.NotImplementedException();
var worker = new BackgroundWorker();
worker.DoWork +=(workSender,workE)=> MFAGenerator.BuildMFA();
worker.RunWorkerCompleted += (workSender, workE) =>
{
Logger.Log("MFA Done", true, ConsoleColor.Yellow);
var res = MessageBox.Show("Dump Extensions?","Finished",MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
foreach (var item in Exe.Instance.PackData.Items)
{
item.Dump();
Pame2Mfa.Message("Dumping "+item.PackFilename);
}
}
Process.Start($"{Settings.DumpPath}");
};
worker.RunWorkerAsync();
}
public void InitKeyTab()
{
var rawData = "";
if (Settings.Build > 284)
{
rawData += Settings.AppName;
rawData += Settings.Copyright;
rawData += Settings.ProjectPath;
}
else
{
rawData += Settings.ProjectPath;
rawData += Settings.AppName;
rawData += Settings.Copyright;
}
try
{
var previewKey = Decryption.MakeKeyFromBytes(rawData, (byte) int.Parse((charBox.Text)));
hexBox1.ByteProvider=new DynamicByteProvider(previewKey);
}
catch
{
// ignored
}
}
public void InitPackDataTab()
{
packDataListBox.Items.Clear();
foreach (var item in Exe.Instance.PackData.Items)
{
packDataListBox.Items.Add(item.PackFilename);
}
UpdatePackInfo(0);
}
private void packDataBtn_Click(object sender, EventArgs e)
private void UpdatePackInfo(int index)
{
if(PackForm==null)PackForm = new PackDataForm(Exe.Instance.PackData,ColorTheme);
PackForm.Show();
var item = Exe.Instance.PackData.Items[index];
infoLabel.Text = $"Name: {item.PackFilename}\nSize: {item.Data.Length.ToPrettySize()}";
}
private void dumpPackButton_Click(object sender, EventArgs e)
{
var item = Exe.Instance.PackData.Items[packDataListBox.SelectedIndex];
packDataDialog.FileName = item.PackFilename;
if (item.PackFilename.EndsWith(".mfx")) packDataDialog.Filter = "Clickteam Extension(*.mfx)|.mfx";
else if (item.PackFilename.EndsWith(".dll")) packDataDialog.Filter = "Clickteam Module(*.dll)|.dll";
private void button2_Click(object sender, EventArgs e)
packDataDialog.InitialDirectory = Path.GetFullPath(Settings.ExtensionPath);
packDataDialog.ShowDialog();
}
private void dumpAllPackButton_Click(object sender, EventArgs e)
{
foreach (var item in Exe.Instance.PackData.Items)
{
item.Dump();
}
}
private void packDataDialog_FileOk(object sender, CancelEventArgs e)
{
var myPic = new PictureBox();
var img = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>().Images[65].Bitmap;
myPic.SizeMode = PictureBoxSizeMode.StretchImage;
var item = Exe.Instance.PackData.Items[packDataListBox.SelectedIndex];
item.Dump(packDataDialog.FileName);
}
private void packDataListBox_SelectedIndexChanged(object sender, EventArgs e)=>UpdatePackInfo(packDataListBox.SelectedIndex);
myPic.Image = img;
myPic.Width = img.Width / 2;
myPic.Height = img.Height / 2;
Controls.Add(myPic);
private void plusCharBtn_Click(object sender, EventArgs e){ charBox.Text = (byte.Parse(charBox.Text) + 1).ToString(); InitKeyTab();}
private void minusCharButton_Click(object sender, EventArgs e){ charBox.Text = (byte.Parse(charBox.Text) - 1).ToString(); InitKeyTab();}
private void charBox_TextChanged(object sender, EventArgs e)=>InitKeyTab();
public void InitAdvancedDump()
{
var bank = Exe.Instance.GameData.GameChunks.GetChunk<ImageBank>();
var items = bank.Images.ToList();
var filtered = items.OrderBy(x=>x.Value.Handle);
foreach (var keypair in filtered)
{
advancedTreeView.Nodes.Add(new ChunkNode(keypair.Key.ToString(),keypair.Value));
}
}
private void advancedTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
var node = e.Node;
var img = ((ImageItem) ((ChunkNode) node).loader);
if(img.Bitmap==null)img.Load();
advancedPictureBox.Image = img.Bitmap;
}
}
}

@ -123,8 +123,11 @@
<metadata name="ChunkCombo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
</metadata>
<metadata name="packDataDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>270, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>72</value>
<value>73</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

@ -1,129 +0,0 @@
using System.ComponentModel;
namespace DotNetCTFDumper.GUI
{
partial class PackDataForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PackDataForm));
this.listBox1 = new System.Windows.Forms.ListBox();
this.dumpButton = new System.Windows.Forms.Button();
this.dumpAllButton = new System.Windows.Forms.Button();
this.infoLabel = new System.Windows.Forms.Label();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.SuspendLayout();
//
// listBox1
//
this.listBox1.BackColor = System.Drawing.SystemColors.WindowText;
this.listBox1.Dock = System.Windows.Forms.DockStyle.Left;
this.listBox1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.listBox1.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 14;
this.listBox1.Items.AddRange(new object[] {"PackFile1", "PackFile2", "PackFile3", "PackFile4", "PackFile5", "PackFile6"});
this.listBox1.Location = new System.Drawing.Point(0, 0);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(198, 390);
this.listBox1.TabIndex = 0;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
//
// dumpButton
//
this.dumpButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.dumpButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.dumpButton.Location = new System.Drawing.Point(204, 105);
this.dumpButton.Name = "dumpButton";
this.dumpButton.Size = new System.Drawing.Size(143, 37);
this.dumpButton.TabIndex = 1;
this.dumpButton.Text = "Dump";
this.dumpButton.UseVisualStyleBackColor = false;
this.dumpButton.Click += new System.EventHandler(this.dumpButton_Click);
//
// dumpAllButton
//
this.dumpAllButton.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.dumpAllButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dumpAllButton.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.dumpAllButton.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.dumpAllButton.Location = new System.Drawing.Point(204, 148);
this.dumpAllButton.Name = "dumpAllButton";
this.dumpAllButton.Size = new System.Drawing.Size(143, 37);
this.dumpAllButton.TabIndex = 2;
this.dumpAllButton.Text = "Dump All";
this.dumpAllButton.UseVisualStyleBackColor = false;
this.dumpAllButton.Click += new System.EventHandler(this.dumpAllButton_Click);
//
// infoLabel
//
this.infoLabel.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.infoLabel.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.infoLabel.Location = new System.Drawing.Point(204, 14);
this.infoLabel.Name = "infoLabel";
this.infoLabel.Size = new System.Drawing.Size(255, 91);
this.infoLabel.TabIndex = 3;
this.infoLabel.Text = "Name: PackFile1.mvx\r\nSize: 5 MB\r\n";
//
// saveFileDialog1
//
this.saveFileDialog1.InitialDirectory = "C:\\Windows";
this.saveFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.saveFileDialog1_FileOk);
//
// PackDataForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
this.BackColor = System.Drawing.SystemColors.ControlText;
this.ClientSize = new System.Drawing.Size(646, 390);
this.Controls.Add(this.infoLabel);
this.Controls.Add(this.dumpAllButton);
this.Controls.Add(this.dumpButton);
this.Controls.Add(this.listBox1);
this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon")));
this.Name = "PackDataForm";
this.Text = "Pack Files";
this.Load += new System.EventHandler(this.HexViewForm_Load);
this.ResumeLayout(false);
}
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.Label infoLabel;
private System.Windows.Forms.Button dumpAllButton;
private System.Windows.Forms.Button dumpButton;
private System.Windows.Forms.ListBox listBox1;
#endregion
}
}

@ -1,81 +0,0 @@
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using DotNetCTFDumper.MMFParser.EXE;
using DotNetCTFDumper.Utils;
namespace DotNetCTFDumper.GUI
{
public partial class PackDataForm : Form
{
private PackData data;
public PackDataForm(PackData data,Color color)
{
InitializeComponent();
listBox1.ForeColor = color;
dumpButton.ForeColor = color;
dumpAllButton.ForeColor = color;
infoLabel.ForeColor = color;
this.data = data;
}
private void HexViewForm_Load(object sender, EventArgs e)
{
listBox1.Items.Clear();
foreach (var item in data.Items)
{
listBox1.Items.Add(item.PackFilename);
}
UpdateInfo(0);
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
UpdateInfo(listBox1.SelectedIndex);
}
private void UpdateInfo(int index)
{
var item = data.Items[index];
infoLabel.Text = $"Name: {item.PackFilename}\nSize: {item.Data.Length.ToPrettySize()}";
}
private void dumpButton_Click(object sender, EventArgs e)
{
var item = data.Items[listBox1.SelectedIndex];
saveFileDialog1.FileName = item.PackFilename;
if (item.PackFilename.EndsWith(".mfx")) saveFileDialog1.Filter = "Clickteam Extension(*.mfx)|.mfx";
else if (item.PackFilename.EndsWith(".dll")) saveFileDialog1.Filter = "Clickteam Module(*.dll)|.dll";
saveFileDialog1.InitialDirectory = Path.GetFullPath(Settings.ExtensionPath);
saveFileDialog1.ShowDialog();
}
private void dumpAllButton_Click(object sender, EventArgs e)
{
foreach (var item in data.Items)
{
item.Dump();
}
}
private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
{
var item = data.Items[listBox1.SelectedIndex];
item.Dump(saveFileDialog1.FileName);
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,89 @@
using System.Collections.Generic;
using DotNetCTFDumper.Utils;
namespace DotNetCTFDumper.MMFParser.EXE.Loaders.Objects
{
public class Movements:ChunkLoader
{
public List<Movement> Items;
public Movements(ByteReader reader) : base(reader)
{
}
public Movements(ChunkList.Chunk chunk) : base(chunk)
{
}
public override void Read()
{
Items = new List<Movement>();
var rootPosition = Reader.Tell();
var count = Reader.ReadUInt32();
var currentPos = Reader.Tell();
for (int i = 0; i < count; i++)
{
var mov = new Movement(Reader);
mov.rootPos = (int) rootPosition;
mov.Read();
Items.Add(mov);
Reader.Seek(currentPos+16);
currentPos = Reader.Tell();
}
}
public override void Print(bool ext)
{
throw new System.NotImplementedException();
}
public override string[] GetReadableData()
{
throw new System.NotImplementedException();
}
}
public class Movement : ChunkLoader
{
public int rootPos;
public short Player;
public short Type;
public byte MovingAtStart;
public int DirectionAtStart;
public Movement(ByteReader reader) : base(reader)
{
}
public Movement(ChunkList.Chunk chunk) : base(chunk)
{
}
public override void Read()
{
var nameOffset = Reader.ReadInt32();
var movementId = Reader.ReadInt32();
var newOffset = Reader.ReadInt32();
var dataSize = Reader.ReadInt32();
Reader.Seek(rootPos+newOffset);
Player = Reader.ReadInt16();
Type = Reader.ReadInt16();
MovingAtStart = Reader.ReadByte();
Reader.Skip(3);
DirectionAtStart = Reader.ReadInt32();
//TODO: Extension Stuff
}
public override void Print(bool ext)
{
throw new System.NotImplementedException();
}
public override string[] GetReadableData()
{
throw new System.NotImplementedException();
}
}
}

@ -82,6 +82,7 @@ namespace DotNetCTFDumper.MMFParser.EXE.Loaders.Objects
public int ExtensionVersion;
public AlterableValues Values;
public AlterableStrings Strings;
public Movements Movements;
public ObjectCommon(ByteReader reader) : base(reader)
@ -140,10 +141,10 @@ namespace DotNetCTFDumper.MMFParser.EXE.Loaders.Objects
if (_movementsOffset != 0)
{
//Reader.Seek(currentPosition+_movementsOffset);
//var movements = new Movements(Reader);
//movements.Read();
// Console.WriteLine("Movements done");
Reader.Seek(currentPosition+_movementsOffset);
Movements = new Movements(Reader);
Movements.Read();
Console.WriteLine("Movements done");
}

@ -6,6 +6,7 @@ using DotNetCTFDumper.MMFParser.EXE;
using DotNetCTFDumper.MMFParser.EXE.Loaders;
using DotNetCTFDumper.MMFParser.EXE.Loaders.Banks;
using DotNetCTFDumper.MMFParser.MFA.Loaders;
using DotNetCTFDumper.MMFParser.Translation;
using DotNetCTFDumper.Utils;
using ChunkList = DotNetCTFDumper.MMFParser.MFA.Loaders.ChunkList;
using Controls = DotNetCTFDumper.MMFParser.MFA.Loaders.Controls;
@ -137,22 +138,24 @@ namespace DotNetCTFDumper.MMFParser.MFA
Writer.AutoWriteUnicode(Name);
Writer.AutoWriteUnicode(Description);
Writer.AutoWriteUnicode(Path);
Pame2Mfa.Message("Writing Stamp");
Writer.WriteUInt32((uint) Stamp.Length);
Writer.WriteBytes(Stamp);
Pame2Mfa.Message("Writing Fonts");
Writer.WriteAscii(FontBankId);
Fonts.Write(Writer);
Pame2Mfa.Message("Writing Sounds");
Writer.WriteAscii(SoundBankId);
Sounds.Write(Writer);
Pame2Mfa.Message("Writing Musics");
Writer.WriteAscii(MusicBankId);
// music.Write();
Writer.WriteInt32(0); //someone is using musics lol?
//TODO: Do music
Pame2Mfa.Message("Writing Icons");
Writer.WriteAscii(ImageBankId);
Icons.Write(Writer);
Pame2Mfa.Message("Writing Images");
Writer.WriteAscii(ImageBankId);
Images.Write(Writer);
@ -246,6 +249,7 @@ namespace DotNetCTFDumper.MMFParser.MFA
ByteWriter newWriter = new ByteWriter(new MemoryStream());
foreach (Frame frame in Frames)
{
Pame2Mfa.Message("Writing Frame");
Writer.WriteUInt32((uint) (startPos+newWriter.Tell()+4));
frame.Write(newWriter);
}

@ -15,17 +15,20 @@ namespace DotNetCTFDumper.MMFParser.Translation
Settings.DoMFA = true;
var mfaReader = new ByteReader(TemplatePath, FileMode.Open);
var template = new MFA.MFA(mfaReader);
Pame2Mfa.Message("Loading Template");
template.Read(); //Loading template
Pame2Mfa.Message("Translating...");
Pame2Mfa.Translate(ref template, Exe.Instance.GameData); //Translation
var mfaWriter =
new ByteWriter(
Settings.GameName.Length > 0 ? $"{Settings.DumpPath}\\{Exe.Instance.GameData.Name}.mfa" : "out.mfa",
FileMode.Create); //New writer for new MFA
Pame2Mfa.Message("");
Pame2Mfa.Message("Writing MFA");
template.Write(mfaWriter); //Writing new MFA
mfaWriter.Dispose();
Pame2Mfa.Message("Writing is finished!");
return template;
Logger.Log("MFA Done", true, ConsoleColor.Yellow);

@ -15,17 +15,20 @@ using AnimationDirection = DotNetCTFDumper.MMFParser.MFA.Loaders.mfachunks.Anima
using ChunkList = DotNetCTFDumper.MMFParser.MFA.Loaders.ChunkList;
using Frame = DotNetCTFDumper.MMFParser.EXE.Loaders.Frame;
using Layer = DotNetCTFDumper.MMFParser.MFA.Loaders.Layer;
using Movement = DotNetCTFDumper.MMFParser.MFA.Loaders.mfachunks.Movement;
namespace DotNetCTFDumper.MMFParser.Translation
{
public static class Pame2Mfa
{
public static Dictionary<int, FrameItem> FrameItems;
public static event Program.DumperEvent TranslatingFrame;
public static event Program.DumperEvent OnMessage;
public static void Translate(ref MFA.MFA mfa, GameData game)
{
Message("Running Pame2MFA");
Message("Original MFA Build: "+mfa.BuildVersion);
Message("");
//mfa.MfaBuild = 4;
//mfa.Product = (int) game.ProductVersion;
//mfa.BuildVersion = 283;
@ -94,6 +97,7 @@ namespace DotNetCTFDumper.MMFParser.Translation
newItem.InkEffectParameter = item.InkEffectValue;
newItem.AntiAliasing = item.Antialias ? 1 : 0;
newItem.Flags = (int) item.Flags;
newItem.IconHandle = 10;
newItem.Chunks=new ChunkList(null);
var itemLoader = (ObjectCommon)item.Properties.Loader;
//Only actives
@ -106,11 +110,19 @@ namespace DotNetCTFDumper.MMFParser.Translation
//newLoader.Qualifiers;
newLoader.Strings = ConvertStrings(itemLoader.Strings);
newLoader.Values = ConvertValue(itemLoader.Values);
newLoader.Movements=new Movements(null);
var testMovement = new Movement(null);
testMovement.Name = "New Movement";
testMovement.Extension = "";
newLoader.Movements.Items.Add(testMovement);
newLoader.Movements=new MFA.Loaders.mfachunks.Movements(null);
for (int j = 0; j < itemLoader.Movements.Items.Count; j++)
{
var mov = itemLoader.Movements.Items[j];
var newMov = new Movement(null);
newMov.Name = $"Movement {j+1}";
newMov.Extension = "";
newMov.Identifier = mov.Type;
newMov.Player = mov.Player;
newMov.MovingAtStart = mov.MovingAtStart;
newMov.DirectionAtStart = mov.DirectionAtStart;
newLoader.Movements.Items.Add(newMov);
}
newLoader.Behaviours=new Behaviours(null);
//TODO: Transitions
if (itemLoader.Animations != null)
@ -216,6 +228,7 @@ namespace DotNetCTFDumper.MMFParser.Translation
newLayer.YCoefficient = layer.YCoeff;
newFrame.Layers.Add(newLayer);
}
Message("Translating frame: "+newFrame.Name);
var newFrameItems = new List<FrameItem>();
var newInstances = new List<FrameInstance>();
if (frame.Objects != null)
@ -236,7 +249,7 @@ namespace DotNetCTFDumper.MMFParser.Translation
if (frameItem != null)
{
newFrameItems.Add(frameItem);
//newFrameItems.Add(frameItem);
var newInstance = new FrameInstance((ByteReader) null);
newInstance.X = instance.X;
newInstance.Y = instance.Y;
@ -246,7 +259,7 @@ namespace DotNetCTFDumper.MMFParser.Translation
newInstance.ItemHandle = instance.ObjectInfo;
newInstance.ParentHandle = (uint) instance.ParentHandle;
newInstance.Layer = (uint) instance.Layer;
newInstances.Add(newInstance);
//newInstances.Add(newInstance);
}
break;
}
@ -342,6 +355,11 @@ namespace DotNetCTFDumper.MMFParser.Translation
return alterables;
}
public static void Message(string msg)
{
OnMessage.Invoke(msg);
}
}

@ -40,6 +40,9 @@ namespace DotNetCTFDumper.Utils
byte[] key = new byte[256];
Marshal.Copy(ptr, key, 0, 256);
Marshal.FreeHGlobal(rawKeyPtr);
Array.Resize(ref key,data.Length);
Array.Resize(ref key,256);
return key;
}

@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Web.UI.WebControls;
namespace DotNetCTFDumper.Utils
{
@ -22,9 +23,9 @@ namespace DotNetCTFDumper.Utils
Console.ForegroundColor = color;
Console.WriteLine(text);
Console.ForegroundColor = ConsoleColor.White;
}
}
}
}

Loading…
Cancel
Save