// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>

meta("protector", "tElock");

function detect() {
    if (PE.compareEP("668BC08D2424EB01EB60EB01EB9CE8000000005E83C6508BFE68")) {
        sVersion = "0.41X";
        bDetected = true;
    } else if (PE.compareEP("C1EE00668BC9EB01EB60EB01EB9CE8000000005E83C6")) {
        switch (PE.readByte(PE.getEntryPointOffset() + 22)) {
            case 0x52: sVersion = "0.4X"; break;
            case 0x5E: sVersion = "0.5X"; break;
        }
        bDetected = true;
    } else if (PE.compareEP("E90000000060E8000000005883C008")) {
        sVersion = "0.60";
        bDetected = true;
    } else if (PE.compareEP("60E8....0000C383")) {
        switch (PE.readWord(PE.getEntryPointOffset() + 2)) {
            case 0x10BD: sVersion = "0.70"; break;
            case 0x10ED: sVersion = "0.71"; break;
            case 0x1144: sVersion = "0.71b2"; break;
            case 0x1148: sVersion = "0.71b7"; break;
            case 0x11F9: sVersion = "0.80"; break;
            default: sVersion = "0.7X-0.84";
        }
        bDetected = true;
    } else if (PE.compareEP("60E802000000CD20E8000000005E2BC9587402")) {
        sVersion = "0.85f";
        bDetected = true;
    } else if (PE.compareEP("....E802000000E800E8000000005E2B")) {
        sVersion = "0.90";
        bDetected = true;
    } else if (PE.compareEP("E9....FFFF")) {
        if (PE.compareEP("E97EE9")) {
            sVersion = "0.92a";
            bDetected = true;
        } else if (PE.compareEP("E9D5E4")) {
            sVersion = "0.95";
            bDetected = true;
        } else if (PE.compareEP("E959E4")) {
            sVersion = "0.96";
            bDetected = true;
        } else if (PE.compareEP("E925E4")) {
            sVersion = "0.98b1";
            bDetected = true;
        } else if (PE.compareEP("E91BE4")) {
            sVersion = "0.98b2";
            bDetected = true;
        } else if (PE.compareEP("E999D7")) {
            sVersion = "0.98 Special Build";
            bDetected = true;
        } else if (PE.compareEP("E95EDF")) {
            sVersion = "0.99";
            bDetected = true;
        } else if (PE.compareEP("E93FDF")) {
            sVersion = "0.99c";
            bDetected = true;
        } else if (PE.compareEP("E9E5E2")) {
            sVersion = "1.00";
            bDetected = true;
        }
    } else if (PE.compareEP("668bc08d2424609ce8000000005dd14d")) {
        sVersion = "0.35";
        bDetected = true;
    }

    return result();
}
