// Detect It Easy: detection rule file
// Author: sendersu
// If errors pls contact sendersu on cracklab.team

meta("protection", "Wibu Codemeter");

function detect() {
    var nFound = 0;
    var nOffset;

    for (var i = 0; i <= PE.nLastSection; i++) {
        nOffset = PE.section[i].FileOffset;
        sSection = PE.section[i].Name;
        if (sSection == "__wibu00") {
            ++nFound;
        } else if (sSection == "__wibu01") {
            ++nFound;
        }
        // actually you may see many more __wibuXX sections,
        // we test just first two
        if (nFound == 2) {
            bDetected = true;
            break;
        }
    }

    return result();
}