using System.Diagnostics; using System.Reflection; using System.Text.Json; using XFEEDToolBox.Core.Native; using XFEEDToolBox.Core.Navigation; if(args.Length!=2)throw new ArgumentException("Use a verified game PID and a new report path."); var pid=int.Parse(args[0]);var output=Path.GetFullPath(args[1]);if(File.Exists(output))throw new IOException("Use a fresh report."); using var process=Process.GetProcessById(pid);var started=process.StartTime.ToUniversalTime().Ticks; var type=typeof(IReadOnlyGameMemory).Assembly.GetType("XFEEDToolBox.Core.Native.ReadOnlyPlayerMemory",true)!; using var lease=(IDisposable)Activator.CreateInstance(type,pid,started,NativeSystemLocationReader.GameSha256)!; var memory=(IReadOnlyGameMemory)lease;var pipe=new NavigationPipeClient(pid); ulong Pointer(ulong at)=>BitConverter.ToUInt64(memory.Read(at,8)); object Table(ulong pointer) { var vtable=Pointer(pointer); if(vtable=memory.ImageBase+memory.ImageSize)throw new InvalidDataException("Vtable is outside the pinned image."); var methods=new Dictionary(); for(ulong slot=0;slot<=0x180;slot+=8) {var method=Pointer(vtable+slot);methods[slot.ToString("x")]=method>=memory.ImageBase&&method