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

meta("sfx", "ARJSFX");

function detect() {
    if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf76..2bcffcf3aa595f64678b16....8b42..a3")) {
        if (PE.compareOverlay("c0ab........60ea")) {
            sName += "32";
            bDetected = true;
        }
    } else if (PE.compareEP("64a1........558bec6a..68........68........50648925........83ec..5356578965..ff15")) {
        if (PE.compareOverlay("60ea")) {
            bDetected = true;
        } else {
            for (var i = 0; i < PE.resource.length; i++) {
                if (PE.resource[i].Type == 730) { // ARJDATA
                    bDetected = true;
                    break;
                }
            }
        }
    } else if (PE.compareEP("558bec83c4..e8$$$$$$$$e8........6a..e8........8905........e8........8905")) {
        for (var i = 0; i < PE.resource.length && !bDetected; i++) {
            if (PE.resource[i].Type == 1001) {
                if (PE.compare("60ea", PE.getResourceOffsetByNumber(i))) {
                    bDetected = true;
                }
            }
        }
    }

    return result();
}
