This script will unpack all files in a Molebox 2.x packed file which are visible to the packed program into the subfolder "!UNPACKED!".
Unfortunately, in many cases the main executable is not included.
1. Copy "mbunpack.dll" and "filelen.exe" into the executable's folder.
2. Open the moleboxed executable in Olly.
3. Make sure EIP is at the entry point of Molebox stub, no breakpoints are set and all exceptions are ignored!!!
4. Run this script.
5. OEP address will be displayed and you will be asked if you want to unpack it or start exploring the file at OEP.
6. If you start unpacking, you can follow the progress in the console window which will open. Be patient.
Known bug: All folders in the root directory will be recreated in the "!UNPACKED!" subfolder, ignoring whether it existed in the archive or not.