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

meta("installer", "AutoPlay Media Studio");

function detect() {
    if (PE.compareOverlay("0b0bafaf0b0ba4")) {
        if (PE.compareEP("e8$$$$$$$$8bff558bec83ec..a1........8365....8365....5357bf........bb........3bc774..85c374..f7d0a3........eb")) {
            sVersion = "8.X";
            bDetected = true;
        }
        if (PE.compareEP("558bec6a..68........68........64a1........50648925........83ec..5356578965..ff15........33d28ad48915........8bc8")) {
            sVersion = "7.5.X";
            bDetected = true;
        }
    }

    if (bDetected) {
        var sRawVersion = PE.getFileVersion().replace(/\.0\.0$/, "");
        if (sRawVersion) {
            sVersion = sRawVersion;
        }
    }

    return result();
}