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

meta("format");

function detect() {
    if (Binary.isResource()) {
        var mapNames = {
            "1": "Resource Cursor",
            "2": "Windows Bitmap",
            "3": "Resource Icon",
            "4": "Resource Menu",
            "5": "Resource Dialog",
            "6": "Resource String Table",
            "7": "Font Directory",
            "8": "Font",
            "9": "Accelerators",
            "10": "RC Data",
            "11": "Message Table",
            "12": "Windows Cursor",
            "14": "Windows Icon",
            "15": "Name Table",
            "16": "Resource Version Info",
            "17": "DlgInclude",
            "23": "HTML",
            "24": "Manifest"
        };

        var sResName = mapNames[Binary.getScanID()];

        if (sResName) {
            sName = sResName;
            sOptions = "Resources";
            bDetected = true;
        }
    }

    return result();
}