private void DisplaySelectedMemoryBlock() { MiniDumpMemoryInfo memoryBlock = (MiniDumpMemoryInfo)listView1.SelectedItems[0].Tag; // First check if we have all of the process memory, if we don't then there's no need to proceed. if ((this.Memory64Stream == null) || (this.Memory64Stream.MemoryRanges.Length <= 0)) { MessageBox.Show("Memory information is only available when using a full-memory dump.", "Missing data", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ulong startAddress = memoryBlock.BaseAddress; ulong endAddress = memoryBlock.BaseAddress + memoryBlock.RegionSize - 1; ulong offsetToReadFrom = MiniDumpHelper.FindMemory64Block(this.Memory64Stream, startAddress, endAddress); if (offsetToReadFrom == 0) { MessageBox.Show("Sorry, I couldn't locate the data for that memory region inside the minidump.", "Missing data", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } byte[] data = new byte[memoryBlock.RegionSize]; _minidumpFile.CopyMemoryFromOffset(offsetToReadFrom, data, (uint)memoryBlock.RegionSize); HexViewerDialog hexViewerDialog = new HexViewerDialog(data); hexViewerDialog.Text = $"Displaying {Formatters.FormatAsMemoryAddress(startAddress)} - {Formatters.FormatAsMemoryAddress(endAddress)} ({Formatters.FormatAsSizeString(memoryBlock.RegionSize)}, {memoryBlock.RegionSize} bytes)"; hexViewerDialog.Show(); }