neuviemeporte / mzretools

Tools for reversing DOS games, primarily inspection of MZ executables
GNU General Public License v2.0
33 stars 2 forks source link

`mzmap` fails on some executables #3

Open lethal-guitar opened 4 months ago

lethal-guitar commented 4 months ago

I have two executables which produce errors when running mzmap on them. Both executables have been built using Borland C compilers, and contain only 8086/8088 instructions. I can't reproduce the problem using a simple test program compiled with the same compilers, so it seems to be something specific to the executables in question.

Example 1: DN1.EXE from Duke Nukem 1 Shareware, decompressed using e.g. UNLZEXE

Analyzing code within extents: 1000:0000-2000:ccf9/01ccfa
mzmap: <...>/mzretools/src/instruction.cpp:299: void Instruction::load(const Byte*): Assertion `iclass != INS_ERR' failed.
Aborted

Example 2: BMENACE1.EXE from BioMenace Shareware or Freeware version, decompressed using UNP (UNLZEXE doesn't work for this one)

Analyzing code within extents: 1000:0000-4000:629f/0362a0
Done analyzing code
Building routine map from search queue contents: 437 routines over 29 segments
ERROR: Unable to move address 4000:629f/04629f to segment 0x2f61

I'm happy to do some debugging myself, but I would need some guidance/pointers on where to look.

neuviemeporte commented 4 months ago

Hey, thanks for the bug report. The first one looks like an unsupported instruction, but I need to check to make sure. The second one is a problem after the initial mapping is done and the actual map is generated, the 29 segments look suspicious, so I would also need to check.

Could you please provide the md5 sums for these executables? Thanks.

lethal-guitar commented 4 months ago

Could you please provide the md5 sums for these executables?

Absolutely! Thanks for having a look.