private V1Disassembler(SmxFile file, SmxCodeV1Section code, int proc_offset) { data_ = file.Header.Data; code_start_ = code.CodeStart; proc_offset_ = proc_offset; cursor_ = proc_offset; cursor_limit_ = code.Header.CodeSize; }
public SmxRttiData(SmxFile file, FileHeader file_header, SectionEntry header) : base(file_header, header) { smx_file_ = file; var reader = file_header.SectionReader(header); bytes_ = reader.ReadBytes(header.Size); }
public static V1Instruction[] TryDisassemble(SmxFile file, SmxCodeV1Section code, int proc_offset) { try { return(Disassemble(file, code, proc_offset)); } catch { return(null); } }
private void LoadFile(FileInfo fInfo) { try { using (var stream = fInfo.OpenRead()) { using (var reader = new BinaryReader(stream)) { file_ = new SmxFile(reader); } } } catch (Exception e) { detailbox_.Text = "Error while loading and processing the file." + Environment.NewLine + Environment.NewLine + "Details: " + e.Message; return; } renderFile(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { var dialog = new OpenFileDialog(); dialog.Filter = "smx files (*.smx)|*.smx|All files (*.*)|*.*"; dialog.FilterIndex = 1; dialog.RestoreDirectory = true; if (dialog.ShowDialog() != DialogResult.OK) return; Stream stream = null; try { stream = dialog.OpenFile(); } catch (Exception ex) { MessageBox.Show("Could not open file: " + ex.Message, "File error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } try { using (stream) using (var reader = new BinaryReader(stream)) { file_ = new SmxFile(reader); } } catch (Exception ex) { MessageBox.Show("Could not parse file: " + ex.Message); return; } renderFile(); }
public SmxDebugLocals(SmxFile smx_file, FileHeader file, SectionEntry header, SmxNameTable names) : base(file, header, names) { smx_file_ = smx_file; }
public static V1Instruction[] Disassemble(SmxFile file, SmxCodeV1Section code, int proc_offset) { var disassembler = new V1Disassembler(file, code, proc_offset); return(disassembler.disassemble()); }
public TypeBuilder(SmxFile file, byte[] bytes, int offset) { file_ = file; bytes_ = bytes; offset_ = offset; }
public static V1Instruction[] Disassemble(SmxFile file, SmxCodeV1Section code, int proc_offset) { var disassembler = new V1Disassembler(file, code, proc_offset); return disassembler.disassemble(); }