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

// https://github.com/nexe/nexe
meta("packer", "nexe");

function detect() {
    if (!PE.isExportFunctionPresent("napi_wrap"))
        return;

    // Has overlay at all
    bDetected = PE.isOverlayPresent() && PE.getOverlaySize() >= 0x100 && PE.findString(PE.section[1].FileOffset, PE.section[1].FileSize, "nexe~~sentinel") !== -1;

    sLang = "JavaScript";

    return result();
}