"""Offline crash analysis using a hand-built x64 PE and minidump. No target runs.""" import os from pathlib import Path import shutil import struct import subprocess import sys import tempfile import unittest SCRIPTS = Path(__file__).resolve().parents[1] / "scripts" / "windows-boot" sys.path.insert(0, str(SCRIPTS)) import mapped_stack BASE = 0x140000000 RELOCATED = 0x251000000 PC_RVA = 0x104F CALLER_RVA = 0x1110 SP = 0x300000 def pe_image(): image = bytearray(0x800) image[:2] = b"MZ" struct.pack_into("