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

init("protection","Eutron SmartKey dongle reference");

function detect(bShowType,bShowVersion,bShowOptions)
{
    // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers).
    var nSize=PE.isOverlayPresent()?PE.getOverlayOffset():PE.getSize();
    if(PE.findString(0, nSize, "skeydrv.dll")!=-1)
    {
        bDetected=1;
    }
    else
    {
        var nOffset=0;
        while((nOffset=PE.findString(nOffset,nSize-nOffset,"\\\\.\\"))!=-1)
        {
            nOffset+=4;
            if(PE.compare("'eusk2'",nOffset)
             ||PE.compare("'Skey-0'",nOffset)
             ||PE.compare("'SkeyDev'",nOffset))
            {
                bDetected=1;
                break;
            }
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
