// Detect It Easy: detection rule file format
// Author: hypn0 <hypn0@mail.ru>

init("protection", "Sentinel SuperPro dongle reference");

function detect(bShowType, bShowVersion, bShowOptions) {
    // I'm (adoxa) guessing these don't occur in the overlay, so don't search it (avoid wasting time on big installers).
    var nSize = PE.isOverlayPresent() ? PE.getOverlayOffset() : PE.getSize();

    if (nSize > 50000000)
        nSize = 50000000;

    // Originally searched for "RNBOsproInitialize", "RNBOsproGetKeyInfo" and
    // "RNBOsproGetVersion", but this should be enough.
    if (PE.findString(0, nSize, "RNBOspro") != -1) {
        bDetected = true;
    }

    return result(bShowType, bShowVersion, bShowOptions);
}