• Please review our updated Terms and Rules here

Trying to decompile "Fuzzy's world of Miniature Space Golf"

Mills32

Experienced Member
Joined
Sep 25, 2018
Messages
179
Location
Spain
Hi, I'm trying to decompile this game, it uses "DPMI16BI.OVL" and "RTM.EXE" which are needed for 16 bit protected mode programs.

Just wanted to ask, what's the best way to do it?.

I tried ghidra, it finds something that looks like 16 bit assembly code in the main.exe, but it does not connect any strings to any function... For example, I can see a lot of file names, but there is no function reading that to open any file, and I did not find any "file open" instructions. Maybe ghidra just made up some parts of the code and it does not work for this kind of program... Or maybe a lot of functions are inside DPMI16BI.OVL and RTM.EXE.

Thanks.
 
Last edited:
You are dealing with a DOS extender.

The actual game code runs in protected mode; it cannot call any DOS or BIOS interrupts. Instead, it calls functions inside the DOS extender which switch processor state, call the system (DOS or BIOS), switch processor state again, and return any values. This dance is especially hairy when it comes to interrupt handlers.

Ghidra may misinterpret data as code, but it is very unlikely to straight-up invent any. However, decompilers generally don't do well with mode switching processors, so you may be in for a ride. Compression, obfuscation and encryption will make things even worse.

It may be easier to load the game in an emulator, snapshot the emulated memory, then figure out where the memory content comes from. If you understand how the game is pieced together at runtime, static analysis becomes substantially easier.
 
Back
Top