public OffsetEditorDlg(Offset offset, Win32Assembly assembly) { InitializeComponent(); this.offset = offset; this.original = offset; this.assembly = assembly; RefreshTextBoxes(); }
internal DataDirectory(Section targetSection, uint headerOffset, uint rva, uint size) { this.headerOffset = headerOffset; this.size = size; if (rva != 0) { OffsetConverter converter = new OffsetConverter(targetSection); this.targetOffset = Offset.FromRva(rva, targetSection.ParentAssembly); this.targetSection = targetSection; } }
internal DataDirectory(DataDirectoryName name, Section targetSection, uint headerOffset, Structures.IMAGE_DATA_DIRECTORY rawDataDir) { this._name = name; this._headerOffset = headerOffset; this._rawDataDir = rawDataDir; if (rawDataDir.RVA == 0 || targetSection == null) { _targetOffset = new Offset(0, 0, 0); } else { this._targetOffset = Offset.FromRva(rawDataDir.RVA, targetSection.ParentAssembly); this._targetSection = targetSection; } }
internal DataDirectory(DataDirectoryName name, Section targetSection, uint headerOffset, Structures.IMAGE_DATA_DIRECTORY rawDataDir) { this.name = name; this.headerOffset = headerOffset; this.rawDataDir = rawDataDir; if (rawDataDir.RVA == 0) { targetOffset = new Offset(0, 0, 0, ASM.OperandType.Normal); } else { OffsetConverter converter = new OffsetConverter(targetSection); this.targetOffset = Offset.FromRva(rawDataDir.RVA, targetSection.ParentAssembly); this.targetSection = targetSection; } }
internal DataDirectory(DataDirectoryName name, Section[] assemblySections, uint offset, Structures.IMAGE_DATA_DIRECTORY rawDataDir) { this._rawDataDir = rawDataDir; this._name = name; if (rawDataDir.RVA == 0) { _targetOffset = new Offset(0, 0, 0); } else { this._headerOffset = offset; _targetSection = Section.GetSectionByRva(assemblySections, rawDataDir.RVA); if (_targetSection == null) this.TargetOffset = new Offset(0, rawDataDir.RVA, 0); else this._targetOffset = Offset.FromRva(rawDataDir.RVA, assemblySections[0].ParentAssembly); } }
internal DataDirectory(DataDirectoryName name, Section[] assemblySections, uint offset, uint rva, uint size) { try { this.name = name; if (rva == 0) { offset = 0; targetOffset = new Offset(0, 0, 0, ASM.OperandType.Normal); size = 0; } else { this.headerOffset = offset; targetSection = Section.GetSectionByRva(assemblySections, rva); this.size = size; this.targetOffset = Offset.FromRva(rva, assemblySections[0].ParentAssembly); } } catch (Exception ex) { } }
private void textBox1_Leave(object sender, EventArgs e) { try { offset = Offset.FromFileOffset(uint.Parse(textBox1.Text, NumberStyles.HexNumber), assembly); RefreshTextBoxes(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); textBox1.Text = "00000000"; } }
private void button2_Click(object sender, EventArgs e) { offset = original; Close(); }
internal Myx86Instruction() { OpCode = x86OpCodes.Unknown; Offset = new Offset(0, 0, 0); }