# Module base map — 1.13c install at `C:\Diablo II` Every value read from the PE optional header (`ImageBase` at +0x1C, `SizeOfImage` at +0x38). Nothing here is remembered or inherited from a table. ## Preferred bases | Module | ImageBase | SizeOfImage | Preferred end | RVA == file offset | |---|---|---:|---|---| | `Game.exe` | `0x00400000` | 69632 | `0x00411000` | yes | | `Diablo II.exe` | `0x00400000` | 36864 | `0x00409000` | yes | | `SmackW32.dll` | `0x10000000` | 106496 | `0x1001A000` | no (sect 0x1000 / file 0x200) | | `binkw32.dll` | `0x10000000` | 266240 | `0x10041000` | no (sect 0x1000 / file 0x200) | | `ijl11.dll` | `0x60000000` | 188416 | `0x6002E000` | yes | | `D2Glide.dll` | `0x6F850000` | 106496 | `0x6F86A000` | yes | | `D2Gdi.dll` | `0x6F870000` | 57344 | `0x6F87E000` | yes | | `D2Win.dll` | `0x6F8E0000` | 847872 | `0x6F9AF000` | yes | | `D2Sound.dll` | `0x6F9B0000` | 102400 | `0x6F9C9000` | yes | | `D2Multi.dll` | `0x6F9D0000` | 258048 | `0x6FA0F000` | yes | | `D2MCPClient.dll` | `0x6FA20000` | 81920 | `0x6FA34000` | yes | | `D2Launch.dll` | `0x6FA40000` | 184320 | `0x6FA6D000` | yes | | `D2gfx.dll` | `0x6FA80000` | 135168 | `0x6FAA1000` | yes | | `D2Client.dll` | `0x6FAB0000` | 1265664 | `0x6FBE5000` | yes | | `D2Net.dll` | `0x6FBF0000` | 53248 | `0x6FBFD000` | yes | | `Storm.dll` | `0x6FBF0000` | 393216 | `0x6FC50000` | yes | | `D2Lang.dll` | `0x6FC00000` | 81920 | `0x6FC14000` | yes | | `D2Game.dll` | `0x6FC20000` | 1187840 | `0x6FD42000` | yes | | `D2Common.dll` | `0x6FD50000` | 692224 | `0x6FDF9000` | yes | | `ExtLvl.dll` | `0x6FDA0000` | 32768 | `0x6FDA8000` | no (sect 0x1000 / file 0x200) | | `D2CMP.dll` | `0x6FE10000` | 1081344 | `0x6FF18000` | yes | | `Bnclient.dll` | `0x6FF20000` | 147456 | `0x6FF44000` | yes | | `Fog.dll` | `0x6FF50000` | 376832 | `0x6FFAC000` | yes | ## Collisions These modules cannot all load at their preferred base. The loser relocates, and every absolute VA for a relocated module is a **file coordinate only**. | A | B | Overlap | |---|---|---:| | `Game.exe` `0x00400000..0x00411000` | `Diablo II.exe` `0x00400000..0x00409000` | 36864 bytes | | `SmackW32.dll` `0x10000000..0x1001A000` | `binkw32.dll` `0x10000000..0x10041000` | 106496 bytes | | `D2Net.dll` `0x6FBF0000..0x6FBFD000` | `Storm.dll` `0x6FBF0000..0x6FC50000` | 53248 bytes | | `Storm.dll` `0x6FBF0000..0x6FC50000` | `D2Lang.dll` `0x6FC00000..0x6FC14000` | 81920 bytes | | `Storm.dll` `0x6FBF0000..0x6FC50000` | `D2Game.dll` `0x6FC20000..0x6FD42000` | 196608 bytes | | `D2Common.dll` `0x6FD50000..0x6FDF9000` | `ExtLvl.dll` `0x6FDA0000..0x6FDA8000` | 32768 bytes | ## Correction on record `D2Launch.dll` is **`0x6FA40000`**. A working note in this project carried `0x6FA10000`, which is wrong by `0x30000`; any D2Launch VA converted with it lands past end-of-image. The binary proves its own base independently of the header: RVA `0xC92F` is `JMP DWORD [EDX*4 + 0x6FA4CAE8]`, and RVA `0xCAE8` holds `36 C9 A4 6F` / `47 C9 A4 6F` = `0x6FA4C936`, `0x6FA4C947` — self-consistent only at base `0x6FA40000`. whist's printed D2Launch VAs were correct as written. ## Working rule Cite **RVAs**. They survive relocation; absolute VAs do not. When an absolute VA is unavoidable, name the module and the base it was computed against in the same breath.