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

meta("compiler", "Zig");

function detect() {
    if (PE.compare("'MZ'78000100000004000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000780000000E1FBA0E00B409CD21B8014CCD21'This program cannot be run in DOS mode.\
0000'PE'0000")) {
        var rdataSection = PE.section[".rdata"];

        if (rdataSection && PE.isDeepScan()) {
            bDetected = (PE.findSignature(rdataSection.FileOffset, rdataSection.FileSize, "5A00490047005F00440045004200550047005F0043004F004C004F005200") !== -1); // ZIG_DEBUG_COLOR
        }
    }

    sLang = "Zig";

    return result();
}