public int Index; // current RIP-ish public Example(string Path) { if (!File.Exists(Path)) { Console.ForegroundColor = ConsoleColor.DarkRed; Console.WriteLine($"Error, File {Path} was not found!"); return; } this.FilePath = Path; this.Buffer = File.ReadAllBytes(this.FilePath); this.CachedDisassembly = new Dictionary <int, string>(); this.Index = 0; this.FlowAnalyses = new U8Flow(this.Buffer); }
public Form1() { InitializeComponent(); timer1.Enabled = true; worker = new Thread(new ParameterizedThreadStart(doTask)); worker.Name = "u8_Disasm"; worker.Start(null); void doTask(object x) { Form1.FlowAnalyser = new U8Flow(File.ReadAllBytes(@"L:\Projects\Calculator\Casio\ROM_Dump.mem")); Form1.FlowAnalyser.Analyse(); //updateSubsView(); } }
private string TargetFile = @"L:\Projects\Calculator\Casio\ROM_Dump.mem"; // NOTE: cba using menu all the time public frmMain() { InitializeComponent(); this.Analyser = new Thread(new ThreadStart(analyse)); this.Analyser.Start(); void analyse() { while (!File.Exists(TargetFile)) { Thread.Sleep(2000); } frmMain.Flow = new U8Flow(File.ReadAllBytes(TargetFile)); Flow.Analyse(); // start analysis so others can check blocks } }