// Detect It Easy: detection rule file

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

// https://twinbasic.com/
meta("compiler", "twinBASIC");

function detect() {
    if (PE.isNet()) return; // Doesn't support .NET

    if (!PE.isRichSignaturePresent()) {
        if (PE.isImportPositionHashPresent(0, 0xc28f4fe3) && PE.isImportPositionHashPresent(1, 0x3f8b3302) ||
            PE.isResourceNamePresent("TWINBASIC.ICO")) {
            bDetected = true;

            if (PE.is64()) {
                sVersion = "Professional/Ultimate";
            }
        }
    }

    sLang = "twinBASIC";

    return result();
}