// Detect It Easy: detection rule file

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

// https://github.com/syrex1013/rexcrypter-2
meta("cryptor", "ReXCrypter");

function detect() {
    if (PE.isNet()) {
        var netAssemblyName = PE.getNetAssemblyName();

        if (netAssemblyName.indexOf("ReXStub ") === 0) {
            var stubVersion = netAssemblyName.split(" ")[1];

            if (stubVersion && stubVersion.length < 5) {
                sVersion = "1.0-2.0, stub " + stubVersion;
            }

            bDetected = true;
        }

        if (!bDetected) {
            if (PE.isNetObjectPresent("GetConsoleWindow") && PE.isNetObjectPresent("LoadInMem")) {
                sVersion = "custom stub";
                bDetected = true;
            }
        }
    }

    return result();
}