// DIE's signature file
// Author: sendersu
/*
Java -> native code
*/

init("protector","Excelsior JET");

function detect(bShowType,bShowVersion,bShowOptions)
{
    var nFound=0;
    var nOffset;

    for(var i=0;i<=PE.nLastSection;i++)
    {
        nOffset=PE.section[i].FileOffset;
        sSection=PE.section[i].Name;
        if(sSection==".jidata")
        {
            if(PE.isSignaturePresent(nOffset,16,"'JIMP'"))
            {
                ++nFound;
            }
        }
        else if(sSection==".jedata")
        {
            if(PE.isSignaturePresent(nOffset,16,"'JEXP'"))
            {
                ++nFound;
            }
        }
        else if(sSection==".config")
        {
            ++nFound;
        }
        if(nFound==3)
        {
            bDetected=1;
            break;
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
