I have this method in main on Superfighters Deluxe.exe

private static void Main(string[] args)
		{
			ConsoleOutput.Init();
			ServicePointManager.SecurityProtocol |= (SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12);
			if (!Program.VerifyEncryptionKey())
			{
				MessageBox.Show("Invalid encryption key. Exiting...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				return;
			}
			Program.DecryptExecutable();
			new Thread(new ThreadStart(Program.ListenForCommands)).Start();
			Program.IsGame = true;

// Token: 0x060061CA RID: 25034
		private static bool VerifyEncryptionKey()
		{
			Console.Write("Enter encryption key: ");
			string enteredKey = Console.ReadLine();
			return string.Equals("YourExpectedKey", enteredKey, StringComparison.OrdinalIgnoreCase);
		}

		// Token: 0x060061CB RID: 25035
		private static void DecryptExecutable()
		{
			using (Aes aesAlg = Aes.Create())
			{
				aesAlg.Key = Encoding.UTF8.GetBytes("YourEncryptionKeyHere");
				aesAlg.IV = Encoding.UTF8.GetBytes("YourEncryptionKeyHere");
			}
		}

		// Token: 0x060061D8 RID: 25048
		private static void ListenForCommands()
		{
			using (NamedPipeServerStream pipeServer = new NamedPipeServerStream("SuperfightersDeluxePipe"))
			{
				pipeServer.WaitForConnection();
				string command = new StreamReader(pipeServer).ReadToEnd().Trim();
				if (command == "DecryptExecutable")
				{
					Program.DecryptExecutable();
				}
				else if (command == "GetGameInfo")
				{
					string gameInfo = "Some game information";
					StreamWriter streamWriter = new StreamWriter(pipeServer);
					streamWriter.Write(gameInfo);
					streamWriter.Flush();
				}
				pipeServer.Close();
			}
		}

And I want it to decrypt it upon clicking button2 on c# loader called howque.exe

A differente executable

I want it so when I press button2 it starts sending piperequests. And on the method of Superfighters Deluxe.exe upon opening that method should search for the pipe connection, if it's true then decrypt it

Heres the button2 code

private async void button1_Click(object sender, EventArgs e)
{
    if (!isButtonClickable)
    {
        // Button is not clickable, do nothing
        return;
    }

    // Disable the button
    isButtonClickable = false;
    button1.Text = "Injecting...";
    button1.ForeColor = Color.Red;
    button1.Font = new Font(button1.Font, FontStyle.Regular);

    try
    {
        if (!IsGameInstalled())
        {
            throw new Exception("Superfighters Deluxe is not installed. \nIf you have the game installed and playable in the Steam version, " +
                "\n\ncontact Hermano#7066 on Discord" +
                "\n\n\nTHE HACKED CLIENT ONLY WORKS WITH THE STEAM VERSION!");
        }

        try
        {
            // Inform Superfighters Deluxe.exe to decrypt the executable
            await Task.Run(() => ExecutePipeCommand("DecryptExecutable"));

            // Start Superfighters Deluxe using the Steam URL asynchronously
            Console.WriteLine("Starting Superfighters Deluxe...");
            await Task.Run(() => LaunchGame("steam://run/855860"));

            // Wait for the game to start
            Console.WriteLine("Waiting for the game to start...");
            await WaitForGameToStartAsync();

            button1.Text = "Injected";
            button1.ForeColor = Color.Red;
            button1.Font = new Font(button1.Font, FontStyle.Regular);

            // Wait for the game to exit
            Console.WriteLine("Waiting for the game to exit...");
            await WaitForGameToExitAsync();

            // Set label text to "Restoring..."
            button1.Text = "Restoring...";
            button1.ForeColor = Color.Red;
            button1.Font = new Font(button1.Font, FontStyle.Regular);

            // Delay for 5 seconds
            await Task.Delay(3000);

            // Enable the button and set label text to "Inject"
            isButtonClickable = true;
            button1.Text = "Inject";
            button1.ForeColor = Color.FromArgb(192, 192, 0);
            button1.Font = new Font(button1.Font, FontStyle.Regular);
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
            // Handle exceptions
        }
    }
    catch (Exception ex)
    {
        Console.WriteLine($"Error: {ex.Message}");
        // Handle exceptions
    }
    finally
    {
        // Enable the button and set label text to "Inject"
        isButtonClickable = true;
        button1.Text = "Inject";
        button1.ForeColor = Color.FromArgb(192, 192, 0);
        button1.Font = new Font(button1.Font, FontStyle.Regular);
    }
}

private void ExecutePipeCommand(string command)
{
    bool connected = false;

    while (!connected)
    {
        try
        {
            using (NamedPipeClientStream pipeClient = new NamedPipeClientStream(".", "SuperfightersDeluxePipe"))
            {
                pipeClient.Connect();

                using (StreamWriter writer = new StreamWriter(pipeClient))
                {
                    writer.Write(command);
                    writer.Flush();
                }

                connected = true; // Set to true to exit the loop if the connection is successful
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error executing pipe command: {ex.Message}");

            // Introduce a delay before retrying
            Thread.Sleep(1000); // Adjust the delay as needed
        }
    }
}