// Detect It Easy: detection rule file format

init("protector", "Metrowerks CodeWarrior");

function detect(bShowType, bShowVersion, bShowOptions) {
    // DLL
    if (PE.compareEP("5589E55356578B750C8B5D1083FE01740583FE0275125356FF7508E86EFFFFFF09C0750431C0EB215356FF7508E8")) {
        sVersion = "2.0";
        bDetected = true;
    }
    // Console

    //false positive
    //    else if(PE.compareEP("5589E555B8FFFFFFFF505068........64FF35000000006489250000000068"))
    //    {
    //        sVersion="2.0";
    //        bDetected=1;
    //    }
    // GUI
    else if (PE.compareEP("5589E5535683EC4455B8FFFFFFFF505068........64FF35000000006489250000000068")) {
        sVersion = "2.0";
        bDetected = true;
    }

    return result(bShowType, bShowVersion, bShowOptions);
}