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

// https://en.wikipedia.org/wiki/WinRAR
meta("sfx", "RAR-SFX");

function detect() {
    if (LX.compareOverlay("07'sfx.EXE'")) {
        if (LX.compareEP("8b4424..a3........5868........50e8........e9")) { // BCC for OS/2
            sVersion = "2.x";
            bDetected = true;
        } else if (LX.compareEP("fcb8........ba........0a6a..68........f601..036a..9a")) {
            sVersion = "1.5x";
            bDetected = true;
        }
    }

    return result();
}