Lay out resources, ReadyToRun data and IL bodies from their actual extents. Preserve RVA zero for bodyless methods and verify adjacent bodies through the production inspector.
468 lines
15 KiB
JavaScript
468 lines
15 KiB
JavaScript
import { Buffer } from "node:buffer";
|
|
|
|
const textEncoder = new TextEncoder();
|
|
|
|
const DEFAULT_MVID = Buffer.from([
|
|
0x33, 0x22, 0x11, 0x00, 0x55, 0x44, 0x77, 0x66, 0x88, 0x99, 0xaa, 0xbb, 0xcc,
|
|
0xdd, 0xee, 0xff,
|
|
]);
|
|
|
|
const align4 = (value) => (value + 3) & ~3;
|
|
const cString = (value) => Buffer.from(`${value}\0` |