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

meta("protector", "Crunch");

function detect() {
    if (PE.compareEP("EB100000000000000000000000000000000055E800000000")) {
        sVersion = "4.0";
        bDetected = true;
    } else if (PE.compareEP("EB1503000000060000000000000000000000680000000055E800000000")) {
        sVersion = "5.0";
        bDetected = true;
    } else if (PE.compareEP("55E8........5D83ED068BC5556089AD........2B85")) {
        switch (PE.getEntryPointSignature(32, 2)) {
            case "80BD": sVersion = "1.0"; break;
            case "55BB": sVersion = "2.0"; break;
        }
        bDetected = true;
    }

    return result();
}