VOGONS


First post, by LunaVorax

User metadata
Rank Newbie
Rank
Newbie

Hello everyone,

I don't really know if this is the perfect place (both section and forum) to post this but I really don't know where to seek for help with my problem.

As the title say, I've been trying for a long time to reverse-engineer the game Rayman in order to rewrite the engine in SDL or something.

Usually, I use the IDA Free tool to convert an executable into ASM code. But as a lot of you knows, with DOS executables, it's a whole different story.

As memory wasn't cheap back in the days, Rayman is using the PMODE/W DOS extender which ironically efficiently prevents it from being disassembled using the modern IDA Free 5.0 tool.

It didn't took me long to find a tool called PMWUNLIT.EXE v1.20 that can depack executables using PMODE.
So far the "depacked" executable doesn't work properly, still it seems that the job has been well done since a lot of text strings appeared in clear in the executable (like the list of the developpers, some errors and apparently a private joke).
Anyway, that done it doesn't change anything when trying to disassemble it with IDA and it keeps telling me that the file is packed and won't disassemble it.

Therefore I was wondering if anyone here knew a way to deal with such executables.
As long as you can give me clear explanation, I'm ready to hear any advice.

If you want to play with the executable I'm struggling with you can download the Rayman Demo here.

Thank you all in advance for your answers!
Sorry for my clumsy english, I know some of my explanations aren't clear.

Reply 1 of 5, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The unpacked executable is running fine here. Even though the LE is unpacked, it seems that the PMODE/W extender itself remains packed/encrypted, so perhaps that upsets the disassembler you're using. The extracted LE appears to run OK with either DOS32A or DOS4GW, so the game doesn't seem picky about the extender. Perhaps you'll find working with the LE less problematic.

Reply 2 of 5, by peterferrie

User metadata
Rank Oldbie
Rank
Oldbie

Yes, IDA is seeing the DOS stub and a huge overlay, and complaining about the combination.
Just choose the "Linear Executable" option in the file type selector, or extract the LE part to a new file.

Reply 3 of 5, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

IDA Free version doesn't have a loader for Linear Executables. You'll have to dump the executable code pages from the executable into .bin files and then load them manually into IDA Free.

edit: I wonder if you could convert the LE to ELF or PE.

Reply 4 of 5, by M-HT

User metadata
Rank Member
Rank
Member

Older IDA Free versions had a loader for Linear Executables. I think that the latest version that had it was 4.1.

So you can load the executable in old version, save it and load it in new version.

Reply 5 of 5, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the tip 😀