// DIE's signature file
// Author: hypn0 <hypn0@mail.ru>

init("protector","PROTECT! COM");

function detect(bShowType,bShowVersion,bShowOptions)
{
    var nLimit=Math.min(65536,Binary.getSize());
    if(Binary.findSignature(0,nLimit,"0c02e9......e421e9......88e0..........eb....e621e9......88c4........e9......e621eb")!=-1)
    {
        sVersion="5.5";
        bDetected=1;
    }
    else if(Binary.findSignature(0,nLimit,"e42150e9......e621e9......58e621e9......b0ffeb")!=-1)
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$ba....81f2"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bb....81c3....eb"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$be....81ee....bb....d1cb8b04"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bf....81ef....eb"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$be....81ee....bb....d1cb8b04"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bf....81f7"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$ba....81c2....eb"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bd....81f5....eb"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bd....d1cd"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$bb....81f3"))
    {
        sVersion="5.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$1efd2efe"))
    {
        sVersion="5.5";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$e800005d81ed....33c08ed88bf0bf....b9....fcf3a5fd87fe8cc08ed833c08ec04f4f"))
    {
        sVersion="4.0";
        bDetected=1;
    }
    else if(Binary.compare("e9$$$$1eb430cd213c..73..cd20be....e8....e8....1f8cd88ec0"))
    {
        sVersion="6.0";
        bDetected=1;
    }
    else if(Binary.compare("e8$$$$501e060e550e1f33c08ec0fafc26a1....5026a1....50"))
    {
        sVersion="3.0/3.1";
        bDetected=1;
    }
    else if(Binary.compare("b8....50b8....50e9$$$$c606......eb$$8cc6060b01c3"))
    {
        sVersion="2.0";
        sOptions="1993";
        bDetected=1;
    }
    else if(Binary.compare("b8....50e9$$$$c606......eb$$8cc6060701c3eb"))
    {
        sVersion="1.0";
        sOptions="1993";
        bDetected=1;
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
