// Detect It Easy: detection rule file format

init("compiler", "Nim");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (PE.section[".rdata"]) {
        var nOffset = PE.section[".rdata"].FileOffset;
        var nSize = PE.section[".rdata"].FileSize;

        if ((PE.findString(nOffset, nSize, "io.nim") != -1) || (PE.findString(nOffset, nSize, "fatal.nim") != -1)) {
            bDetected = true;
        }
    }

    _setLang("Nim", bDetected);
    return result(bShowType, bShowVersion, bShowOptions);
}
