// DIE's signature file
// Author: hypn0 <hypn0@mail.ru>

init("installer", "WinRAR Installer");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (PE.compareEP("e8$$$$$$$$558bec83c4..b8........53")) {
        if (PE.compareOverlay("'***messages***'")) {
            bDetected = true;
        }
    } else if (PE.compareEP("a1........c1e0..a3........575133c0bf........b9........3bcf76..2bcffcf3aa595f")) {
        if (PE.compareOverlay("'Rar!'1a")) {
            bDetected = true;
        }
    }
    if (PE.compareOverlay("fffe2a002a002a006d0065007300730061006700650073002a002a002a00")) {
        sOptions = "Unicode";
        if (PE.compareEP("4883ec..e8$$$$$$$$48895c24..55488bec4883ec..488365....48bb................488b05........483bc375")) {
            sVersion = "5.x";
            bDetected = true;
        } else if (PE.compareEP("e8$$$$$$$$558bec83ec..8365....8365....a1........5657bf........be........3bc7")) {
            sVersion = "5.x";
            bDetected = true;
        }
    }

    return result(bShowType, bShowVersion, bShowOptions);
}