// Detect It Easy: detection rule file

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

// https://www.radgametools.com/oodle.htm
meta("library", "Oodle Compression");

function detect() {
    var oodleLibrary = PE.isLibraryPresentExp(/^oo2core_\d{1,2}_win/i);

    if (oodleLibrary) {
        var version = String(oodleLibrary).split("_")[1];

        if (version) {
            sVersion = version;
        }

        bDetected = true;
    } else if (PE.isExportFunctionPresentExp(/^OodleLZ/)) {
        sOptions = "static"; // EAT
        bDetected = true;
    }

    return result();
}