// Detect It Easy: detection rule file
// Author: hypn0 <hypn0@mail.ru>

meta("installer", "Tarma Installer");

function detect() {
    if (PE.compareOverlay("'tiz1'........78da")) {
        sOptions = "zlib";
        if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..e8")) {
            bDetected = true;
        } else if (PE.compareEP("60be........8dbe........5783cd..eb")) {
            bDetected = true;
        }
    }
    if (PE.isSectionNamePresent(".tsustub") && PE.isSectionNamePresent(".tsuarch")) {
        if (PE.compareEP("558bec81ec........535633db5766899d........895d..895d..ff15")) {
            sName = "Tarma InstallMate";
            sVersion = "9.0";
            bDetected = true;
        } else if (PE.compareEP("48895c24..48896c24..48897424..574881ec........66836424....33f633ffff15........488d8c24........8bd8ff15")) {
            sName = "Tarma InstallMate";
            sVersion = "9.0";
            sOptions = "x64";
            bDetected = true;
        }
    }

    return result();
}