TODO: Fix object writing

master
1987kostya 4 years ago
parent 056ca6587d
commit 6eedbc24b5

@ -0,0 +1,67 @@
using System.ComponentModel;
namespace DotNetCTFDumper.GUI
{
partial class ErrorLogBox
{
/// <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()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.BackColor = System.Drawing.Color.Black;
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
this.textBox1.ForeColor = System.Drawing.Color.Red;
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox1.Size = new System.Drawing.Size(603, 274);
this.textBox1.TabIndex = 0;
//
// ErrorLogBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(603, 274);
this.Controls.Add(this.textBox1);
this.ForeColor = System.Drawing.Color.Red;
this.Name = "ErrorLogBox";
this.Text = "Error";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.TextBox textBox1;
#endregion
}
}

@ -13,17 +13,15 @@ namespace DotNetCTFDumper.GUI
InitializeComponent(); InitializeComponent();
textBox1.Text += $"{e.Message}\r\n\r\n\r\n"; textBox1.Text += $"{e.Message}\r\n\r\n\r\n";
StackTrace st = new StackTrace(true); StackTrace st = new StackTrace(true);
string stackIndent = "";
for(int i =0; i< st.FrameCount; i++ ) for(int i =0; i< st.FrameCount; i++ )
{ {
// Note that at this level, there are four
// stack frames, one for each method invocation.
StackFrame sf = st.GetFrame(i); StackFrame sf = st.GetFrame(i);
var filename = Path.GetFileNameWithoutExtension(sf.GetFileName()); var filename = Path.GetFileNameWithoutExtension(sf.GetFileName());
if (filename == null) filename = "UnknownFile"; if (filename == null) filename = "UnknownFile";
textBox1.Text += textBox1.Text +=
$" {(filename)} : {sf.GetMethod()}: Line {sf.GetFileLineNumber()}\r\n\r\n"; $" {(filename)} : {sf.GetMethod()}: Line {sf.GetFileLineNumber()}\r\n\r\n";
stackIndent += " ";
} }
//Console.ReadKey(); //Console.ReadKey();

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -63,11 +63,6 @@
this.dumpAllPackButton = new System.Windows.Forms.Button(); this.dumpAllPackButton = new System.Windows.Forms.Button();
this.dumpPackButton = new System.Windows.Forms.Button(); this.dumpPackButton = new System.Windows.Forms.Button();
this.packDataListBox = new System.Windows.Forms.ListBox(); 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.imgViewerTab = new System.Windows.Forms.TabPage(); this.imgViewerTab = new System.Windows.Forms.TabPage();
this.imageViewerInfo = new System.Windows.Forms.Label(); this.imageViewerInfo = new System.Windows.Forms.Label();
this.imageViewerPlayAnim = new System.Windows.Forms.Button(); this.imageViewerPlayAnim = new System.Windows.Forms.Button();
@ -76,6 +71,11 @@
this.soundViewTab = new System.Windows.Forms.TabPage(); this.soundViewTab = new System.Windows.Forms.TabPage();
this.soundList = new System.Windows.Forms.TreeView(); this.soundList = new System.Windows.Forms.TreeView();
this.playSoundBtn = new System.Windows.Forms.Button(); this.playSoundBtn = new System.Windows.Forms.Button();
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.pluginTab = new System.Windows.Forms.TabPage(); this.pluginTab = new System.Windows.Forms.TabPage();
this.pluginLogBox = new System.Windows.Forms.TextBox(); this.pluginLogBox = new System.Windows.Forms.TextBox();
this.activatePluginBtn = new System.Windows.Forms.Button(); this.activatePluginBtn = new System.Windows.Forms.Button();
@ -86,10 +86,10 @@
this.mainTab.SuspendLayout(); this.mainTab.SuspendLayout();
this.mfaTab.SuspendLayout(); this.mfaTab.SuspendLayout();
this.packDataTab.SuspendLayout(); this.packDataTab.SuspendLayout();
this.cryptKeyTab.SuspendLayout();
this.imgViewerTab.SuspendLayout(); this.imgViewerTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize) (this.imageViewPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize) (this.imageViewPictureBox)).BeginInit();
this.soundViewTab.SuspendLayout(); this.soundViewTab.SuspendLayout();
this.cryptKeyTab.SuspendLayout();
this.pluginTab.SuspendLayout(); this.pluginTab.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -389,9 +389,9 @@
this.tabControl1.Controls.Add(this.mainTab); this.tabControl1.Controls.Add(this.mainTab);
this.tabControl1.Controls.Add(this.mfaTab); this.tabControl1.Controls.Add(this.mfaTab);
this.tabControl1.Controls.Add(this.packDataTab); this.tabControl1.Controls.Add(this.packDataTab);
this.tabControl1.Controls.Add(this.cryptKeyTab);
this.tabControl1.Controls.Add(this.imgViewerTab); this.tabControl1.Controls.Add(this.imgViewerTab);
this.tabControl1.Controls.Add(this.soundViewTab); this.tabControl1.Controls.Add(this.soundViewTab);
this.tabControl1.Controls.Add(this.cryptKeyTab);
this.tabControl1.Controls.Add(this.pluginTab); this.tabControl1.Controls.Add(this.pluginTab);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; 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.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204)));
@ -486,7 +486,7 @@
// //
// infoLabel // infoLabel
// //
this.infoLabel.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte) (204))); this.infoLabel.Font = new System.Drawing.Font("Courier New", 9.75F, 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.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.Location = new System.Drawing.Point(204, 11);
this.infoLabel.Name = "infoLabel"; this.infoLabel.Name = "infoLabel";
@ -526,10 +526,10 @@
// //
this.packDataListBox.BackColor = System.Drawing.SystemColors.WindowText; this.packDataListBox.BackColor = System.Drawing.SystemColors.WindowText;
this.packDataListBox.Dock = System.Windows.Forms.DockStyle.Left; 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.Font = new System.Drawing.Font("Courier New", 9F, 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.ForeColor = System.Drawing.Color.FromArgb(((int) (((byte) (255)))), ((int) (((byte) (128)))), ((int) (((byte) (0)))));
this.packDataListBox.FormattingEnabled = true; this.packDataListBox.FormattingEnabled = true;
this.packDataListBox.ItemHeight = 14; this.packDataListBox.ItemHeight = 15;
this.packDataListBox.Items.AddRange(new object[] {"PackFile1", "PackFile2", "PackFile3", "PackFile4", "PackFile5", "PackFile6"}); this.packDataListBox.Items.AddRange(new object[] {"PackFile1", "PackFile2", "PackFile3", "PackFile4", "PackFile5", "PackFile6"});
this.packDataListBox.Location = new System.Drawing.Point(0, 0); this.packDataListBox.Location = new System.Drawing.Point(0, 0);
this.packDataListBox.Name = "packDataListBox"; this.packDataListBox.Name = "packDataListBox";
@ -537,64 +537,6 @@
this.packDataListBox.TabIndex = 4; this.packDataListBox.TabIndex = 4;
this.packDataListBox.SelectedIndexChanged += new System.EventHandler(this.packDataListBox_SelectedIndexChanged); 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);
//
// imgViewerTab // imgViewerTab
// //
this.imgViewerTab.BackColor = System.Drawing.Color.DimGray; this.imgViewerTab.BackColor = System.Drawing.Color.DimGray;
@ -623,9 +565,9 @@
// imageViewerPlayAnim // imageViewerPlayAnim
// //
this.imageViewerPlayAnim.Dock = System.Windows.Forms.DockStyle.Bottom; this.imageViewerPlayAnim.Dock = System.Windows.Forms.DockStyle.Bottom;
this.imageViewerPlayAnim.Location = new System.Drawing.Point(170, 441); this.imageViewerPlayAnim.Location = new System.Drawing.Point(203, 441);
this.imageViewerPlayAnim.Name = "imageViewerPlayAnim"; this.imageViewerPlayAnim.Name = "imageViewerPlayAnim";
this.imageViewerPlayAnim.Size = new System.Drawing.Size(762, 35); this.imageViewerPlayAnim.Size = new System.Drawing.Size(729, 35);
this.imageViewerPlayAnim.TabIndex = 2; this.imageViewerPlayAnim.TabIndex = 2;
this.imageViewerPlayAnim.Text = "Play Animation"; this.imageViewerPlayAnim.Text = "Play Animation";
this.imageViewerPlayAnim.UseVisualStyleBackColor = true; this.imageViewerPlayAnim.UseVisualStyleBackColor = true;
@ -635,9 +577,9 @@
// //
this.imageViewPictureBox.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64))))); this.imageViewPictureBox.BackColor = System.Drawing.Color.FromArgb(((int) (((byte) (64)))), ((int) (((byte) (64)))), ((int) (((byte) (64)))));
this.imageViewPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.imageViewPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.imageViewPictureBox.Location = new System.Drawing.Point(170, 3); this.imageViewPictureBox.Location = new System.Drawing.Point(203, 3);
this.imageViewPictureBox.Name = "imageViewPictureBox"; this.imageViewPictureBox.Name = "imageViewPictureBox";
this.imageViewPictureBox.Size = new System.Drawing.Size(762, 473); this.imageViewPictureBox.Size = new System.Drawing.Size(729, 473);
this.imageViewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageViewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageViewPictureBox.TabIndex = 1; this.imageViewPictureBox.TabIndex = 1;
this.imageViewPictureBox.TabStop = false; this.imageViewPictureBox.TabStop = false;
@ -647,7 +589,7 @@
this.imagesTreeView.Dock = System.Windows.Forms.DockStyle.Left; this.imagesTreeView.Dock = System.Windows.Forms.DockStyle.Left;
this.imagesTreeView.Location = new System.Drawing.Point(3, 3); this.imagesTreeView.Location = new System.Drawing.Point(3, 3);
this.imagesTreeView.Name = "imagesTreeView"; this.imagesTreeView.Name = "imagesTreeView";
this.imagesTreeView.Size = new System.Drawing.Size(167, 473); this.imagesTreeView.Size = new System.Drawing.Size(200, 473);
this.imagesTreeView.TabIndex = 0; this.imagesTreeView.TabIndex = 0;
this.imagesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.advancedTreeView_AfterSelect); this.imagesTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.advancedTreeView_AfterSelect);
// //
@ -667,7 +609,7 @@
this.soundList.Dock = System.Windows.Forms.DockStyle.Left; this.soundList.Dock = System.Windows.Forms.DockStyle.Left;
this.soundList.Location = new System.Drawing.Point(0, 0); this.soundList.Location = new System.Drawing.Point(0, 0);
this.soundList.Name = "soundList"; this.soundList.Name = "soundList";
this.soundList.Size = new System.Drawing.Size(203, 479); this.soundList.Size = new System.Drawing.Size(200, 479);
this.soundList.TabIndex = 1; this.soundList.TabIndex = 1;
this.soundList.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.soundList_AfterSelect); this.soundList.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.soundList_AfterSelect);
// //
@ -681,6 +623,64 @@
this.playSoundBtn.UseVisualStyleBackColor = true; this.playSoundBtn.UseVisualStyleBackColor = true;
this.playSoundBtn.Click += new System.EventHandler(this.playSoundBtn_Click); this.playSoundBtn.Click += new System.EventHandler(this.playSoundBtn_Click);
// //
// 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);
//
// pluginTab // pluginTab
// //
this.pluginTab.BackColor = System.Drawing.Color.Black; this.pluginTab.BackColor = System.Drawing.Color.Black;
@ -750,11 +750,11 @@
this.mfaTab.ResumeLayout(false); this.mfaTab.ResumeLayout(false);
this.mfaTab.PerformLayout(); this.mfaTab.PerformLayout();
this.packDataTab.ResumeLayout(false); this.packDataTab.ResumeLayout(false);
this.cryptKeyTab.ResumeLayout(false);
this.cryptKeyTab.PerformLayout();
this.imgViewerTab.ResumeLayout(false); this.imgViewerTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize) (this.imageViewPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize) (this.imageViewPictureBox)).EndInit();
this.soundViewTab.ResumeLayout(false); this.soundViewTab.ResumeLayout(false);
this.cryptKeyTab.ResumeLayout(false);
this.cryptKeyTab.PerformLayout();
this.pluginTab.ResumeLayout(false); this.pluginTab.ResumeLayout(false);
this.pluginTab.PerformLayout(); this.pluginTab.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

@ -748,7 +748,7 @@ namespace DotNetCTFDumper.GUI
var fps = (float)anim.MaxSpeed; var fps = (float)anim.MaxSpeed;
float delay = 1f/fps; float delay = 1f/fps;
int i = 0; int i = 0;
if (anim.Repeat > 0) if (anim.Repeat > 0&& anim.Frames.Count>1)
{ {
foreach (Bitmap frame in frames) foreach (Bitmap frame in frames)
{ {
@ -849,6 +849,7 @@ namespace DotNetCTFDumper.GUI
{ {
} }
protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyDown(KeyEventArgs e)
{ {

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using DotNetCTFDumper.MMFParser.EXE.Loaders; using DotNetCTFDumper.MMFParser.EXE.Loaders;
using DotNetCTFDumper.MMFParser.EXE.Loaders.Banks; using DotNetCTFDumper.MMFParser.EXE.Loaders.Banks;
using DotNetCTFDumper.MMFParser.EXE.Loaders.Events;
using DotNetCTFDumper.Utils; using DotNetCTFDumper.Utils;
namespace DotNetCTFDumper.MMFParser.EXE namespace DotNetCTFDumper.MMFParser.EXE
@ -248,7 +249,7 @@ namespace DotNetCTFDumper.MMFParser.EXE
loader = new GlobalStrings(chunk); loader = new GlobalStrings(chunk);
break; break;
case 13117: case 13117:
//loader = new Events(chunk);//NOT WORKING // loader = new Events(chunk);//NOT WORKING
break; break;

@ -41,9 +41,9 @@ namespace DotNetCTFDumper.MMFParser.EXE
int possition = 0; int possition = 0;
for (int i = 0; i < numOfSections; i++) for (int i = 0; i < numOfSections; i++)
{ {
var entry = exeReader.Tell(); long entry = exeReader.Tell();
var sectionName = exeReader.ReadAscii(); string sectionName = exeReader.ReadAscii();
if (sectionName == ".extra") if (sectionName == ".extra")
{ {

@ -46,6 +46,12 @@ namespace DotNetCTFDumper.MMFParser.EXE.Loaders.Banks
Settings.DumpImages = cache; Settings.DumpImages = cache;
} }
public ImageItem FromHandle(int handle)
{
Images.TryGetValue(handle, out var img);
if (img == null) return null;
else return img;
}
public void LoadByHandle(int handle) public void LoadByHandle(int handle)

@ -30,7 +30,7 @@ namespace DotNetCTFDumper.MMFParser.EXE
uint count = exeReader.ReadUInt32(); uint count = exeReader.ReadUInt32();
Logger.Log($"Found {count} Pack Files:", true, ConsoleColor.Blue); Logger.Log($"Found {count} Pack Files", true, ConsoleColor.Blue);
long offset = exeReader.Tell(); long offset = exeReader.Tell();
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)

@ -67,7 +67,7 @@ namespace DotNetCTFDumper.MMFParser.MFA.Loaders
Value = Reader.ReadInt32(); Value = Reader.ReadInt32();
break; break;
case 1://double case 1://double
Value = Reader.ReadDouble(); Value = Reader.ReadSingle();
break; break;
} }
} }

@ -27,12 +27,15 @@ namespace DotNetCTFDumper.MMFParser.MFA.Loaders.mfachunks
{ {
try try
{ {
var value = _qualifiers[i]; //var value = _qualifiers[i];
Writer.WriteInt16(value); Writer.WriteInt16(-1);
break;
} }
catch catch
{ {
break;
} }
} }

@ -245,21 +245,24 @@ namespace DotNetCTFDumper.MMFParser.Translation
{ {
frameItem = FrameItems[instance.ObjectInfo]; frameItem = FrameItems[instance.ObjectInfo];
} }
catch{} catch
{
throw new NotImplementedException("ObjectInfo not found, this may cause errors");
}
if (frameItem != null) if (frameItem != null)
{ {
//newFrameItems.Add(frameItem); newFrameItems.Add(frameItem);
var newInstance = new FrameInstance((ByteReader) null); var newInstance = new FrameInstance((ByteReader) null);
newInstance.X = instance.X; newInstance.X = instance.X;
newInstance.Y = instance.Y; newInstance.Y = instance.Y;
newInstance.Handle = i; newInstance.Handle = instance.Handle;
newInstance.Flags = 0; newInstance.Flags = 0;
newInstance.ParentType = (uint) instance.ParentType; newInstance.ParentType = (uint) instance.ParentType;
newInstance.ItemHandle = instance.ObjectInfo; newInstance.ItemHandle = instance.ObjectInfo;
newInstance.ParentHandle = (uint) instance.ParentHandle; newInstance.ParentHandle = (uint) instance.ParentHandle;
newInstance.Layer = (uint) instance.Layer; newInstance.Layer = (uint) instance.Layer;
//newInstances.Add(newInstance); newInstances.Add(newInstance);
} }
break; break;
} }

@ -82,7 +82,7 @@ namespace DotNetCTFDumper
Settings.DumpSounds = dumpSounds; Settings.DumpSounds = dumpSounds;
Settings.Verbose = verbose; Settings.Verbose = verbose;
var exeReader = new ByteReader(path, FileMode.OpenOrCreate); var exeReader = new ByteReader(path, FileMode.Open);
var currentExe = new Exe(); var currentExe = new Exe();
Exe.Instance = currentExe; Exe.Instance = currentExe;
currentExe.ParseExe(exeReader); currentExe.ParseExe(exeReader);

Loading…
Cancel
Save