// DIE's signature file

init("protector","tElock");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(PE.compareEP("668BC08D2424EB01EB60EB01EB9CE8000000005E83C6508BFE68"))
    {
        sVersion="0.41x";
        bDetected=1;
    }
    else if(PE.compareEP("C1EE00668BC9EB01EB60EB01EB9CE8000000005E83C6"))
    {
        switch(PE.readByte(PE.nEP+22))
        {
        case 0x52: sVersion="0.4x"; break;
        case 0x5E: sVersion="0.5x"; break;
        }
        bDetected=1;
    }
    else if(PE.compareEP("E90000000060E8000000005883C008"))
    {
        sVersion="0.60";
        bDetected=1;
    }
    else if(PE.compareEP("60E8....0000C383"))
    {
        switch(PE.readWord(PE.nEP+2))
        {
        case 0x10BD: sVersion="0.70";   break;
        case 0x10ED: sVersion="0.71";   break;
        case 0x1144: sVersion="0.71b2"; break;
        case 0x1148: sVersion="0.71b7"; break;
        case 0x11F9: sVersion="0.80";   break;
        default:     sVersion="0.7x-0.84";
        }
        bDetected=1;
    }
    else if(PE.compareEP("60E802000000CD20E8000000005E2BC9587402"))
    {
        sVersion="0.85f";
        bDetected=1;
    }
    else if(PE.compareEP("....E802000000E800E8000000005E2B"))
    {
        sVersion="0.90";
        bDetected=1;
    }
    else if(PE.compareEP("E9....FFFF"))
    {
        if(PE.compareEP("E97EE9"))
        {
            sVersion="0.92a";
            bDetected=1;
        }
        else if(PE.compareEP("E9D5E4"))
        {
            sVersion="0.95";
            bDetected=1;
        }
        else if(PE.compareEP("E959E4"))
        {
            sVersion="0.96";
            bDetected=1;
        }
        else if(PE.compareEP("E925E4"))
        {
            sVersion="0.98b1";
            bDetected=1;
        }
        else if(PE.compareEP("E91BE4"))
        {
            sVersion="0.98b2";
            bDetected=1;
        }
        else if(PE.compareEP("E999D7"))
        {
            sVersion="0.98 Special Build";
            bDetected=1;
        }
        else if(PE.compareEP("E95EDF"))
        {
            sVersion="0.99";
            bDetected=1;
        }
        else if(PE.compareEP("E93FDF"))
        {
            sVersion="0.99c";
            bDetected=1;
        }
        else if(PE.compareEP("E9E5E2"))
        {
            sVersion="1.00";
            bDetected=1;
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
