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

init("format","");

function detect(bShowType,bShowVersion,bShowOptions)
{
    var TrueTypeTags = [];
    TrueTypeTags['BASE'] =
    TrueTypeTags['cmap'] =
    TrueTypeTags['DSIG'] =
    TrueTypeTags['EBDT'] =
    TrueTypeTags['Feat'] =
    TrueTypeTags['FFTM'] =
    TrueTypeTags['GDEF'] =
    TrueTypeTags['GPOS'] =
    TrueTypeTags['GSUB'] =
    TrueTypeTags['LTSH'] =
    TrueTypeTags['OS/2'] = 1;

    if(Binary.compare("950412de00000000")||Binary.compare("de12049500000000"))
    {
        sName="GNU Gettext Machine Object (.MO)";
        bDetected=1;
    }
    else if(TrueTypeTags[Binary.getString(0xC,4)])
    {
        sName="TrueType font (.TTF)";
        bDetected=1;
    }
    else if(Binary.compare("'{\\rtf1\\'"))
    {
        sName="Rich Text Format (.RTF)";
        bDetected=1;
    }
    else if(Binary.compare("f702018392c01c3b"))
    {
        sName="Device Independent Document (.DVI)";
        bDetected=1;
    }
    else if(Binary.compare("03......................00000000")||
            Binary.compare("f5......................00000000"))
    {
        sName="DBase Database (.DBF)";
        bDetected=1;
    }
    else if(Binary.compare("31be000000ab0000")||Binary.compare("32be000000ab0000"))
    {
        sName="Windows Write document (.WRI)";
        bDetected=1;
    }
    else if(Binary.compare("'MICROSOFT PIFEX'0087010000", 0x171))
    {
        sName="Microsoft Program Information (.PIF)";
        bDetected=1;
    }
    else if(Binary.compare("00010000'Standard Jet DB'00"))
    {
        sName="Microsoft Access database (.MDB)";
        bDetected=1;
    }
    else if(Binary.compare("4c0000000114020000000000c000000000000046"))
    {
        sName="Windows Shortcut (.LNK)";
        bDetected=1;
    }
    else if(Binary.compare("'Zinc Data File Version'"))
    {
        sName="Zinc Data (.DAT)";
        bDetected=1;
    }
    else if(Binary.compare("00010000'Jet System DB  '00"))
    {
        sName="Microsoft Access Workgroup Information (.MDW)";
        bDetected=1;
    }
    else if(Binary.compare("dca5..00..................00000000")||
            Binary.compare("eca5c100..................00000000"))
    {
        sName="Microsoft Word 2 document";
        bDetected=1;
    }
    else if(Binary.compare("'OTTO'................'CFF '"))
    {
        sName="OpenType - CFF compact font (.OTF)";
        bDetected=1;
    }
    else if(Binary.compare("3cb86418caef9c95"))
    {
        sName="Qt Message (.QM)";
        bDetected=1;
    }
    else if(Binary.compare("'SIB file: TsiLang binary translation data'"))
    {
        sName="TsiLang binary translation data (.SIB)";
        bDetected=1;
    }
    else if(Binary.compare("......00..........000200")&&Binary.compare("00'LP'", 0x21))
    {
        sName="Embedded OpenType font (.EOT)";
        bDetected=1;
    }
    else if(Binary.compare("1b'Lua'..000104040408"))
    {
        sName="Lua bytecode (.LUAC)";
        bDetected=1;
    }
    else if(Binary.compare("d4c3b2a1020004"))
    {
        sName="TCPDUMP's style capture (.ACP/PCAP)";
        bDetected=1;
    }

    return result(bShowType,bShowVersion,bShowOptions);
}
