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

meta("packer", "kkrunchy");

function detect() {
    if (PE.compareEP("BD........C745..........B8........89450489455450C74510")) {
        sVersion = "0.23 alpha 2";
        bDetected = true;
    } else if (PE.compareEP("BD........C745..........FF4D08C6450C058D7D1431C0B40489C1F3ABBF")) {
        sVersion = "0.2X";
        bDetected = true;
    } else if (PE.compareEP("bd........c7............fcff4d0831d28d7d30be")) {
        bDetected = true;
    } else if (PE.compare("'MZfarbrauschPE'")) {
        bDetected = true;
    }

    if (bDetected && !PE.isSectionNamePresent("kkrunchy")) {
        sOptions = "modified";
    }

    return result();
}