Menu

Converting unexepack to architecture independent code

2018-12-30
2019-08-01
  • Ken Swarthout

    Ken Swarthout - 2018-12-30

    Hi!

    I am attempting to use your unexepack tool to unpack an old 16-bit MS-DOS application on a 64-bit system. I know the code, as is, is not compatible with 64-bit OSes. I have spent a few hours trying to convert the code so it'd work on any system that supported the uint_t datatypes.

    I beleive I am extremely close, but currently, it's detecting the packed file as a non-EXEPACKed file. When creeping through the new code, I noticed when the packed struct gets filled in, the signature is always two bytes off. For example, the new code will read the following bytes from the packed exe:

    0x10 0x00 0x59 0x05 0x00 0x00 0x9A 0x0E 0x88 0x13 0xDE 0x18 0xC0 0x18 0x52 0x42
    0x8B 0xE8

    Notice how the last two bytes are not the signature, but the two before those are. Because I do not have nearly the experience with EXEPACK files, would you be interested in looking at the modifications that I've made to make this code work on 32-bit and 64-bit systems? So far, your code is the only code I could get to compile using MinGW, and all the other EXEPACK unpackers I found are made for 16-bit systems.

    I am running Windows 10 64-bit Enterprise.

    Any help would be greatly appreciated!

    Thank you!

     
    👍
    1
  • driedfruit

    driedfruit - 2019-08-01

    Hi, sorry for the late reply, as this is a semi-abandoned project, I don't check those forums often :(

    Anyways, would be happy to help, and would be very happy to get a proper stdint-based/endian-independant version of that tools. If you had any luck there, please do share!

    BTW, there's another codepath in openkb (lib/dos-exe.c), which is probably more suited for your needs.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.