Unpacking (decrunching)

Overview

The material you would like to reverse engineer, is not always directly accessible. Often, due to the small amounts of disk space available to the Amiga computer, it will be compressed.

Unpacking is the extraction of the uncompressed data, so that it can be accessed by a disassembler.

Approaches

There are a number of approaches you can take to unpack the data you wish to disassemble.

Existing Solutions

These need to be run on an Amiga, whether an actual one you own, or one you are emulating. Outside of the Amiga, support for unpacking is limited to common archiving formats. You might be able to get a tool like 7zip to extract Lha archives on Windows, but it will never support crunchers like ByteKiller.

Solution License Description
xfdmaster Proprietary This software package allows you to decrunch almost every packed file known on the Amiga.
Unpacker.library Proprietary This library knows a lot of different crunchers, about 180 different crunchers and versions and most remarkabel the Lha, Lhz, Lharc, LhaSFX, PAK and the DMS packers too. The unpUnpack program provided can unpack a file or a directory.

Manual Unpacking

In the case where it is not convenient to employ an existing tool to do the unpacking you require, or there are simply no existing tools that can deal with the custom cruncher, you need to do the required steps yourself manually.

  • Disassemble the crunched file.
  • Locate the address that is called within the decrunched code.
  • Disable the actual call to that address, leaving only the decrunching process in play.
  • Do the decrunch to a safe memory location.
  • Save the decrunched data at that memory location.

One way to do this is to make use of one of the many children of the Seka assembler. This assembler was disassembled, and released in updated forms by the scene, from MasterSeka to AsmOne. If you obtain the latest version of these, you can use it to do the required disassembling, call disabling, decrunching and saving as simple and straightforward commands.

Other Information

Wiki References

External Links

Data compression - The Wikipedia entry for data compression.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License