diff --git a/LUAManager/MainForm.Designer.cs b/LUAManager/MainForm.Designer.cs index cfb9771..f3cbe64 100644 --- a/LUAManager/MainForm.Designer.cs +++ b/LUAManager/MainForm.Designer.cs @@ -31,7 +31,6 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.EncryptButton = new System.Windows.Forms.Button(); - this.DecryptButton = new System.Windows.Forms.Button(); this.DecodeButton = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label1 = new System.Windows.Forms.Label(); @@ -77,43 +76,62 @@ private void InitializeComponent() this.fileRadio = new System.Windows.Forms.RadioButton(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.checkBoxDataMode = new System.Windows.Forms.CheckBox(); + this.radioButtonEncrypt = new System.Windows.Forms.RadioButton(); + this.radioButtonDecrypt = new System.Windows.Forms.RadioButton(); + this.panelCrypt = new System.Windows.Forms.Panel(); + this.AssembleButton = new System.Windows.Forms.Button(); + this.assemblePanel = new System.Windows.Forms.Panel(); + this.buttonAssembleInput = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.labelAssembleOutput = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.labelAssembleInput = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.buttonAssembleOutput = new System.Windows.Forms.Button(); + this.panelAssemble = new System.Windows.Forms.Panel(); + this.radioButtonDisassemble = new System.Windows.Forms.RadioButton(); + this.radioButtonAssemble = new System.Windows.Forms.RadioButton(); + this.disassemblePanel = new System.Windows.Forms.Panel(); + this.buttonDisassembleInput = new System.Windows.Forms.Button(); + this.label3 = new System.Windows.Forms.Label(); + this.labelDisassembleOutput = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.labelDisassembleInput = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.buttonDisassembleOutput = new System.Windows.Forms.Button(); + this.checkBoxFolderMode = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.encryptPanel.SuspendLayout(); this.decryptPanel.SuspendLayout(); this.decodePanel.SuspendLayout(); + this.panelCrypt.SuspendLayout(); + this.assemblePanel.SuspendLayout(); + this.panelAssemble.SuspendLayout(); + this.disassemblePanel.SuspendLayout(); this.SuspendLayout(); // // EncryptButton // this.EncryptButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.EncryptButton.ForeColor = System.Drawing.Color.White; - this.EncryptButton.Location = new System.Drawing.Point(12, 12); + this.EncryptButton.Location = new System.Drawing.Point(14, 14); + this.EncryptButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.EncryptButton.Name = "EncryptButton"; - this.EncryptButton.Size = new System.Drawing.Size(75, 57); + this.EncryptButton.Size = new System.Drawing.Size(86, 68); this.EncryptButton.TabIndex = 0; - this.EncryptButton.Text = "Encrypt"; + this.EncryptButton.Text = "Crypt"; this.EncryptButton.UseVisualStyleBackColor = true; this.EncryptButton.Click += new System.EventHandler(this.EncryptButton_Click); // - // DecryptButton - // - this.DecryptButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.DecryptButton.ForeColor = System.Drawing.Color.White; - this.DecryptButton.Location = new System.Drawing.Point(177, 12); - this.DecryptButton.Name = "DecryptButton"; - this.DecryptButton.Size = new System.Drawing.Size(75, 57); - this.DecryptButton.TabIndex = 1; - this.DecryptButton.Text = "Decrypt"; - this.DecryptButton.UseVisualStyleBackColor = true; - this.DecryptButton.Click += new System.EventHandler(this.DecryptButton_Click); - // // DecodeButton // this.DecodeButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.DecodeButton.ForeColor = System.Drawing.Color.White; - this.DecodeButton.Location = new System.Drawing.Point(341, 12); + this.DecodeButton.Location = new System.Drawing.Point(205, 13); + this.DecodeButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.DecodeButton.Name = "DecodeButton"; - this.DecodeButton.Size = new System.Drawing.Size(75, 57); + this.DecodeButton.Size = new System.Drawing.Size(86, 68); this.DecodeButton.TabIndex = 2; this.DecodeButton.Text = "Decode"; this.DecodeButton.UseVisualStyleBackColor = true; @@ -122,9 +140,10 @@ private void InitializeComponent() // pictureBox1 // this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(360, 380); + this.pictureBox1.Location = new System.Drawing.Point(411, 456); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(100, 78); + this.pictureBox1.Size = new System.Drawing.Size(114, 94); this.pictureBox1.TabIndex = 3; this.pictureBox1.TabStop = false; // @@ -132,9 +151,9 @@ private void InitializeComponent() // this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.Color.Transparent; - this.label1.Location = new System.Drawing.Point(1, 5); + this.label1.Location = new System.Drawing.Point(1, 6); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(41, 15); + this.label1.Size = new System.Drawing.Size(42, 18); this.label1.TabIndex = 4; this.label1.Text = "Game:"; // @@ -142,9 +161,9 @@ private void InitializeComponent() // this.encryptInputLabel.AutoSize = true; this.encryptInputLabel.ForeColor = System.Drawing.Color.Transparent; - this.encryptInputLabel.Location = new System.Drawing.Point(1, 43); + this.encryptInputLabel.Location = new System.Drawing.Point(0, 57); this.encryptInputLabel.Name = "encryptInputLabel"; - this.encryptInputLabel.Size = new System.Drawing.Size(103, 15); + this.encryptInputLabel.Size = new System.Drawing.Size(128, 18); this.encryptInputLabel.TabIndex = 5; this.encryptInputLabel.Text = "Encrypt files from:"; // @@ -152,9 +171,9 @@ private void InitializeComponent() // this.encryptOutputLabel.AutoSize = true; this.encryptOutputLabel.ForeColor = System.Drawing.Color.Transparent; - this.encryptOutputLabel.Location = new System.Drawing.Point(1, 89); + this.encryptOutputLabel.Location = new System.Drawing.Point(1, 111); this.encryptOutputLabel.Name = "encryptOutputLabel"; - this.encryptOutputLabel.Size = new System.Drawing.Size(62, 15); + this.encryptOutputLabel.Size = new System.Drawing.Size(75, 18); this.encryptOutputLabel.TabIndex = 6; this.encryptOutputLabel.Text = "Output to:"; // @@ -163,9 +182,10 @@ private void InitializeComponent() this.button1.BackColor = System.Drawing.Color.Green; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button1.ForeColor = System.Drawing.Color.White; - this.button1.Location = new System.Drawing.Point(72, 87); + this.button1.Location = new System.Drawing.Point(82, 104); + this.button1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.Size = new System.Drawing.Size(86, 28); this.button1.TabIndex = 7; this.button1.Text = "Browse"; this.button1.UseVisualStyleBackColor = false; @@ -176,9 +196,10 @@ private void InitializeComponent() this.button2.BackColor = System.Drawing.Color.Green; this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button2.ForeColor = System.Drawing.Color.White; - this.button2.Location = new System.Drawing.Point(120, 41); + this.button2.Location = new System.Drawing.Point(137, 50); + this.button2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.Size = new System.Drawing.Size(86, 28); this.button2.TabIndex = 8; this.button2.Text = "Browse"; this.button2.UseVisualStyleBackColor = false; @@ -187,9 +208,9 @@ private void InitializeComponent() // encryptInputFile // this.encryptInputFile.ForeColor = System.Drawing.Color.White; - this.encryptInputFile.Location = new System.Drawing.Point(3, 66); + this.encryptInputFile.Location = new System.Drawing.Point(3, 79); this.encryptInputFile.Name = "encryptInputFile"; - this.encryptInputFile.Size = new System.Drawing.Size(398, 18); + this.encryptInputFile.Size = new System.Drawing.Size(455, 22); this.encryptInputFile.TabIndex = 9; this.encryptInputFile.Text = "InputFilePath"; this.encryptInputFile.Visible = false; @@ -209,17 +230,19 @@ private void InitializeComponent() this.encryptPanel.Controls.Add(this.SevenZipCheck); this.encryptPanel.Controls.Add(this.LZMACheck); this.encryptPanel.Controls.Add(this.RawFileCheck); - this.encryptPanel.Location = new System.Drawing.Point(12, 103); + this.encryptPanel.Location = new System.Drawing.Point(14, 182); + this.encryptPanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.encryptPanel.Name = "encryptPanel"; - this.encryptPanel.Size = new System.Drawing.Size(404, 214); + this.encryptPanel.Size = new System.Drawing.Size(462, 256); this.encryptPanel.TabIndex = 10; // // customKeyEnc // - this.customKeyEnc.Location = new System.Drawing.Point(202, 0); + this.customKeyEnc.Location = new System.Drawing.Point(231, 0); + this.customKeyEnc.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.customKeyEnc.Name = "customKeyEnc"; this.customKeyEnc.PlaceholderText = "Put a custom key here"; - this.customKeyEnc.Size = new System.Drawing.Size(199, 23); + this.customKeyEnc.Size = new System.Drawing.Size(227, 26); this.customKeyEnc.TabIndex = 29; this.customKeyEnc.Visible = false; // @@ -227,9 +250,9 @@ private void InitializeComponent() // this.encryptBrotipLabel.AutoSize = true; this.encryptBrotipLabel.ForeColor = System.Drawing.Color.White; - this.encryptBrotipLabel.Location = new System.Drawing.Point(0, 157); + this.encryptBrotipLabel.Location = new System.Drawing.Point(0, 188); this.encryptBrotipLabel.Name = "encryptBrotipLabel"; - this.encryptBrotipLabel.Size = new System.Drawing.Size(404, 30); + this.encryptBrotipLabel.Size = new System.Drawing.Size(480, 36); this.encryptBrotipLabel.TabIndex = 13; this.encryptBrotipLabel.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or LZMA \r\ncompr" + "ession."; @@ -247,19 +270,21 @@ private void InitializeComponent() "Angry Birds Star Wars", "Angry Birds Star Wars II", "Angry Birds Friends", + "Angry Birds Stella", "Custom key"}); - this.encryptGameSelect.Location = new System.Drawing.Point(49, 1); + this.encryptGameSelect.Location = new System.Drawing.Point(56, 1); + this.encryptGameSelect.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.encryptGameSelect.Name = "encryptGameSelect"; - this.encryptGameSelect.Size = new System.Drawing.Size(146, 23); + this.encryptGameSelect.Size = new System.Drawing.Size(166, 26); this.encryptGameSelect.TabIndex = 11; this.encryptGameSelect.SelectedIndexChanged += new System.EventHandler(this.IndexChangeEnc); // // encryptOutputFile // this.encryptOutputFile.ForeColor = System.Drawing.Color.White; - this.encryptOutputFile.Location = new System.Drawing.Point(3, 113); + this.encryptOutputFile.Location = new System.Drawing.Point(3, 136); this.encryptOutputFile.Name = "encryptOutputFile"; - this.encryptOutputFile.Size = new System.Drawing.Size(398, 44); + this.encryptOutputFile.Size = new System.Drawing.Size(455, 53); this.encryptOutputFile.TabIndex = 10; this.encryptOutputFile.Text = "OutputFilePath"; this.encryptOutputFile.Visible = false; @@ -268,9 +293,10 @@ private void InitializeComponent() // this.SevenZipCheck.AutoSize = true; this.SevenZipCheck.ForeColor = System.Drawing.Color.White; - this.SevenZipCheck.Location = new System.Drawing.Point(2, 23); + this.SevenZipCheck.Location = new System.Drawing.Point(2, 28); + this.SevenZipCheck.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.SevenZipCheck.Name = "SevenZipCheck"; - this.SevenZipCheck.Size = new System.Drawing.Size(125, 19); + this.SevenZipCheck.Size = new System.Drawing.Size(150, 22); this.SevenZipCheck.TabIndex = 26; this.SevenZipCheck.Text = "Export in 7z format"; this.SevenZipCheck.UseVisualStyleBackColor = true; @@ -279,9 +305,10 @@ private void InitializeComponent() // this.LZMACheck.AutoSize = true; this.LZMACheck.ForeColor = System.Drawing.Color.White; - this.LZMACheck.Location = new System.Drawing.Point(131, 23); + this.LZMACheck.Location = new System.Drawing.Point(150, 28); + this.LZMACheck.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.LZMACheck.Name = "LZMACheck"; - this.LZMACheck.Size = new System.Drawing.Size(146, 19); + this.LZMACheck.Size = new System.Drawing.Size(170, 22); this.LZMACheck.TabIndex = 27; this.LZMACheck.Text = "Export in LZMA format"; this.LZMACheck.UseVisualStyleBackColor = true; @@ -291,9 +318,10 @@ private void InitializeComponent() this.RawFileCheck.AutoSize = true; this.RawFileCheck.Checked = true; this.RawFileCheck.ForeColor = System.Drawing.Color.White; - this.RawFileCheck.Location = new System.Drawing.Point(283, 23); + this.RawFileCheck.Location = new System.Drawing.Point(323, 28); + this.RawFileCheck.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.RawFileCheck.Name = "RawFileCheck"; - this.RawFileCheck.Size = new System.Drawing.Size(81, 19); + this.RawFileCheck.Size = new System.Drawing.Size(100, 22); this.RawFileCheck.TabIndex = 28; this.RawFileCheck.TabStop = true; this.RawFileCheck.Text = "Export raw"; @@ -304,9 +332,10 @@ private void InitializeComponent() this.LetsGo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); this.LetsGo.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.LetsGo.ForeColor = System.Drawing.Color.White; - this.LetsGo.Location = new System.Drawing.Point(167, 322); + this.LetsGo.Location = new System.Drawing.Point(191, 445); + this.LetsGo.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.LetsGo.Name = "LetsGo"; - this.LetsGo.Size = new System.Drawing.Size(95, 23); + this.LetsGo.Size = new System.Drawing.Size(109, 28); this.LetsGo.TabIndex = 11; this.LetsGo.Text = "LET\'S GOOO"; this.LetsGo.UseVisualStyleBackColor = false; @@ -315,9 +344,9 @@ private void InitializeComponent() // letsGoText // this.letsGoText.ForeColor = System.Drawing.Color.White; - this.letsGoText.Location = new System.Drawing.Point(12, 354); + this.letsGoText.Location = new System.Drawing.Point(192, 484); this.letsGoText.Name = "letsGoText"; - this.letsGoText.Size = new System.Drawing.Size(404, 23); + this.letsGoText.Size = new System.Drawing.Size(108, 28); this.letsGoText.TabIndex = 12; this.letsGoText.Text = "Lets go!"; this.letsGoText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -337,9 +366,10 @@ private void InitializeComponent() this.decryptPanel.Controls.Add(this.label9); this.decryptPanel.Controls.Add(this.decryptOutputLabel); this.decryptPanel.Controls.Add(this.decryptOutputFileButton); - this.decryptPanel.Location = new System.Drawing.Point(12, 103); + this.decryptPanel.Location = new System.Drawing.Point(14, 182); + this.decryptPanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.decryptPanel.Name = "decryptPanel"; - this.decryptPanel.Size = new System.Drawing.Size(404, 214); + this.decryptPanel.Size = new System.Drawing.Size(462, 256); this.decryptPanel.TabIndex = 15; this.decryptPanel.Visible = false; // @@ -350,19 +380,21 @@ private void InitializeComponent() this.autoUnlzma.Checked = true; this.autoUnlzma.CheckState = System.Windows.Forms.CheckState.Checked; this.autoUnlzma.ForeColor = System.Drawing.Color.White; - this.autoUnlzma.Location = new System.Drawing.Point(205, 24); + this.autoUnlzma.Location = new System.Drawing.Point(234, 29); + this.autoUnlzma.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.autoUnlzma.Name = "autoUnlzma"; - this.autoUnlzma.Size = new System.Drawing.Size(170, 19); + this.autoUnlzma.Size = new System.Drawing.Size(191, 22); this.autoUnlzma.TabIndex = 21; this.autoUnlzma.Text = "Auto-decode LZMA format"; this.autoUnlzma.UseVisualStyleBackColor = false; // // customKeyDec // - this.customKeyDec.Location = new System.Drawing.Point(202, 0); + this.customKeyDec.Location = new System.Drawing.Point(231, 0); + this.customKeyDec.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.customKeyDec.Name = "customKeyDec"; this.customKeyDec.PlaceholderText = "Put a custom key here"; - this.customKeyDec.Size = new System.Drawing.Size(199, 23); + this.customKeyDec.Size = new System.Drawing.Size(227, 26); this.customKeyDec.TabIndex = 20; this.customKeyDec.Visible = false; // @@ -371,9 +403,10 @@ private void InitializeComponent() this.decryptInputFileButton.BackColor = System.Drawing.Color.Green; this.decryptInputFileButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.decryptInputFileButton.ForeColor = System.Drawing.Color.White; - this.decryptInputFileButton.Location = new System.Drawing.Point(120, 41); + this.decryptInputFileButton.Location = new System.Drawing.Point(137, 50); + this.decryptInputFileButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.decryptInputFileButton.Name = "decryptInputFileButton"; - this.decryptInputFileButton.Size = new System.Drawing.Size(75, 23); + this.decryptInputFileButton.Size = new System.Drawing.Size(86, 28); this.decryptInputFileButton.TabIndex = 8; this.decryptInputFileButton.Text = "Browse"; this.decryptInputFileButton.UseVisualStyleBackColor = false; @@ -382,9 +415,9 @@ private void InitializeComponent() // decryptBrotipLabel // this.decryptBrotipLabel.ForeColor = System.Drawing.Color.White; - this.decryptBrotipLabel.Location = new System.Drawing.Point(0, 157); + this.decryptBrotipLabel.Location = new System.Drawing.Point(0, 188); this.decryptBrotipLabel.Name = "decryptBrotipLabel"; - this.decryptBrotipLabel.Size = new System.Drawing.Size(401, 57); + this.decryptBrotipLabel.Size = new System.Drawing.Size(458, 68); this.decryptBrotipLabel.TabIndex = 13; this.decryptBrotipLabel.Text = "Brotip: Have 2 folders, one with the files to be decrypted, and another to send t" + "he files to."; @@ -396,9 +429,10 @@ private void InitializeComponent() this.autoUnzip.Checked = true; this.autoUnzip.CheckState = System.Windows.Forms.CheckState.Checked; this.autoUnzip.ForeColor = System.Drawing.Color.White; - this.autoUnzip.Location = new System.Drawing.Point(3, 24); + this.autoUnzip.Location = new System.Drawing.Point(3, 29); + this.autoUnzip.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.autoUnzip.Name = "autoUnzip"; - this.autoUnzip.Size = new System.Drawing.Size(203, 19); + this.autoUnzip.Size = new System.Drawing.Size(240, 22); this.autoUnzip.TabIndex = 12; this.autoUnzip.Text = "Automatically unzip 7z if required"; this.autoUnzip.UseVisualStyleBackColor = false; @@ -416,19 +450,21 @@ private void InitializeComponent() "Angry Birds Star Wars", "Angry Birds Star Wars II", "Angry Birds Friends", + "Angry Birds Stella", "Custom key"}); - this.decryptGameSelect.Location = new System.Drawing.Point(49, 1); + this.decryptGameSelect.Location = new System.Drawing.Point(56, 1); + this.decryptGameSelect.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.decryptGameSelect.Name = "decryptGameSelect"; - this.decryptGameSelect.Size = new System.Drawing.Size(146, 23); + this.decryptGameSelect.Size = new System.Drawing.Size(166, 26); this.decryptGameSelect.TabIndex = 11; this.decryptGameSelect.SelectedIndexChanged += new System.EventHandler(this.checkForFifthopt); // // decryptOutputFile // this.decryptOutputFile.ForeColor = System.Drawing.Color.White; - this.decryptOutputFile.Location = new System.Drawing.Point(3, 113); + this.decryptOutputFile.Location = new System.Drawing.Point(3, 136); this.decryptOutputFile.Name = "decryptOutputFile"; - this.decryptOutputFile.Size = new System.Drawing.Size(398, 44); + this.decryptOutputFile.Size = new System.Drawing.Size(455, 53); this.decryptOutputFile.TabIndex = 10; this.decryptOutputFile.Text = "OutputFilePath"; this.decryptOutputFile.Visible = false; @@ -437,18 +473,18 @@ private void InitializeComponent() // this.decryptInputLabel.AutoSize = true; this.decryptInputLabel.ForeColor = System.Drawing.Color.Transparent; - this.decryptInputLabel.Location = new System.Drawing.Point(1, 43); + this.decryptInputLabel.Location = new System.Drawing.Point(0, 57); this.decryptInputLabel.Name = "decryptInputLabel"; - this.decryptInputLabel.Size = new System.Drawing.Size(104, 15); + this.decryptInputLabel.Size = new System.Drawing.Size(128, 18); this.decryptInputLabel.TabIndex = 5; this.decryptInputLabel.Text = "Decrypt files from:"; // // decryptInputFile // this.decryptInputFile.ForeColor = System.Drawing.Color.White; - this.decryptInputFile.Location = new System.Drawing.Point(3, 66); + this.decryptInputFile.Location = new System.Drawing.Point(3, 79); this.decryptInputFile.Name = "decryptInputFile"; - this.decryptInputFile.Size = new System.Drawing.Size(398, 18); + this.decryptInputFile.Size = new System.Drawing.Size(455, 22); this.decryptInputFile.TabIndex = 9; this.decryptInputFile.Text = "InputFilePath"; this.decryptInputFile.Visible = false; @@ -457,9 +493,9 @@ private void InitializeComponent() // this.label9.AutoSize = true; this.label9.ForeColor = System.Drawing.Color.Transparent; - this.label9.Location = new System.Drawing.Point(1, 5); + this.label9.Location = new System.Drawing.Point(1, 6); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(41, 15); + this.label9.Size = new System.Drawing.Size(42, 18); this.label9.TabIndex = 4; this.label9.Text = "Game:"; // @@ -467,9 +503,9 @@ private void InitializeComponent() // this.decryptOutputLabel.AutoSize = true; this.decryptOutputLabel.ForeColor = System.Drawing.Color.Transparent; - this.decryptOutputLabel.Location = new System.Drawing.Point(1, 89); + this.decryptOutputLabel.Location = new System.Drawing.Point(1, 111); this.decryptOutputLabel.Name = "decryptOutputLabel"; - this.decryptOutputLabel.Size = new System.Drawing.Size(62, 15); + this.decryptOutputLabel.Size = new System.Drawing.Size(75, 18); this.decryptOutputLabel.TabIndex = 6; this.decryptOutputLabel.Text = "Output to:"; // @@ -478,9 +514,10 @@ private void InitializeComponent() this.decryptOutputFileButton.BackColor = System.Drawing.Color.Green; this.decryptOutputFileButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.decryptOutputFileButton.ForeColor = System.Drawing.Color.White; - this.decryptOutputFileButton.Location = new System.Drawing.Point(72, 87); + this.decryptOutputFileButton.Location = new System.Drawing.Point(82, 104); + this.decryptOutputFileButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.decryptOutputFileButton.Name = "decryptOutputFileButton"; - this.decryptOutputFileButton.Size = new System.Drawing.Size(75, 23); + this.decryptOutputFileButton.Size = new System.Drawing.Size(86, 28); this.decryptOutputFileButton.TabIndex = 7; this.decryptOutputFileButton.Text = "Browse"; this.decryptOutputFileButton.UseVisualStyleBackColor = false; @@ -495,9 +532,10 @@ private void InitializeComponent() this.decodePanel.Controls.Add(this.decodeInputFile); this.decodePanel.Controls.Add(this.decodeOutputLabel); this.decodePanel.Controls.Add(this.button4); - this.decodePanel.Location = new System.Drawing.Point(12, 103); + this.decodePanel.Location = new System.Drawing.Point(14, 182); + this.decodePanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.decodePanel.Name = "decodePanel"; - this.decodePanel.Size = new System.Drawing.Size(404, 214); + this.decodePanel.Size = new System.Drawing.Size(462, 256); this.decodePanel.TabIndex = 17; this.decodePanel.Visible = false; // @@ -506,9 +544,10 @@ private void InitializeComponent() this.button3.BackColor = System.Drawing.Color.Green; this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button3.ForeColor = System.Drawing.Color.White; - this.button3.Location = new System.Drawing.Point(120, 4); + this.button3.Location = new System.Drawing.Point(137, 4); + this.button3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.Size = new System.Drawing.Size(86, 28); this.button3.TabIndex = 8; this.button3.Text = "Browse"; this.button3.UseVisualStyleBackColor = false; @@ -517,9 +556,9 @@ private void InitializeComponent() // decodeBrotipLabel // this.decodeBrotipLabel.ForeColor = System.Drawing.Color.White; - this.decodeBrotipLabel.Location = new System.Drawing.Point(0, 132); + this.decodeBrotipLabel.Location = new System.Drawing.Point(0, 158); this.decodeBrotipLabel.Name = "decodeBrotipLabel"; - this.decodeBrotipLabel.Size = new System.Drawing.Size(401, 40); + this.decodeBrotipLabel.Size = new System.Drawing.Size(458, 48); this.decodeBrotipLabel.TabIndex = 13; this.decodeBrotipLabel.Text = "Brotip: Make sure all LUA files in the folder are not encrypted before you contin" + "ue\r\n"; @@ -527,9 +566,9 @@ private void InitializeComponent() // decodeOutputFile // this.decodeOutputFile.ForeColor = System.Drawing.Color.White; - this.decodeOutputFile.Location = new System.Drawing.Point(3, 76); + this.decodeOutputFile.Location = new System.Drawing.Point(3, 91); this.decodeOutputFile.Name = "decodeOutputFile"; - this.decodeOutputFile.Size = new System.Drawing.Size(398, 44); + this.decodeOutputFile.Size = new System.Drawing.Size(455, 53); this.decodeOutputFile.TabIndex = 10; this.decodeOutputFile.Text = "OutputFilePath"; this.decodeOutputFile.Visible = false; @@ -538,18 +577,18 @@ private void InitializeComponent() // this.decodeInputLabel.AutoSize = true; this.decodeInputLabel.ForeColor = System.Drawing.Color.Transparent; - this.decodeInputLabel.Location = new System.Drawing.Point(1, 6); + this.decodeInputLabel.Location = new System.Drawing.Point(3, 7); this.decodeInputLabel.Name = "decodeInputLabel"; - this.decodeInputLabel.Size = new System.Drawing.Size(103, 15); + this.decodeInputLabel.Size = new System.Drawing.Size(121, 18); this.decodeInputLabel.TabIndex = 5; this.decodeInputLabel.Text = "Decode files from:"; // // decodeInputFile // this.decodeInputFile.ForeColor = System.Drawing.Color.White; - this.decodeInputFile.Location = new System.Drawing.Point(3, 29); + this.decodeInputFile.Location = new System.Drawing.Point(3, 35); this.decodeInputFile.Name = "decodeInputFile"; - this.decodeInputFile.Size = new System.Drawing.Size(398, 18); + this.decodeInputFile.Size = new System.Drawing.Size(455, 22); this.decodeInputFile.TabIndex = 9; this.decodeInputFile.Text = "InputFilePath"; this.decodeInputFile.Visible = false; @@ -558,9 +597,9 @@ private void InitializeComponent() // this.decodeOutputLabel.AutoSize = true; this.decodeOutputLabel.ForeColor = System.Drawing.Color.Transparent; - this.decodeOutputLabel.Location = new System.Drawing.Point(1, 52); + this.decodeOutputLabel.Location = new System.Drawing.Point(3, 66); this.decodeOutputLabel.Name = "decodeOutputLabel"; - this.decodeOutputLabel.Size = new System.Drawing.Size(62, 15); + this.decodeOutputLabel.Size = new System.Drawing.Size(75, 18); this.decodeOutputLabel.TabIndex = 6; this.decodeOutputLabel.Text = "Output to:"; // @@ -569,9 +608,10 @@ private void InitializeComponent() this.button4.BackColor = System.Drawing.Color.Green; this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button4.ForeColor = System.Drawing.Color.White; - this.button4.Location = new System.Drawing.Point(72, 50); + this.button4.Location = new System.Drawing.Point(82, 60); + this.button4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.Size = new System.Drawing.Size(86, 28); this.button4.TabIndex = 7; this.button4.Text = "Browse"; this.button4.UseVisualStyleBackColor = false; @@ -581,9 +621,10 @@ private void InitializeComponent() // this.folderRadio.AutoSize = true; this.folderRadio.ForeColor = System.Drawing.Color.White; - this.folderRadio.Location = new System.Drawing.Point(217, 75); + this.folderRadio.Location = new System.Drawing.Point(255, 148); + this.folderRadio.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.folderRadio.Name = "folderRadio"; - this.folderRadio.Size = new System.Drawing.Size(58, 19); + this.folderRadio.Size = new System.Drawing.Size(72, 22); this.folderRadio.TabIndex = 18; this.folderRadio.TabStop = true; this.folderRadio.Text = "Folder"; @@ -594,10 +635,11 @@ private void InitializeComponent() // this.fileRadio.AutoSize = true; this.fileRadio.ForeColor = System.Drawing.Color.White; - this.fileRadio.Location = new System.Drawing.Point(168, 75); + this.fileRadio.Location = new System.Drawing.Point(192, 148); + this.fileRadio.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.fileRadio.Name = "fileRadio"; this.fileRadio.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.fileRadio.Size = new System.Drawing.Size(43, 19); + this.fileRadio.Size = new System.Drawing.Size(52, 22); this.fileRadio.TabIndex = 19; this.fileRadio.TabStop = true; this.fileRadio.Text = "File"; @@ -609,29 +651,346 @@ private void InitializeComponent() // this.openFileDialog1.FileName = "openFileDialog1"; // + // checkBoxDataMode + // + this.checkBoxDataMode.AutoSize = true; + this.checkBoxDataMode.BackColor = System.Drawing.Color.Transparent; + this.checkBoxDataMode.ForeColor = System.Drawing.Color.White; + this.checkBoxDataMode.Location = new System.Drawing.Point(333, 29); + this.checkBoxDataMode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxDataMode.Name = "checkBoxDataMode"; + this.checkBoxDataMode.Size = new System.Drawing.Size(119, 22); + this.checkBoxDataMode.TabIndex = 20; + this.checkBoxDataMode.Text = "Data LUA mode"; + this.checkBoxDataMode.UseVisualStyleBackColor = false; + // + // radioButtonEncrypt + // + this.radioButtonEncrypt.AutoSize = true; + this.radioButtonEncrypt.ForeColor = System.Drawing.Color.White; + this.radioButtonEncrypt.Location = new System.Drawing.Point(152, 26); + this.radioButtonEncrypt.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.radioButtonEncrypt.Name = "radioButtonEncrypt"; + this.radioButtonEncrypt.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.radioButtonEncrypt.Size = new System.Drawing.Size(79, 22); + this.radioButtonEncrypt.TabIndex = 22; + this.radioButtonEncrypt.TabStop = true; + this.radioButtonEncrypt.Text = "Encrypt"; + this.radioButtonEncrypt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.radioButtonEncrypt.UseVisualStyleBackColor = true; + this.radioButtonEncrypt.CheckedChanged += new System.EventHandler(this.radioButtonEncrypt_CheckedChanged); + // + // radioButtonDecrypt + // + this.radioButtonDecrypt.AutoSize = true; + this.radioButtonDecrypt.ForeColor = System.Drawing.Color.White; + this.radioButtonDecrypt.Location = new System.Drawing.Point(238, 26); + this.radioButtonDecrypt.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.radioButtonDecrypt.Name = "radioButtonDecrypt"; + this.radioButtonDecrypt.Size = new System.Drawing.Size(79, 22); + this.radioButtonDecrypt.TabIndex = 21; + this.radioButtonDecrypt.TabStop = true; + this.radioButtonDecrypt.Text = "Decrypt"; + this.radioButtonDecrypt.UseVisualStyleBackColor = true; + this.radioButtonDecrypt.CheckedChanged += new System.EventHandler(this.radioButtonDecrypt_CheckedChanged); + // + // panelCrypt + // + this.panelCrypt.Controls.Add(this.radioButtonEncrypt); + this.panelCrypt.Controls.Add(this.radioButtonDecrypt); + this.panelCrypt.Controls.Add(this.checkBoxDataMode); + this.panelCrypt.Location = new System.Drawing.Point(17, 89); + this.panelCrypt.Name = "panelCrypt"; + this.panelCrypt.Size = new System.Drawing.Size(451, 51); + this.panelCrypt.TabIndex = 23; + // + // AssembleButton + // + this.AssembleButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.AssembleButton.ForeColor = System.Drawing.Color.White; + this.AssembleButton.Location = new System.Drawing.Point(386, 13); + this.AssembleButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.AssembleButton.Name = "AssembleButton"; + this.AssembleButton.Size = new System.Drawing.Size(86, 68); + this.AssembleButton.TabIndex = 24; + this.AssembleButton.Text = "Assemble"; + this.AssembleButton.UseVisualStyleBackColor = true; + this.AssembleButton.Click += new System.EventHandler(this.AssembleButton_Click); + // + // assemblePanel + // + this.assemblePanel.Controls.Add(this.buttonAssembleInput); + this.assemblePanel.Controls.Add(this.label2); + this.assemblePanel.Controls.Add(this.labelAssembleOutput); + this.assemblePanel.Controls.Add(this.label4); + this.assemblePanel.Controls.Add(this.labelAssembleInput); + this.assemblePanel.Controls.Add(this.label7); + this.assemblePanel.Controls.Add(this.buttonAssembleOutput); + this.assemblePanel.Location = new System.Drawing.Point(14, 182); + this.assemblePanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.assemblePanel.Name = "assemblePanel"; + this.assemblePanel.Size = new System.Drawing.Size(462, 256); + this.assemblePanel.TabIndex = 25; + this.assemblePanel.Visible = false; + // + // buttonAssembleInput + // + this.buttonAssembleInput.BackColor = System.Drawing.Color.Green; + this.buttonAssembleInput.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonAssembleInput.ForeColor = System.Drawing.Color.White; + this.buttonAssembleInput.Location = new System.Drawing.Point(137, 4); + this.buttonAssembleInput.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonAssembleInput.Name = "buttonAssembleInput"; + this.buttonAssembleInput.Size = new System.Drawing.Size(86, 28); + this.buttonAssembleInput.TabIndex = 8; + this.buttonAssembleInput.Text = "Browse"; + this.buttonAssembleInput.UseVisualStyleBackColor = false; + this.buttonAssembleInput.Click += new System.EventHandler(this.buttonAssembleInput_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.ForeColor = System.Drawing.Color.White; + this.label2.Location = new System.Drawing.Point(0, 158); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(480, 36); + this.label2.TabIndex = 13; + this.label2.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or LZMA \r\ncompr" + + "ession."; + // + // labelAssembleOutput + // + this.labelAssembleOutput.ForeColor = System.Drawing.Color.White; + this.labelAssembleOutput.Location = new System.Drawing.Point(3, 91); + this.labelAssembleOutput.Name = "labelAssembleOutput"; + this.labelAssembleOutput.Size = new System.Drawing.Size(455, 53); + this.labelAssembleOutput.TabIndex = 10; + this.labelAssembleOutput.Text = "OutputFilePath"; + this.labelAssembleOutput.Visible = false; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Transparent; + this.label4.Location = new System.Drawing.Point(3, 7); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(135, 18); + this.label4.TabIndex = 5; + this.label4.Text = "Assemble files from:"; + // + // labelAssembleInput + // + this.labelAssembleInput.ForeColor = System.Drawing.Color.White; + this.labelAssembleInput.Location = new System.Drawing.Point(3, 35); + this.labelAssembleInput.Name = "labelAssembleInput"; + this.labelAssembleInput.Size = new System.Drawing.Size(455, 22); + this.labelAssembleInput.TabIndex = 9; + this.labelAssembleInput.Text = "InputFilePath"; + this.labelAssembleInput.Visible = false; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.ForeColor = System.Drawing.Color.Transparent; + this.label7.Location = new System.Drawing.Point(3, 66); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(75, 18); + this.label7.TabIndex = 6; + this.label7.Text = "Output to:"; + // + // buttonAssembleOutput + // + this.buttonAssembleOutput.BackColor = System.Drawing.Color.Green; + this.buttonAssembleOutput.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonAssembleOutput.ForeColor = System.Drawing.Color.White; + this.buttonAssembleOutput.Location = new System.Drawing.Point(82, 60); + this.buttonAssembleOutput.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonAssembleOutput.Name = "buttonAssembleOutput"; + this.buttonAssembleOutput.Size = new System.Drawing.Size(86, 28); + this.buttonAssembleOutput.TabIndex = 7; + this.buttonAssembleOutput.Text = "Browse"; + this.buttonAssembleOutput.UseVisualStyleBackColor = false; + this.buttonAssembleOutput.Click += new System.EventHandler(this.buttonAssembleOutput_Click); + // + // panelAssemble + // + this.panelAssemble.Controls.Add(this.radioButtonDisassemble); + this.panelAssemble.Controls.Add(this.radioButtonAssemble); + this.panelAssemble.Location = new System.Drawing.Point(16, 85); + this.panelAssemble.Name = "panelAssemble"; + this.panelAssemble.Size = new System.Drawing.Size(455, 52); + this.panelAssemble.TabIndex = 26; + this.panelAssemble.Visible = false; + // + // radioButtonDisassemble + // + this.radioButtonDisassemble.AutoSize = true; + this.radioButtonDisassemble.ForeColor = System.Drawing.Color.White; + this.radioButtonDisassemble.Location = new System.Drawing.Point(239, 30); + this.radioButtonDisassemble.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.radioButtonDisassemble.Name = "radioButtonDisassemble"; + this.radioButtonDisassemble.Size = new System.Drawing.Size(104, 22); + this.radioButtonDisassemble.TabIndex = 21; + this.radioButtonDisassemble.TabStop = true; + this.radioButtonDisassemble.Text = "Disassemble"; + this.radioButtonDisassemble.UseVisualStyleBackColor = true; + this.radioButtonDisassemble.CheckedChanged += new System.EventHandler(this.radioButtonDisassemble_CheckedChanged); + // + // radioButtonAssemble + // + this.radioButtonAssemble.AutoSize = true; + this.radioButtonAssemble.ForeColor = System.Drawing.Color.White; + this.radioButtonAssemble.Location = new System.Drawing.Point(150, 30); + this.radioButtonAssemble.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.radioButtonAssemble.Name = "radioButtonAssemble"; + this.radioButtonAssemble.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.radioButtonAssemble.Size = new System.Drawing.Size(86, 22); + this.radioButtonAssemble.TabIndex = 22; + this.radioButtonAssemble.TabStop = true; + this.radioButtonAssemble.Text = "Assemble"; + this.radioButtonAssemble.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.radioButtonAssemble.UseVisualStyleBackColor = true; + this.radioButtonAssemble.CheckedChanged += new System.EventHandler(this.radioButtonAssemble_CheckedChanged); + // + // disassemblePanel + // + this.disassemblePanel.Controls.Add(this.buttonDisassembleInput); + this.disassemblePanel.Controls.Add(this.label3); + this.disassemblePanel.Controls.Add(this.labelDisassembleOutput); + this.disassemblePanel.Controls.Add(this.label6); + this.disassemblePanel.Controls.Add(this.labelDisassembleInput); + this.disassemblePanel.Controls.Add(this.label10); + this.disassemblePanel.Controls.Add(this.buttonDisassembleOutput); + this.disassemblePanel.Location = new System.Drawing.Point(14, 182); + this.disassemblePanel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.disassemblePanel.Name = "disassemblePanel"; + this.disassemblePanel.Size = new System.Drawing.Size(462, 256); + this.disassemblePanel.TabIndex = 27; + this.disassemblePanel.Visible = false; + // + // buttonDisassembleInput + // + this.buttonDisassembleInput.BackColor = System.Drawing.Color.Green; + this.buttonDisassembleInput.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonDisassembleInput.ForeColor = System.Drawing.Color.White; + this.buttonDisassembleInput.Location = new System.Drawing.Point(137, 4); + this.buttonDisassembleInput.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonDisassembleInput.Name = "buttonDisassembleInput"; + this.buttonDisassembleInput.Size = new System.Drawing.Size(86, 28); + this.buttonDisassembleInput.TabIndex = 8; + this.buttonDisassembleInput.Text = "Browse"; + this.buttonDisassembleInput.UseVisualStyleBackColor = false; + this.buttonDisassembleInput.Click += new System.EventHandler(this.buttonDisassembleInput_Click); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.ForeColor = System.Drawing.Color.White; + this.label3.Location = new System.Drawing.Point(0, 158); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(480, 36); + this.label3.TabIndex = 13; + this.label3.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or LZMA \r\ncompr" + + "ession."; + // + // labelDisassembleOutput + // + this.labelDisassembleOutput.ForeColor = System.Drawing.Color.White; + this.labelDisassembleOutput.Location = new System.Drawing.Point(3, 91); + this.labelDisassembleOutput.Name = "labelDisassembleOutput"; + this.labelDisassembleOutput.Size = new System.Drawing.Size(455, 53); + this.labelDisassembleOutput.TabIndex = 10; + this.labelDisassembleOutput.Text = "OutputFilePath"; + this.labelDisassembleOutput.Visible = false; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.ForeColor = System.Drawing.Color.Transparent; + this.label6.Location = new System.Drawing.Point(3, 7); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(153, 18); + this.label6.TabIndex = 5; + this.label6.Text = "Disassemble files from:"; + // + // labelDisassembleInput + // + this.labelDisassembleInput.ForeColor = System.Drawing.Color.White; + this.labelDisassembleInput.Location = new System.Drawing.Point(3, 35); + this.labelDisassembleInput.Name = "labelDisassembleInput"; + this.labelDisassembleInput.Size = new System.Drawing.Size(455, 22); + this.labelDisassembleInput.TabIndex = 9; + this.labelDisassembleInput.Text = "InputFilePath"; + this.labelDisassembleInput.Visible = false; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Transparent; + this.label10.Location = new System.Drawing.Point(3, 66); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(75, 18); + this.label10.TabIndex = 6; + this.label10.Text = "Output to:"; + // + // buttonDisassembleOutput + // + this.buttonDisassembleOutput.BackColor = System.Drawing.Color.Green; + this.buttonDisassembleOutput.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.buttonDisassembleOutput.ForeColor = System.Drawing.Color.White; + this.buttonDisassembleOutput.Location = new System.Drawing.Point(82, 60); + this.buttonDisassembleOutput.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.buttonDisassembleOutput.Name = "buttonDisassembleOutput"; + this.buttonDisassembleOutput.Size = new System.Drawing.Size(86, 28); + this.buttonDisassembleOutput.TabIndex = 7; + this.buttonDisassembleOutput.Text = "Browse"; + this.buttonDisassembleOutput.UseVisualStyleBackColor = false; + this.buttonDisassembleOutput.Click += new System.EventHandler(this.buttonDisassembleOutput_Click); + // + // checkBoxFolderMode + // + this.checkBoxFolderMode.AutoSize = true; + this.checkBoxFolderMode.BackColor = System.Drawing.Color.Transparent; + this.checkBoxFolderMode.Checked = true; + this.checkBoxFolderMode.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxFolderMode.ForeColor = System.Drawing.Color.White; + this.checkBoxFolderMode.Location = new System.Drawing.Point(20, 118); + this.checkBoxFolderMode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.checkBoxFolderMode.Name = "checkBoxFolderMode"; + this.checkBoxFolderMode.Size = new System.Drawing.Size(101, 22); + this.checkBoxFolderMode.TabIndex = 28; + this.checkBoxFolderMode.Text = "Subfolders"; + this.checkBoxFolderMode.UseVisualStyleBackColor = false; + // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(52)))), ((int)(((byte)(54))))); - this.ClientSize = new System.Drawing.Size(428, 451); + this.ClientSize = new System.Drawing.Size(487, 532); + this.Controls.Add(this.checkBoxFolderMode); + this.Controls.Add(this.disassemblePanel); + this.Controls.Add(this.assemblePanel); + this.Controls.Add(this.encryptPanel); + this.Controls.Add(this.decryptPanel); + this.Controls.Add(this.decodePanel); + this.Controls.Add(this.panelCrypt); + this.Controls.Add(this.panelAssemble); + this.Controls.Add(this.AssembleButton); this.Controls.Add(this.fileRadio); this.Controls.Add(this.folderRadio); this.Controls.Add(this.letsGoText); this.Controls.Add(this.LetsGo); this.Controls.Add(this.pictureBox1); this.Controls.Add(this.DecodeButton); - this.Controls.Add(this.DecryptButton); this.Controls.Add(this.EncryptButton); - this.Controls.Add(this.decryptPanel); - this.Controls.Add(this.encryptPanel); - this.Controls.Add(this.decodePanel); + this.Font = new System.Drawing.Font("AngryBirds", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(444, 490); - this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(444, 490); + this.MaximumSize = new System.Drawing.Size(505, 579); + this.MinimumSize = new System.Drawing.Size(505, 579); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Encrypt and decrypt LUA files for Angry Birds"; @@ -643,6 +1002,14 @@ private void InitializeComponent() this.decryptPanel.PerformLayout(); this.decodePanel.ResumeLayout(false); this.decodePanel.PerformLayout(); + this.panelCrypt.ResumeLayout(false); + this.panelCrypt.PerformLayout(); + this.assemblePanel.ResumeLayout(false); + this.assemblePanel.PerformLayout(); + this.panelAssemble.ResumeLayout(false); + this.panelAssemble.PerformLayout(); + this.disassemblePanel.ResumeLayout(false); + this.disassemblePanel.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -651,7 +1018,6 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Button EncryptButton; - private System.Windows.Forms.Button DecryptButton; private System.Windows.Forms.Button DecodeButton; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Label label1; @@ -697,6 +1063,31 @@ private void InitializeComponent() private System.Windows.Forms.RadioButton fileRadio; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.CheckBox checkBoxDataMode; + private System.Windows.Forms.RadioButton radioButtonEncrypt; + private System.Windows.Forms.RadioButton radioButtonDecrypt; + private System.Windows.Forms.Panel panelCrypt; + private System.Windows.Forms.Button AssembleButton; + private System.Windows.Forms.Panel assemblePanel; + private System.Windows.Forms.Button buttonAssembleInput; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelAssembleOutput; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label labelAssembleInput; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button buttonAssembleOutput; + private System.Windows.Forms.Panel panelAssemble; + private System.Windows.Forms.RadioButton radioButtonDisassemble; + private System.Windows.Forms.RadioButton radioButtonAssemble; + private System.Windows.Forms.Panel disassemblePanel; + private System.Windows.Forms.Button buttonDisassembleInput; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label labelDisassembleOutput; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label labelDisassembleInput; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Button buttonDisassembleOutput; + private System.Windows.Forms.CheckBox checkBoxFolderMode; } } diff --git a/LUAManager/MainForm.cs b/LUAManager/MainForm.cs index d4a6d8c..fecf812 100644 --- a/LUAManager/MainForm.cs +++ b/LUAManager/MainForm.cs @@ -11,6 +11,7 @@ using System.IO; using System.Diagnostics; + namespace LUAManager { public partial class MainForm : Form @@ -22,33 +23,58 @@ public MainForm() public static class Info { public static string whatWereDoing = "encrypt"; - public static string classicKey = "55534361505170413454534E56784D49317639534B39554330795A75416E6232"; - public static string seasonsKey = "7A65506865737435666151755832533241707265403472654368417445765574"; - public static string rioKey = "55534361505170413454534E56784D49317639534B39554330795A75416E6232"; - public static string spaceKey = "526D67645A304A656E4C466757776B5976434C326C5361684662456846656334"; - public static string starWarsKey = "416E3874336D6E38553673706951307A4848723361316C6F44725261336D7445"; - public static string starWarsTwoKey = "4230706D3354416C7A6B4E3967687A6F65324E697A456C6C50644E3068516E69"; - public static string friendsKey = "454A52626357683831594734597A6A664C41504D7373416E6E7A785161446E31"; - public static ProcessStartInfo psi = new ProcessStartInfo(); - - + } + private string GetKey(int selectedIndex, string customKey) + { + switch (selectedIndex) + { + case 0: return "55534361505170413454534E56784D49317639534B39554330795A75416E6232"; //classic + case 1: return "7A65506865737435666151755832533241707265403472654368417445765574"; //seasons + case 2: return "55534361505170413454534E56784D49317639534B39554330795A75416E6232"; //rio + case 3: return "526D67645A304A656E4C466757776B5976434C326C5361684662456846656334"; //space + case 4: return "416E3874336D6E38553673706951307A4848723361316C6F44725261336D7445"; //sw + case 5: return "4230706D3354416C7A6B4E3967687A6F65324E697A456C6C50644E3068516E69"; //sw2 + case 6: return "454A52626357683831594734597A6A664C41504D7373416E6E7A785161446E31"; //friends + case 7: return "34467A5A4F6165363079416D7854436C7A6467666372344241625049676A3758"; //stella + case 8: return customKey; + default: return string.Empty; + } + } + private string GetDataKey(int selectedIndex, string customKey) + { + switch (selectedIndex) + { + case 0: return "3434695559356154726C61596F6574396C6170526C614B3145686C6563356930"; + case 1: return "62725534753D45625234735F41334150753655233742216178416D2A57652335"; + case 2: return "3434695559356154726C61596F6574396C6170526C614B3145686C6563356930"; + case 3: return "547065637A4B514C30374856645062565568417236466A55736D526374796335"; + case 4: return "653833547068305233615A326A474B3665533931754C7651704C3333767A4E69"; + case 5: return "74615433766967446F4E6C716434347969506274323162694370566D61366E62"; + case 6: return "584E334F436D55464C366B494E48756361325A514C3467714A67307231386F6C"; + case 7: return "426C6C33716B637935664B724E56785A71746B464831394F6A6E3273644A4675"; + case 8: return customKey; + default: return string.Empty; + } } - private void EncryptButton_Click(object sender, EventArgs e) + private string GetCurrentKey(int selectedIndex, string customKey, bool isDataMode) { - Info.whatWereDoing = "encrypt"; - encryptPanel.Visible = true; - decryptPanel.Visible = false; - decodePanel.Visible = false; + return isDataMode ? GetDataKey(selectedIndex, customKey) : GetKey(selectedIndex, customKey); } - private void DecryptButton_Click(object sender, EventArgs e) + private void EncryptButton_Click(object sender, EventArgs e) { - Info.whatWereDoing = "decrypt"; - encryptPanel.Visible = false; - decryptPanel.Visible = true; + bool encryptChecked = radioButtonEncrypt.Checked; + encryptPanel.Visible = encryptChecked; + decryptPanel.Visible = !encryptChecked; + panelCrypt.Visible = true; decodePanel.Visible = false; + Info.whatWereDoing = encryptChecked ? "encrypt" : "decrypt"; + assemblePanel.Visible = false; + panelAssemble.Visible = false; + disassemblePanel.Visible = false; + assemblePanel.Visible = false; } private void DecodeButton_Click(object sender, EventArgs e) @@ -56,55 +82,91 @@ private void DecodeButton_Click(object sender, EventArgs e) Info.whatWereDoing = "decode"; encryptPanel.Visible = false; decryptPanel.Visible = false; + panelCrypt.Visible = false; decodePanel.Visible = true; + assemblePanel.Visible = false; + disassemblePanel.Visible = false; + panelAssemble.Visible = false; } - - private void Form1_Load(object sender, EventArgs e) + private void radioButtonEncrypt_CheckedChanged(object sender, EventArgs e) { - encryptGameSelect.SelectedIndex = 0; - encryptInputFile.Text = ""; - encryptOutputFile.Text = ""; - decryptGameSelect.SelectedIndex = 0; - decryptInputFile.Text = ""; - decryptOutputFile.Text = ""; - decodeInputFile.Text = ""; - decodeOutputFile.Text = ""; - - fileRadio.Checked = true; + if (radioButtonEncrypt.Checked) + { + Info.whatWereDoing = "encrypt"; + encryptPanel.Visible = true; + decryptPanel.Visible = false; + checkBoxDataMode.Visible = true; + decodePanel.Visible = false; + } } - private void button2_Click(object sender, EventArgs e) //Encrypt Input + private void radioButtonDecrypt_CheckedChanged(object sender, EventArgs e) { - if (fileRadio.Checked) + if (radioButtonDecrypt.Checked) { - openFileDialog1.ShowDialog(); - encryptInputFile.Text = openFileDialog1.FileName; - encryptInputFile.Visible = true; + Info.whatWereDoing = "decrypt"; + encryptPanel.Visible = false; + decryptPanel.Visible = true; + checkBoxDataMode.Visible = true; + decodePanel.Visible = false; } - else + + } + private void AssembleButton_Click(object sender, EventArgs e) + { { - folderBrowserDialog1.ShowDialog(); - encryptInputFile.Text = folderBrowserDialog1.SelectedPath; - encryptInputFile.Visible = true; + bool assembleChecked = radioButtonAssemble.Checked; + encryptPanel.Visible = false; + decryptPanel.Visible = false; + panelCrypt.Visible = false; + decodePanel.Visible = false; + Info.whatWereDoing = assembleChecked ? "assemble" : "disassemble"; + assemblePanel.Visible = assembleChecked; + disassemblePanel.Visible = !assembleChecked; + panelAssemble.Visible = true; } } - - private void button1_Click_1(object sender, EventArgs e) //Encrypt Output + private void radioButtonAssemble_CheckedChanged(object sender, EventArgs e) { - if (fileRadio.Checked) + if (radioButtonAssemble.Checked) { - saveFileDialog1.ShowDialog(); - encryptOutputFile.Text = saveFileDialog1.FileName; - encryptOutputFile.Visible = true; + Info.whatWereDoing = "assemble"; + assemblePanel.Visible = true; + disassemblePanel.Visible = false; } - else + } + private void radioButtonDisassemble_CheckedChanged(object sender, EventArgs e) + { + if (radioButtonDisassemble.Checked) { - folderBrowserDialog2.ShowDialog(); - encryptOutputFile.Text = folderBrowserDialog2.SelectedPath; - encryptOutputFile.Visible = true; + Info.whatWereDoing = "disassemble"; + assemblePanel.Visible = false; + disassemblePanel.Visible = true; } } - public void OpenSSL(string parameters) //Run the OpenSSL program + + private void Form1_Load(object sender, EventArgs e) + { + Info.whatWereDoing = "encrypt"; + encryptGameSelect.SelectedIndex = 0; + encryptInputFile.Text = ""; + encryptOutputFile.Text = ""; + decryptGameSelect.SelectedIndex = 0; + decryptInputFile.Text = ""; + decryptOutputFile.Text = ""; + decodeInputFile.Text = ""; + decodeOutputFile.Text = ""; + labelAssembleInput.Text = ""; + labelAssembleOutput.Text = ""; + labelDisassembleInput.Text = ""; + labelDisassembleOutput.Text = ""; + + fileRadio.Checked = true; + radioButtonAssemble.Checked = true; + radioButtonEncrypt.Checked = true; + assemblePanel.Visible = false; + } + public void OpenSSL(string parameters) { Info.psi.FileName = Directory.GetCurrentDirectory() + "\\extras\\openssl.exe"; Info.psi.UseShellExecute = false; @@ -114,7 +176,7 @@ public void OpenSSL(string parameters) //Run the OpenSSL program Process proc = Process.Start(Info.psi); proc.WaitForExit(); } - public void SevenZipFile(string arguments) //Run the 7-zip program + public void SevenZipFile(string arguments) { ProcessStartInfo sevenZip = new ProcessStartInfo(); sevenZip.FileName = Directory.GetCurrentDirectory() + "\\extras\\7za.exe"; @@ -125,18 +187,18 @@ public void SevenZipFile(string arguments) //Run the 7-zip program Process sevenZipExe = Process.Start(sevenZip); sevenZipExe.WaitForExit(); } - public void Unluac(string inputFile, string outputFile) //Run the Unluac program + public void Unluac(string arguments, string file) { ProcessStartInfo java = new ProcessStartInfo(); - java.FileName = Directory.GetCurrentDirectory() + "\\extras\\decoder.bat"; + java.FileName = Directory.GetCurrentDirectory() + "\\extras\\" + file + ".bat"; java.UseShellExecute = false; java.CreateNoWindow = true; java.WindowStyle = ProcessWindowStyle.Hidden; - java.Arguments = "\"" + Directory.GetCurrentDirectory() + "\" \"" + inputFile + "\" \"" + outputFile + "\""; + java.Arguments = arguments; Process javaExe = Process.Start(java); javaExe.WaitForExit(); } - public void LZMA(string arguments) //Run the LZMA program + public void LZMA(string arguments) { ProcessStartInfo lzmaProg = new ProcessStartInfo(); lzmaProg.FileName = Directory.GetCurrentDirectory() + "\\extras\\lzma.exe"; @@ -147,6 +209,97 @@ public void LZMA(string arguments) //Run the LZMA program Process lzmaProgExe = Process.Start(lzmaProg); lzmaProgExe.WaitForExit(); } + public void BatFile(string input, string output, string action, SoundPlayer simpleSound) + { + if (input == "") + { + MessageBox.Show("You have not selected a " + ((fileRadio.Checked) ? "file" : "folder of files") + " to " + action, "Please choose a file", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else if (output == "") + { + MessageBox.Show("You have not specified a " + ((fileRadio.Checked) ? "file" : "folder") + " to export to", "Please choose a file", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else if (input == output) + { + MessageBox.Show("The input and output " + ((fileRadio.Checked) ? "file" : "folder") + " cannot be the same because you\ncannot write to a file while it is being read.", "Overwrite Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + letsGoText.Text = "Getting ready to go, please wait..."; + letsGoText.Visible = true; + bool passedTest = true; + + FileInfo[] fileInfos = (fileRadio.Checked) + ? new FileInfo[] { new FileInfo(openFileDialog1.FileName) } + : new DirectoryInfo(folderBrowserDialog1.SelectedPath) + .GetFiles("*.*", checkBoxFolderMode.Checked ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly) + .Where(file => file.Extension.Equals(".lua", StringComparison.OrdinalIgnoreCase) || + file.Extension.Equals(".json", StringComparison.OrdinalIgnoreCase)) + .ToArray(); + + string sourceFolder = folderBrowserDialog1.SelectedPath; + string targetFolder = folderBrowserDialog2.SelectedPath; + string lastFile = ""; + foreach (var file in fileInfos) + { + string savePath = (fileRadio.Checked) + ? saveFileDialog1.FileName + : (checkBoxFolderMode.Checked + ? Path.Combine(targetFolder, file.FullName.Substring(sourceFolder.Length).TrimStart('\\')) + : Path.Combine(targetFolder, file.Name)); + + if (!fileRadio.Checked && checkBoxFolderMode.Checked) + { + Directory.CreateDirectory(Path.GetDirectoryName(savePath)); + } + + { + string header = ReadChars(file.FullName, 4)[1].ToString() + ReadChars(file.FullName, 4)[2] + ReadChars(file.FullName, 4)[3]; + if (((action == "decode" || action == "disassemble") & header == "Lua") || (action == "assemble" & header == "ver")) + { + Unluac("\"" + Directory.GetCurrentDirectory() + "\" \"" + file.FullName + "\" \"" + savePath + "\"", action); + lastFile = savePath; + + } + else + { + MessageBox.Show("The file: \"" + file.FullName + "\" is not a valid file.", "File is not valid or is encrypted", MessageBoxButtons.OK, MessageBoxIcon.Error); + passedTest = false; + } + + } + + } + if (passedTest) + { + if (File.Exists(lastFile)) + { + FileInfo luaSize = new FileInfo(lastFile); + if (luaSize.Length == 0) + { + MessageBox.Show("The AB360 LUA Manager was unable to " + action + " your LUA file \"" + lastFile + "\". You could be missing some app files, or your JDK install is missing/corrupt.", "An error has occured", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + simpleSound.Play(); + letsGoText.Text = "LET'S GOOO!"; + + string message = + (fileRadio.Checked) + ? ("The LUA file has been exported in " + action + "d form to\n" + saveFileDialog1.FileName + "!") + : ("All LUA files in " + folderBrowserDialog1.SelectedPath + " have been exported in " + action + "d form to\n" + folderBrowserDialog2.SelectedPath + "!"); + + MessageBox.Show(message, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + else + { + MessageBox.Show("A valid installation of the Java JDK could not be found, please install a copy of it in order to use this feature.", "Java JDK not installed", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + letsGoText.Visible = false; + } + } public static char[] ReadChars(string filename, int count) { try @@ -167,61 +320,30 @@ public static char[] ReadChars(string filename, int count) catch { MessageBox.Show("The input file does not exist.", "Please choose a file", MessageBoxButtons.OK, MessageBoxIcon.Error); - return new[]{'j',}; + return new[] { 'j', }; } - + } private void LetsGo_Click(object sender, EventArgs e) { - string keyToUse = ""; + string keyToUse = ""; SoundPlayer simpleSound = new SoundPlayer(Directory.GetCurrentDirectory() + "\\extras\\letsgo.wav"); - if (Info.whatWereDoing == "encrypt") //Encrypt functions + if (Info.whatWereDoing == "encrypt") { - if (encryptGameSelect.SelectedIndex == 0) - { - keyToUse = Info.classicKey; - } - else if (encryptGameSelect.SelectedIndex == 1) - { - keyToUse = Info.seasonsKey; - } - else if (encryptGameSelect.SelectedIndex == 2) - { - keyToUse = Info.rioKey; - } - else if (encryptGameSelect.SelectedIndex == 3) - { - keyToUse = Info.spaceKey; - } - else if (encryptGameSelect.SelectedIndex == 4) - { - keyToUse = Info.starWarsKey; - } - else if (encryptGameSelect.SelectedIndex == 5) - { - keyToUse = Info.starWarsTwoKey; - } - else if (encryptGameSelect.SelectedIndex == 6) - { - keyToUse = Info.friendsKey; - } - else if (encryptGameSelect.SelectedIndex == 7) - { - keyToUse = customKeyEnc.Text; - } + keyToUse = GetCurrentKey(encryptGameSelect.SelectedIndex, customKeyEnc.Text, checkBoxDataMode.Checked); if (encryptInputFile.Text == "") { - MessageBox.Show("You have not selected a " + ((fileRadio.Checked) ? "file" : "folder of files") + " to encrypt", "Please choose a folder",MessageBoxButtons.OK,MessageBoxIcon.Error); + MessageBox.Show("You have not selected a " + ((fileRadio.Checked) ? "file" : "folder of files") + " to encrypt", "Please choose a folder", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (encryptOutputFile.Text == "") { MessageBox.Show("You have not specified a " + ((fileRadio.Checked) ? "file" : "folder") + " to export to", "Please choose a folder", MessageBoxButtons.OK, MessageBoxIcon.Error); - } + } else if (encryptInputFile.Text == encryptOutputFile.Text) { MessageBox.Show("The input and output " + ((fileRadio.Checked) ? "file" : "folder") + " cannot be the same because you\ncannot write to a files while they're being read.", "Overwrite Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } - else if (encryptGameSelect.SelectedIndex == 7 && customKeyEnc.Text == "") + else if (encryptGameSelect.SelectedIndex == 8 && customKeyEnc.Text == "") { MessageBox.Show("You need to paste a key into the box in order to use this option.", "No key entered", MessageBoxButtons.OK, MessageBoxIcon.Error); } @@ -229,22 +351,31 @@ private void LetsGo_Click(object sender, EventArgs e) { letsGoText.Text = "Getting ready to go, please wait..."; letsGoText.Visible = true; + FileInfo[] fileInfos = (fileRadio.Checked) + ? new FileInfo[] { new FileInfo(openFileDialog1.FileName) } + : new DirectoryInfo(folderBrowserDialog1.SelectedPath) + .GetFiles("*.*", checkBoxFolderMode.Checked ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly) + .Where(file => file.Extension.Equals(".lua", StringComparison.OrdinalIgnoreCase) || + file.Extension.Equals(".json", StringComparison.OrdinalIgnoreCase)) + .ToArray(); - FileInfo[] fileInfos = - (fileRadio.Checked) - ? (new FileInfo[] { new FileInfo(openFileDialog1.FileName) }) - : (new DirectoryInfo(folderBrowserDialog1.SelectedPath)).GetFiles().Where(file => file.Extension == ".lua" || file.Extension == ".json").ToArray(); + string sourceFolder = folderBrowserDialog1.SelectedPath; + string targetFolder = folderBrowserDialog2.SelectedPath; foreach (var file in fileInfos) { - string savePath = - (fileRadio.Checked) - ? (saveFileDialog1.FileName) - : (folderBrowserDialog2.SelectedPath + "\\" + file.Name); + string savePath = (fileRadio.Checked) + ? saveFileDialog1.FileName + : (checkBoxFolderMode.Checked + ? Path.Combine(targetFolder, file.FullName.Substring(sourceFolder.Length).TrimStart('\\')) + : Path.Combine(targetFolder, file.Name)); - if (SevenZipCheck.Checked) //Put file in 7z archive if this is true + if (!fileRadio.Checked && checkBoxFolderMode.Checked) + { + Directory.CreateDirectory(Path.GetDirectoryName(savePath)); + } + if (SevenZipCheck.Checked) { - SevenZipFile("a -y " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.7z" + "\"" + " \"" + file.FullName + "\""); OpenSSL("enc -K " + keyToUse + " -iv 00 -aes-256-cbc -in " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.7z" + "\"" + " -out " + "\"" + savePath + "\""); if (File.Exists(Directory.GetCurrentDirectory() + "\\extras\\temp.7z")) @@ -252,21 +383,21 @@ private void LetsGo_Click(object sender, EventArgs e) File.Delete(Directory.GetCurrentDirectory() + "\\extras\\temp.7z"); } } - else if (LZMACheck.Checked) //Put file in LZMA archive if this true + else if (LZMACheck.Checked) { LZMA("e " + "\"" + file.FullName + "\"" + " \"" + Directory.GetCurrentDirectory() + "\\extras\\temp.bin" + "\""); - byte[] lzmaHeader = new byte[] { 0x89, 0x4C, 0x5A, 0x4D, 0x41, 0x0D, 0x0A, 0x1A, 0x0A }; //The header Angry Birds looks for to load a file - byte[] x = File.ReadAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); //Read the contents of the file - byte[] byteLength = new byte[x.Length]; //Make an array the length of the file + byte[] lzmaHeader = new byte[] { 0x89, 0x4C, 0x5A, 0x4D, 0x41, 0x0D, 0x0A, 0x1A, 0x0A }; + byte[] x = File.ReadAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); + byte[] byteLength = new byte[x.Length]; byte[] temp = lzmaHeader.Concat(byteLength).ToArray(); - long tempx = 9; //Temp counter + long tempx = 9; for (long i = 0; i < x.LongLength; i++) { - temp[tempx] = x[i]; // The new array being filled with the data - tempx++; // The new array's counter + temp[tempx] = x[i]; + tempx++; } - File.WriteAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", temp); //Overwrite temp.bin again (assuming it's stored safely in RAM) + File.WriteAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", temp); OpenSSL("enc -K " + keyToUse + " -iv 00 -aes-256-cbc -in " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.bin" + "\"" + " -out " + "\"" + savePath + "\""); if (File.Exists(Directory.GetCurrentDirectory() + "\\extras\\temp.bin")) @@ -274,327 +405,285 @@ private void LetsGo_Click(object sender, EventArgs e) File.Delete(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); } } - else //Assume the person is exporting a raw LUA for legacy AB versions + else { OpenSSL("enc -K " + keyToUse + " -iv 00 -aes-256-cbc -in " + "\"" + file.FullName + "\"" + " -out " + "\"" + savePath + "\""); } } - - + simpleSound.Play(); letsGoText.Text = "LET'S GOOO!"; - string message = - (fileRadio.Checked) + string message = (fileRadio.Checked) ? ("The LUA file has been exported in encrypted form to\n" + saveFileDialog1.FileName + "!") - : ("All LUA files in " + folderBrowserDialog1.SelectedPath + " have been exported in encrypted form to\n" + folderBrowserDialog2.SelectedPath + "!"); + : ("All LUA files in " + folderBrowserDialog1.SelectedPath + " have been exported in encrypted form to\n" + targetFolder + "!"); MessageBox.Show(message, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); - letsGoText.Visible = false; } } - if (Info.whatWereDoing == "decrypt") //Decrypt functions + if (Info.whatWereDoing == "decrypt") { - if (decryptGameSelect.SelectedIndex == 0) - { - keyToUse = Info.classicKey; - } - else if (decryptGameSelect.SelectedIndex == 1) - { - keyToUse = Info.seasonsKey; - } - else if (decryptGameSelect.SelectedIndex == 2) - { - keyToUse = Info.rioKey; - } - else if (decryptGameSelect.SelectedIndex == 3) - { - keyToUse = Info.spaceKey; - } - else if (decryptGameSelect.SelectedIndex == 4) - { - keyToUse = Info.starWarsKey; - } - else if (decryptGameSelect.SelectedIndex == 5) - { - keyToUse = Info.starWarsTwoKey; - } - else if (decryptGameSelect.SelectedIndex == 6) - { - keyToUse = Info.friendsKey; - } - else if (decryptGameSelect.SelectedIndex == 7) - { - keyToUse = customKeyDec.Text; - } + keyToUse = GetCurrentKey(decryptGameSelect.SelectedIndex, customKeyDec.Text, checkBoxDataMode.Checked); if (decryptInputFile.Text == "") { MessageBox.Show("You have not selected a " + ((fileRadio.Checked) ? "file" : "folder of files") + " to decrypt", "Please choose a folder", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } else if (decryptOutputFile.Text == "") { MessageBox.Show("You have not specified a " + ((fileRadio.Checked) ? "file" : "folder") + " to export to", "Please choose a folder", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } else if (decryptInputFile.Text == decryptOutputFile.Text) { - MessageBox.Show("The input and output " + ((fileRadio.Checked) ? "file" : "folder") + " cannot be the same because you\ncannot write to a files while they're being read.", "Overwrite Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("The input and output " + ((fileRadio.Checked) ? "file" : "folder") + " cannot be the same because you\ncannot write to files while they're being read.", "Overwrite Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } - else if (decryptGameSelect.SelectedIndex == 7 && customKeyDec.Text == "") + else if (decryptGameSelect.SelectedIndex == 8 && customKeyDec.Text == "") { MessageBox.Show("You need to paste a key into the box in order to use this option.", "No key entered", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } - else + letsGoText.Text = "Getting ready to go, please wait..."; + letsGoText.Visible = true; + FileInfo[] fileInfos = (fileRadio.Checked) + ? new FileInfo[] { new FileInfo(openFileDialog1.FileName) } + : new DirectoryInfo(folderBrowserDialog1.SelectedPath).GetFiles("*.*", checkBoxFolderMode.Checked ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly).Where(file => file.Extension.Equals(".lua", StringComparison.OrdinalIgnoreCase) || file.Extension.Equals(".json", StringComparison.OrdinalIgnoreCase)).ToArray(); + string sourceFolder = fileRadio.Checked + ? Path.GetDirectoryName(openFileDialog1.FileName) + : folderBrowserDialog1.SelectedPath; + string targetFolder = fileRadio.Checked + ? Path.GetDirectoryName(saveFileDialog1.FileName) + : folderBrowserDialog2.SelectedPath; + foreach (var file in fileInfos) { - letsGoText.Text = "Getting ready to go, please wait..."; - letsGoText.Visible = true; - - FileInfo[] fileInfos = - (fileRadio.Checked) - ? (new FileInfo[] { new FileInfo(openFileDialog1.FileName) }) - : (new DirectoryInfo(folderBrowserDialog1.SelectedPath)).GetFiles().Where(file => file.Extension == ".lua" || file.Extension == ".json").ToArray(); - - foreach (var file in fileInfos) + string savePath; + if (fileRadio.Checked) { - string savePath = - (fileRadio.Checked) - ? (saveFileDialog1.FileName) - : (folderBrowserDialog2.SelectedPath + "\\" + file.Name); - - OpenSSL("enc -d -K " + keyToUse + " -iv 00 -aes-256-cbc -in " + "\"" + file.FullName + "\"" + " -out " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.bin" + "\""); - string header; - bool passed7zCheck = false; - if (autoUnzip.Checked) //Check if the file's first two bytes are "7z" and if so, unzip - { - header = ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 2)[0].ToString() + ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 2)[1]; - if (header == "7z") - { - passed7zCheck = true; //To prevent LZMA function from running - SevenZipFile("e -y " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.bin" + "\"" + " -o\"" + ((fileRadio.Checked) ? saveFileDialog1.FileName : folderBrowserDialog2.SelectedPath) + "\""); //Script no longer unzips 7z's into folders from this version on - - } - else //File is not 7z, continue - { - if (autoUnlzma.Checked == false) //If this is checked, we leave the cleanup responsilbity to the autoUnlzma function - { - File.Copy(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", savePath, true); - if (File.Exists(Directory.GetCurrentDirectory() + "\\extras\\temp.bin")) - { - File.Delete(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); - } - } - - } - - - } - if (autoUnlzma.Checked && passed7zCheck == false) //Check if the file's header is the magic number for LZMA encoding, and if so, decode + savePath = saveFileDialog1.FileName; + } + else + { + if (checkBoxFolderMode.Checked) { - header = ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 5)[1].ToString() + ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 5)[2] + ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 5)[3] + ReadChars(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", 5)[4]; - if (header == "LZMA") - { - //From www.codeproject.com - - byte[] x = File.ReadAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); //Read the contents of the file - byte[] temp = new byte[x.Length - 9]; //Make an array 9 bytes shorter than the original - long tempx = 0; //Temp counter - for (long i = 9; i < x.LongLength; i++) // Loop starts after the 9th byte - { - temp[tempx] = x[i]; // The new array being filled with the data - tempx++; // The new array's counter - } - File.WriteAllBytes(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", temp); //Overwrite temp.bin again (assuming it's stored safely in RAM - LZMA("d " + "\"" + Directory.GetCurrentDirectory() + "\\extras\\temp.bin" + "\"" + " \"" + savePath + "\""); //Decode from LZMA and export to save location - } - else - { - File.Copy(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", savePath, true); - if (File.Exists(Directory.GetCurrentDirectory() + "\\extras\\temp.bin")) - { - File.Delete(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); - } - } - - + string relativePath = file.FullName.Substring(sourceFolder.Length).TrimStart('\\', '/'); + savePath = Path.Combine(targetFolder, relativePath); + Directory.CreateDirectory(Path.GetDirectoryName(savePath)); } - if (autoUnzip.Checked == false && autoUnlzma.Checked == false) + else { - File.Copy(Directory.GetCurrentDirectory() + "\\extras\\temp.bin", savePath, true); - if (File.Exists(Directory.GetCurrentDirectory() + "\\extras\\temp.bin")) - { - File.Delete(Directory.GetCurrentDirectory() + "\\extras\\temp.bin"); - } + savePath = Path.Combine(targetFolder, file.Name); } - } - - - - simpleSound.Play(); - letsGoText.Text = "LET'S GOOO!"; - - string message = - (fileRadio.Checked) - ? ("The LUA file has been exported in decrypted form to\n" + saveFileDialog1.FileName + "!") - : ("All LUA files in " + folderBrowserDialog1.SelectedPath + " have been exported in decrypted form to\n" + folderBrowserDialog2.SelectedPath + "!"); - - MessageBox.Show(message, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); - - letsGoText.Visible = false; - } - } - if (Info.whatWereDoing == "decode") //Decode functions - { - if (decodeInputFile.Text == "") - { - MessageBox.Show("You have not selected a " + ((fileRadio.Checked) ? "file" : "folder of files") + " to decode", "Please choose a file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else if (decodeOutputFile.Text == "") - { - MessageBox.Show("You have not specified a " + ((fileRadio.Checked) ? "file" : "folder") + " to export to", "Please choose a file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else if (decodeInputFile.Text == decodeOutputFile.Text) - { - MessageBox.Show("The input and output " + ((fileRadio.Checked) ? "file" : "folder") + " cannot be the same because you\ncannot write to a file while it is being read.", "Overwrite Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - letsGoText.Text = "Getting ready to go, please wait..."; - letsGoText.Visible = true; - bool passedTest = true; - - FileInfo[] fileInfos = - (fileRadio.Checked) - ? (new FileInfo[] { new FileInfo(openFileDialog1.FileName) }) - : (new DirectoryInfo(folderBrowserDialog1.SelectedPath)).GetFiles().Where(file => file.Extension == ".lua" || file.Extension == ".json").ToArray(); - - string lastFile = ""; - foreach (var file in fileInfos) + string tempFilePath = Path.Combine(Directory.GetCurrentDirectory(), "extras", "temp.bin"); + OpenSSL($"enc -d -K {keyToUse} -iv 00 -aes-256-cbc -in \"{file.FullName}\" -out \"{tempFilePath}\""); + bool processed = false; + if (autoUnzip.Checked) { - string savePath = - (fileRadio.Checked) - ? (saveFileDialog1.FileName) - : (folderBrowserDialog2.SelectedPath + "\\" + file.Name); - - //Check if the file's first 4 bytes contain the LUA header and if so, decode + string header = ReadChars(tempFilePath, 2)[0].ToString() + ReadChars(tempFilePath, 2)[1]; + if (header == "7z") { - string header = ReadChars(file.FullName, 4)[1].ToString() + ReadChars(file.FullName, 4)[2] + ReadChars(file.FullName, 4)[3]; - if (header == "Lua") - { - Unluac(file.FullName, savePath); - lastFile = savePath; - - } - else - { - MessageBox.Show("The file: \"" + file.FullName + "\" is not a valid binary LUA file.", "File is not valid or is encrypted", MessageBoxButtons.OK, MessageBoxIcon.Error); - passedTest = false; - } - + processed = true; + SevenZipFile($"e -y \"{tempFilePath}\" -o\"{Path.GetDirectoryName(savePath)}\""); } - } - if (passedTest) + if (autoUnlzma.Checked && !processed) { - if (File.Exists(lastFile)) + string header = ReadChars(tempFilePath, 5)[1].ToString() + + ReadChars(tempFilePath, 5)[2] + + ReadChars(tempFilePath, 5)[3] + + ReadChars(tempFilePath, 5)[4]; + if (header == "LZMA") { - FileInfo luaSize = new FileInfo(lastFile); - if (luaSize.Length == 0) - { - MessageBox.Show("The AB360 LUA Manager was unable to decode your LUA file \"" + lastFile + "\". You could be missing some app files, or your JDK install is missing/corrupt.", "An error has occured", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - simpleSound.Play(); - letsGoText.Text = "LET'S GOOO!"; - - string message = - (fileRadio.Checked) - ? ("The LUA file has been exported in decoded form to\n" + saveFileDialog1.FileName + "!") - : ("All LUA files in " + folderBrowserDialog1.SelectedPath + " have been exported in decoded form to\n" + folderBrowserDialog2.SelectedPath + "!"); - - MessageBox.Show(message, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } - else - { - MessageBox.Show("A valid installation of the Java JDK could not be found, please install a copy of it in order to use this feature.", "Java JDK not installed", MessageBoxButtons.OK, MessageBoxIcon.Error); + processed = true; + byte[] data = File.ReadAllBytes(tempFilePath); + byte[] newData = new byte[data.Length - 9]; + Array.Copy(data, 9, newData, 0, newData.Length); + File.WriteAllBytes(tempFilePath, newData); + LZMA($"d \"{tempFilePath}\" \"{savePath}\""); } } - letsGoText.Visible = false; + if (!processed) + { + File.Copy(tempFilePath, savePath, overwrite: true); + } + if (File.Exists(tempFilePath)) + { + File.Delete(tempFilePath); + } } + simpleSound.Play(); + letsGoText.Text = "LET'S GOOO!"; + string message = fileRadio.Checked + ? $"The LUA file has been exported in decrypted form to\n{saveFileDialog1.FileName}!" + : $"All LUA files in {folderBrowserDialog1.SelectedPath} have been exported in decrypted form to\n{targetFolder}!"; + MessageBox.Show(message, "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information); + letsGoText.Visible = false; + } + if (Info.whatWereDoing == "decode") + { + BatFile(decodeInputFile.Text, decodeOutputFile.Text, "decode", simpleSound); + } + if (Info.whatWereDoing == "assemble") + { + BatFile(labelAssembleInput.Text, labelAssembleOutput.Text, "assemble", simpleSound); + } + if (Info.whatWereDoing == "disassemble") + { + BatFile(labelDisassembleInput.Text, labelDisassembleOutput.Text, "disassemble", simpleSound); + } + } + private void button2_Click(object sender, EventArgs e) + { + encryptInputFile.Visible = true; + if (fileRadio.Checked) + { + openFileDialog1.ShowDialog(); + encryptInputFile.Text = openFileDialog1.FileName; + } + else + { + folderBrowserDialog1.ShowDialog(); + encryptInputFile.Text = folderBrowserDialog1.SelectedPath; } - - } - private void button3_Click(object sender, EventArgs e) //Decrypt Input + private void button1_Click_1(object sender, EventArgs e) { + encryptOutputFile.Visible = true; + if (fileRadio.Checked) + { + saveFileDialog1.ShowDialog(); + encryptOutputFile.Text = saveFileDialog1.FileName; + } + else + { + folderBrowserDialog2.ShowDialog(); + encryptOutputFile.Text = folderBrowserDialog2.SelectedPath; + } + } + private void button3_Click(object sender, EventArgs e) + { + decryptInputFile.Visible = true; if (fileRadio.Checked) { openFileDialog1.ShowDialog(); decryptInputFile.Text = openFileDialog1.FileName; - decryptInputFile.Visible = true; } else { folderBrowserDialog1.ShowDialog(); decryptInputFile.Text = folderBrowserDialog1.SelectedPath; - decryptInputFile.Visible = true; } } - private void decryptOutputFileButton_Click(object sender, EventArgs e) //Decrypt Output + private void decryptOutputFileButton_Click(object sender, EventArgs e) { + decryptOutputFile.Visible = true; if (fileRadio.Checked) { saveFileDialog1.ShowDialog(); decryptOutputFile.Text = saveFileDialog1.FileName; - decryptOutputFile.Visible = true; } else { folderBrowserDialog2.ShowDialog(); decryptOutputFile.Text = folderBrowserDialog2.SelectedPath; - decryptOutputFile.Visible = true; } } - private void button3_Click_1(object sender, EventArgs e) //Decode Input + private void button3_Click_1(object sender, EventArgs e) { + decodeInputFile.Visible = true; if (fileRadio.Checked) { openFileDialog1.ShowDialog(); decodeInputFile.Text = openFileDialog1.FileName; - decodeInputFile.Visible = true; } else { folderBrowserDialog1.ShowDialog(); decodeInputFile.Text = folderBrowserDialog1.SelectedPath; - decodeInputFile.Visible = true; } } - private void button4_Click(object sender, EventArgs e) //Decode Ouput + private void button4_Click(object sender, EventArgs e) { + decodeOutputFile.Visible = true; if (fileRadio.Checked) { saveFileDialog1.ShowDialog(); decodeOutputFile.Text = saveFileDialog1.FileName; - decodeOutputFile.Visible = true; } else { folderBrowserDialog2.ShowDialog(); decodeOutputFile.Text = folderBrowserDialog2.SelectedPath; - decodeOutputFile.Visible = true; } } + private void buttonAssembleInput_Click(object sender, EventArgs e) + { + labelAssembleInput.Visible = true; + if (fileRadio.Checked) + { + openFileDialog1.ShowDialog(); + labelAssembleInput.Text = openFileDialog1.FileName; + } + else + { + folderBrowserDialog1.ShowDialog(); + labelAssembleInput.Text = folderBrowserDialog1.SelectedPath; + } + } + + private void buttonAssembleOutput_Click(object sender, EventArgs e) + { + labelAssembleOutput.Visible = true; + if (fileRadio.Checked) + { + saveFileDialog1.ShowDialog(); + labelAssembleOutput.Text = saveFileDialog1.FileName; + } + else + { + folderBrowserDialog2.ShowDialog(); + labelAssembleOutput.Text = folderBrowserDialog2.SelectedPath; + } + } + private void buttonDisassembleInput_Click(object sender, EventArgs e) + { + labelDisassembleInput.Visible = true; + if (fileRadio.Checked) + { + openFileDialog1.ShowDialog(); + labelDisassembleInput.Text = openFileDialog1.FileName; + } + else + { + folderBrowserDialog1.ShowDialog(); + labelDisassembleInput.Text = folderBrowserDialog1.SelectedPath; + } + } + + private void buttonDisassembleOutput_Click(object sender, EventArgs e) + { + labelDisassembleOutput.Visible = true; + if (fileRadio.Checked) + { + saveFileDialog1.ShowDialog(); + labelDisassembleOutput.Text = saveFileDialog1.FileName; + } + else + { + folderBrowserDialog2.ShowDialog(); + labelDisassembleOutput.Text = folderBrowserDialog2.SelectedPath; + } + } private void checkForFifthopt(object sender, EventArgs e) { - if (decryptGameSelect.SelectedIndex == 7) + if (decryptGameSelect.SelectedIndex == 8) { customKeyDec.Visible = true; } @@ -606,7 +695,7 @@ private void checkForFifthopt(object sender, EventArgs e) private void IndexChangeEnc(object sender, EventArgs e) { - if (encryptGameSelect.SelectedIndex == 7) + if (encryptGameSelect.SelectedIndex == 8) { customKeyEnc.Visible = true; } @@ -624,6 +713,10 @@ private void ResetFileChoices() decryptOutputFile.Text = ""; decodeInputFile.Text = ""; decodeOutputFile.Text = ""; + labelAssembleInput.Text = ""; + labelAssembleOutput.Text = ""; + labelDisassembleInput.Text = ""; + labelDisassembleOutput.Text = ""; encryptInputFile.Visible = false; encryptOutputFile.Visible = false; @@ -631,33 +724,46 @@ private void ResetFileChoices() decryptOutputFile.Visible = false; decodeInputFile.Visible = false; decodeOutputFile.Visible = false; + labelAssembleInput.Visible = false; + labelAssembleOutput.Visible = false; + labelDisassembleInput.Visible = false; + labelDisassembleOutput.Visible = false; } private void fileRadio_CheckedChanged(object sender, EventArgs e) { - if (!fileRadio.Checked) - return; + checkBoxFolderMode.Visible = true; + if (!fileRadio.Checked) return; + checkBoxFolderMode.Visible = false; ResetFileChoices(); encryptInputLabel.Text = "File to be encrypted:"; encryptOutputLabel.Text = "Output file:"; - encryptBrotipLabel.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or LZMA\r\ncompression."; + encryptBrotipLabel.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or \r\nLZMA compression."; decryptInputLabel.Text = "File to be decrypted:"; decryptOutputLabel.Text = "Output file:"; - decryptBrotipLabel.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or LZMA\r\ncompression."; + decryptBrotipLabel.Text = "Brotip: Newer versions of AB games always store LUAs in either 7z or \r\nLZMA compression."; decodeInputLabel.Text = "File to be decoded:"; decodeOutputLabel.Text = "Output file:"; decodeBrotipLabel.Text = "Brotip: Only decode the file if you know it's already decrypted\r\n"; + + label6.Text = "File to disassemble:"; + label10.Text = "Output file:"; + label3.Text = "Brotip: Only disassemble the file if you know it's already decrypted\r\n"; + + label4.Text = "File to assemble:"; + label7.Text = "Output file:"; + label2.Text = "Brotip: Only assemble the file if you know it's already disassembled\r\n"; } private void folderRadio_CheckedChanged(object sender, EventArgs e) { - if (!folderRadio.Checked) - return; - + checkBoxFolderMode.Visible = false; + if (!folderRadio.Checked) return; + checkBoxFolderMode.Visible = true; ResetFileChoices(); encryptInputLabel.Text = "Encrypt files from:"; @@ -671,6 +777,14 @@ private void folderRadio_CheckedChanged(object sender, EventArgs e) decodeInputLabel.Text = "Decode files from:"; decodeOutputLabel.Text = "Output to:"; decodeBrotipLabel.Text = "Brotip: Make sure all LUA files in the folder are not encrypted before you continue\r\n"; + + label6.Text = "Disassemble files from:"; + label10.Text = "Output to:"; + label3.Text = "Brotip: Make sure all LUA files in the folder are not encrypted or disassembled\r\n before you continue\r\n"; + + label4.Text = "Assemble files from:"; + label7.Text = "Output to:"; + label2.Text = "Brotip: Make sure all LUA files in the folder are not encrypted or assembled\r\n before you continue\r\n"; } } } diff --git a/LUAManager/Resources/font.ttf b/LUAManager/Resources/font.ttf new file mode 100644 index 0000000..4aad0fc Binary files /dev/null and b/LUAManager/Resources/font.ttf differ diff --git a/LUAManager/extras/assemble.bat b/LUAManager/extras/assemble.bat new file mode 100644 index 0000000..151a5b4 --- /dev/null +++ b/LUAManager/extras/assemble.bat @@ -0,0 +1,5 @@ +@echo off +set inputfile = %2 +set outputfile = %3 +cd extras +java.exe -jar unluac_assemble.jar --assemble %2 --output %3 \ No newline at end of file diff --git a/LUAManager/extras/decode.bat b/LUAManager/extras/decode.bat new file mode 100644 index 0000000..11d0907 --- /dev/null +++ b/LUAManager/extras/decode.bat @@ -0,0 +1,5 @@ +@echo off +set inputfile = %2 +set outputfile = %3 +cd extras +java.exe -jar unluac_decode.jar %2 > %3 diff --git a/LUAManager/extras/disassemble.bat b/LUAManager/extras/disassemble.bat new file mode 100644 index 0000000..77ba4d7 --- /dev/null +++ b/LUAManager/extras/disassemble.bat @@ -0,0 +1,5 @@ +@echo off +set inputfile = %2 +set outputfile = %3 +cd extras +java.exe -jar unluac_assemble.jar --disassemble %2 > %3 \ No newline at end of file diff --git a/LUAManager/extras/unluac.jar b/LUAManager/extras/unluac.jar index 71138b7..6a3c0cd 100644 Binary files a/LUAManager/extras/unluac.jar and b/LUAManager/extras/unluac.jar differ diff --git a/LUAManager/extras/unluac_assemble.jar b/LUAManager/extras/unluac_assemble.jar new file mode 100644 index 0000000..6a3c0cd Binary files /dev/null and b/LUAManager/extras/unluac_assemble.jar differ diff --git a/LUAManager/extras/unluac_decode.jar b/LUAManager/extras/unluac_decode.jar new file mode 100644 index 0000000..71138b7 Binary files /dev/null and b/LUAManager/extras/unluac_decode.jar differ diff --git a/README.md b/README.md index 85834cf..5a89d94 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,4 @@ A program to decrypt & decode back and forth the LUA scripts used in the Angry B # Credits * [xxxmän360](https://github.com/xxxman360) - Main programmer * [RSM](https://github.com/giroletm) - Version merging +* [Ghosting Dash] and [Creator34] - New update (subfolders, assembling/dissasembling and more)