// Detect It Easy: detection rule file
// Author: hypn0 <hypn0@mail.ru>

meta("cruncher", "PowerPacker");

function detect() {
    if (Amiga.compareEP("487a....48e7fffe49fa....2054d1c8d1c8")) {
        sVersion = "3.0";
        sOptions = "type 1";
        bDetected = true;
    } else if (Amiga.compareEP("48e7fffe41fa....2050d1c8d1c84a982248")) {
        sVersion = "2.1-3";
        bDetected = true;
    } else if (Amiga.compareEP("6000$$$$2f0e4dfa....48d6ffff4dee....2d5f")) {
        sVersion = "3.0";
        sOptions = "type 2";
        bDetected = true;
    } else if (Amiga.compareEP("4e714e71487a....48e7fffe49fa....2054d1c8d1c858")) {
        sVersion = "3.0";
        sOptions = "type 3";
        bDetected = true;
    } else if (Amiga.compareEP("487a....48e7fffe2c78....43fa....45fa....2489")) {
        sVersion = "4.0";
        sOptions = "Encrypted (type 1)";
        bDetected = true;
    } else if (Amiga.compareEP("487a....48e7fffe2c78....203c........4eae....6000")) {
        sVersion = "4.0";
        sOptions = "Encrypted (type 2)";
        bDetected = true;
    } else if (Amiga.compareEP("487a....48e7fffe2c78....60$$4e714e71283c........4844")) {
        sVersion = "4.0";
        sOptions = "Encrypted (type 3)";
        bDetected = true;
    } else if (Amiga.compareEP("487a....48e7fffe70..43fa....2c78....4e......4a80")) {
        sVersion = "4.0";
        sOptions = "Library";
        bDetected = true;
    } else if (Amiga.compareEP("487a....48e7fffe2c78....283c........4e714e71")) {
        sVersion = "3.0";
        sOptions = "Encrypted";
        bDetected = true;
    } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed0d1c858")) {
        sVersion = "4.0";
        sOptions = "type 1";
        bDetected = true;
    } else if (Amiga.compareEP("6100$$$$2a572b7a........59..2c78....4eae....2f17487a....2f57")) {
        sVersion = "4.0";
        sOptions = "type 2";
        bDetected = true;
    }

    return result();
}