// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>

meta("packer", "UPX");

function detect() {
    if (MACH.getNumberOfSections() == 2) {
        var nOffset = MACH.findString(0, MACH.getSize(), "$Id: UPX");
        if (nOffset != -1) {
            sVersion = MACH.getString(nOffset + 9, 4);
            bDetected = true;
        }
    }

    return result();
}