Architecture
Four pieces, all shipped inside the one FlandersMod.exe:
FlandersMod.exe (.NET Framework 4.8 WinForms launcher, x86)
│
│ unpacks its embedded resources into the game folder, then starts the game
│
├─ FlandersMP.dll native x86 (MinGW/GCC), dropped in as the game's d3d8.dll
├─ FlandersMP_Server.exe native x86 (MinGW/GCC), the multiplayer / master server
├─ ww.zip weapon-wheel art + ~30 .wav sfx + WeaponWheel.ini
└─ mods/*.lmlm 15 bundled Lucas' Mod Launcher mods
The launcher (FlandersMod.exe)
A C# WinForms app (~68 types: FlandersMod.Core, Mods, Lobby, UI,
DiscordPresence, …). What it does, from its P/Invoke imports and strings:
- Writes its embedded files into the game folder (
FlandersMod_Data\,WeaponWheel\). - Starts
Simpsons.exeand injects the DLL. It importsCreateProcess,ReadProcessMemory,WriteProcessMemory,VirtualProtectEx,ResumeThread— i.e. start-suspended, patch/inject, resume. This is the standard SHAR launcher move. - Talks to a master server at
flandersmod-master.flandersmodcanadaservers.workers.dev(/records,/event?kind=…&name=…) and usesapi.ipify.orgto find your public IP when hosting. - Reads
XInputGetState(controller),Get/WritePrivateProfileString(its.ini). - Runs a PowerShell one-liner on exit to delete its own data folder
(
Wait-Process … Remove-Item -Recurse -Force …).
Full C# is not recovered here — open FlandersMod.exe in ILSpy/dnSpyEx for that.
The decomp/*.txt dumps (types, methods, strings, external calls) are the map.
The DLL (FlandersMP.dll)
A Direct3D 8 proxy. It exports the real d3d8 entry points
(Direct3DCreate8, ValidatePixelShader, ValidateVertexShader, DebugSetMute,
Direct3D8EnableMaximizedWindowedModeShim), so when it's placed next to the game
as d3d8.dll the game loads it instead of Microsoft's. From inside, it:
- Byte-patches
Simpsons.exein memory at hard-coded signature sites (string:hook site bytes mismatch (…) - unsupported Simpsons.exe). - Hooks Direct3D present/reset, DirectInput (keyboard/mouse/aim), XInput, DirectSound, and the timer functions (QPC/GetTickCount).
- Draws the weapon wheel from
ww.zip's atlas, and the multiplayer HUD/chat/scoreboard. - Does UDP networking (
sendto) to the game server. - Has a developer debug console gated behind env
FLANDERSMP_WWDEBUG+ adebug_cmd.txtfile (see issue DLL-6).
The server (FlandersMP_Server.exe)
A console app with two roles, selected by CLI flags
(--port, --master, --no-master, --master-only, --master-port, --with-master,
--password, --owner, --max, --name):
- Game server: binds a UDP port, tracks players (cash, kills, deaths, busted), relays chat.
- Master list: optional TCP HTTP/1.0 server that returns the server list as JSON
(
http://localhost:<port>/servers,Access-Control-Allow-Origin: *), and announces itself up to the cloudflareworkers.devmaster with an/announce?…query string.
The mods (*.lmlm)
Lucas' Mod Launcher archives (magic LSPA). 15 are bundled. Not decompiled —
they're game asset/script packs, not PE binaries. Since 0.0.2 a .lmlm can carry
code that adds gameplay (the README calls this out for "Blood Mod").