// DIE's signature file
// Author: ajax
// History:
// 23:45 16.01.2013 add HASP SRM x32 1.x and HASP SRM x64 1.x
// 15:40 19.01.2013 change name
//  0:01 12.02.2013 add HASP 4/HL x32

init("protector", "HASP HL/SRM Protection");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (!PE.isPEPlus()) {
        if (PE.compareEP("558bec535657608bc4a3........b8........2b05........a3........833d..........74..8b0d........51ff15")) {
            sVersion = "4.X";
            sOptions = "HL";
            bDetected = true;
        } else if (PE.compareEP("57565351E801000000..5805........508B3003F02BC08BFE66AD")) {
            sVersion = "1.X";
            sOptions = "SRM";
            bDetected = true;
        } else if (PE.compareEP("558bec535657608bc4a3........b8........2b05........a3........833d..........0f84........a1........50ff15")) {
            sVersion = "1.x";
            sOptions = "HL";
            bDetected = true;
        }
    } else {
        if (PE.compareEP("5750569C53515241504151488D05........488B304803F0482BC0488BFE66AD")) {
            sVersion = "1.X";
            sOptions = "SRM";
            bDetected = true;
        }
    }

    return result(bShowType, bShowVersion, bShowOptions);
}