// Detect It Easy: detection rule file

// Author: DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

// https://euroassembler.eu/
meta("compiler", "EuroASM");

function detect() {
    if (!PE.isNet() && !PE.isTLSPresent() && !PE.isRichSignaturePresent() &&
        PE.getMajorLinkerVersion() === 1 && PE.getMinorLinkerVersion() === 0 &&
        PE.getImageOptionalHeader("CheckSum") === 0) {
        if (PE.compare("89000100000004002100FFFF05000002618A00000000400000000000000000000000000000000000000000000000000000000000000000000000900000000E1FBA0E00B409CD21B8084CCD21", 2)) {
            sVersion = "20180508-20190402";
            bDetected = true;
        } else if (PE.compare("89000100000004002100FFFF05000002BFA200000000400000000000000000000000000000000000000000000000000000000000000000000000900000000E1FBA0E00B409CD21B8084CCD21", 2)) {
            sVersion = "20240831+";
            bDetected = true;
        } else if (PE.compare("'This program was launched in DOS but it requires Windows.'", 0x4e)) {
            bDetected = true;
        }
    }

    sLang = "ASMx" + (PE.is64() ? "64" : "86");

    return result();
}