// DIE's signature file

init("compiler","PureBasic");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if(!PE.isPEPlus())
    {
        if(PE.compareEP("68....0000680000000068......00E8......0083C40C6800000000E8......00A3"))
        {
            sVersion="4.X-6.X";
            bDetected=1;
        }
        else if(PE.compareEP("837C24080175..8B442404A3........E8"))
        {
            sVersion="4.X";
            bDetected=1;
        }
    }
    else
    {
        if(PE.compareEP("4883EC..49C7C0........4831D248B9................E8........4831C9E8"))
        {
            sVersion="4.X-6.X";
            bDetected=1;
        }
    }

    if(PE.isSectionNamePresent(".drectve"))
    {
            var sn=PE.getSectionNumber(".drectve");

            if(PE.isSignatureInSectionPresent(sn,"'pb_datapointer'"))
            {
                 sVersion="6.X";
                 sOptions="gcc";
                 bDetected=1;
            }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
