using MonoMod.RuntimeDetour; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ADProCrack { internal class Startup { static Hook verifyLicenseHook; [STAThread] private static int EntryPoint(string args) { try { Assembly main = Assembly.GetEntryAssembly() ?? throw new Exception("Could not load the main assembly."); Type licenseValidator = main.GetType("ADToolkit.LicenseValidator") ?? throw new Exception("Could not find the license validator type."); MethodInfo verifyLicense = licenseValidator.GetMethod("VerifyLicense") ?? throw new Exception("Could not find the validate method."); verifyLicenseHook = new Hook(verifyLicense, typeof(Startup).GetMethod("VerifyLicenseHook")); return 0; } catch (Exception ex) { MessageBox.Show(ex.Message, "Crack Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return 1; } } public static bool VerifyLicenseHook(string publicKey, string encryptedData, string encodedSignature) { return true; } } }