Dropper 2.0 documentation
This is the online version of the Dropper 2.0 documentation that is also
included in the Dropper 2.0 zip archive.
Dropper is analyst and optimizer tool for Windows programs. It can handle the so-called 'PE executables', that is, EXE and DLL files made for Windows.
This version of Dropper introduces two new concepts: CAB dropping and Headers-Sections Merging.
Cabinet Dropping is a technique that compresses the program into a MS Cabinet (.CAB) and depacks it runtime with a batch/command file. This allows a radically better compression for 4k intros than any other currently available solution.
Headers-Sections Merging: by exploiting a strange logic of the Windows XP executable loader, it is possible to completely merge headers and sections into one continuous block. This way there is no need for any space consuming padding, neither after the headers, nor between sections.
Another new addition to Dropper is the conversion to Ordinal Importing, which is a method supported by all Windows versions. This radically reduces the space occupied by functions imported from DLLs, at the cost of giving up OS independece.
Besides these new features, all previously existing options (analysis, header optimization, COM Dropping) have been improved. Steps have been taken to make the tool and the documentation more user-friendly (just a few steps, actually).
Dropper will save your program as
How does this work? This com is made up of two parts: firstly, a small DOS COM program called COM stub; secondly, it contains the whole exe file as binary data. When the com is started, the stub saves the exe to the hard drive and executes it. When the exe terminates, the stub deletes it and returns to the OS.
COM dropping is supported since the first version of Dropper; the recently added CAB dropping is better than COM dropping in most cases.
CAB dropping includes compression, so there is no need to use any external packer (UPX or Apack). Compression is done by the Microsoft Cabinet's LZX packer, which is a built in Windows feature, and this LZX compression is usually better than UPX or Apack. Generally, an intro gets smaller with CAB dropping than with COM dropping and post-packing with UPX or Apack.
Ordinal Importing is a method supported by all Windows versions. This radically reduces the space occupied by functions imported from DLLs, at the cost of giving up OS independece.
The regular Hint-Name importing means that every imported function is described by an ASCII string, eg. if you use
When converted to ordinal imports, your program will only work on the very same OS that you use. Even minor changes (eg. a newer DirectX version if your program uses DirectX) could make your program fail.
Tips on usage - 4k intros: competition and release versions
If you make a 4k intro, I recommend that you made two versions of your intro: a small competition version and compatible release version. If your goal is that other people would watch your intro, you should not forget the latter. I suggest that the release version be fully uncompressed, neither optimized by Dropper, nor packed with UPX, FSG, or any other tool. This might make a chance of survival for your work for several years of time. The competition version should be for Windows XP only (of course, make sure that the competition PC has XP, but this is most likely these days). Windows XP allows quite a few tricks for Dropper that other Windows versions do not. I don't think you should use ordinal importing, unless you have the chance to test your intro on the competition PC (if it does not work and you still need ordinal imports to fit in 4k, pack your intro with Dropper on the compo PC itself). As for the final format, I recommend that you don't use COM dropping anymore, CAB dropping (that is, BAT output) is better in several ways. The Assembly 2004 rules state that your intro should save temporary files to the system temp directory. It would have been too much overhead to comply to this rule with a COM dropper, but the overhead is acceptable with CAB dropping. Generally, the COM dropper post-packed with Apack or UPX makes larger files than the CAB dropper. The limitation of CAB dropping is that it is Windows XP only. This is not a problem if you include an OS independent release version.
Tips on usage - Removal of relocations is safe
Relocations are not required to execute a program anymore, not even in Windows 95. In case your linker still adds them, you can safely remove them. Now even Microsoft's own linker has fixed base address (no relocations included) by default.
Tips on usage - Add relocations for better optimization
Relocations contain information needed to completely change the layout of the program, thus making it smaller or more compressible. Adding relocations will certainly increase the original executable size of the program, but Dropper can completely remove them after using them.
How to force including relocations:
Again, relocations are not needed to run a program. The linker adds relocations, Dropper uses and removes them. Thus the final executable will not contain relocations, even though you force the linker to include them.
Tips on usage - About merging sections
Dropper can merge sections itself. You should better leave this task to Dropper, but below are a few guidelines if you decide to do it on your own.
If you force your compiler to merge the sections, you will see that the file size drops, since you get rid of one section alignment. However, if the imports section and the code section are merged together, Dropper is unable to rebuild the imports (even if relocations are present, they won't include information about how the code uses the imports). This might mean a loss of some bytes.
How to set options about merge sections:
To sum it up, it's better to leave this option blank if you use Dropper; but trying a different setting might decrease the final filesize in some cases.
Tips on usage - Notes on COM dropper
As described before, the point in COM dropping is to make your program compress better with an executable packer. The process will look like this:
dropper.exe /oc myintro.exe upx.exe -9 myintro.com
About the packers:
The com stub is the small program that saves the exe to the disk, starts
it and deletes it after it has finished. You can choose from several com
stubs (command line options
Win98 stubs: The main difference between Win98 stubs is that the standard stub (/c4) uses the root directory of drive c: as a temporary storage of the exe, while the other two (/c5 and /c6) use the current directory. The latter two are identical in operation but compress differently with different executable packers. (Dropper can't automatically choose the better of these two stubs, since you use an external packer). Alink tends to prefer the "small stub" (/c5), UPX slightly prefers the "alternative stub" (/c6).
Running incompatible COM dropper intros:
Saving the temporary exe to current directory might not be possible, eg. when the intro is ran from CD. However, current drive's current directory might differ from the place where the executable resides. So you can run it from your CD, too, you just have to start it from a writable drive. For example, your hard drive is "c:\", your CD drive is "d:\" and your intro is "d:\scene\intro.com". Then use this batch:
Saving to C: might fail in certain cases. Eg. access to that drive might be forbidden, or it might even happen that C: does not exist at all. In the latter case try
subst c: %tmp% intro.com subst c: /d
You can freely use and spread this program together with the included documentation in an unmodified form. There is no warranty whatsoever.
IMPORTANT -- PLEASE READ!
It is your task to thoroughly test your program modified by Dropper. Please test that the program works on all target operating systems of your choice (Windows 95, 98, NT, 2k, XP). Light optimizations (eg. relocations removal) are safe. However, if you choose to use a heavy compression/optimization feature (COM or BAT output, ordinal imports), please include a safe uncompressed version of your program along with the optimized version.
Dropper 2.0 - 08/2004
Dropper 1.3 - 09/2003
Dropper 1.2 - 08/2002
Dropper 1.1 - 07/2002
complete rework. c++ / nasm
Dropper 1.0 - 04/1999
original version. tasm32
You can download the latest version of Dropper and related material from gem.intro.hu.
You can contact me at (Important: subject should be "Dropper"). Reports on bugs, compatibility issues, etc are welcome.
Release Date: 04th August 2004