// DIE's signature file
// Author: KDSS-Research

init("GameEngine", "GoldSrc");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (!PE.isSectionNamePresent(".data")) {
        return null;
    }
    var n1 = PE.findString(PE.section[".data"].FileOffset, PE.section[".data"].FileSize, "VENGINE_")
    var n2 = PE.findString(PE.section[".data"].FileOffset, PE.section[".data"].FileSize, "VFileSystem")
    var n3 = PE.findString(PE.section[".data"].FileOffset, PE.section[".data"].FileSize, "_API_VERSION")
    if (n1 != -1 && n2 != -1 && n3 != -1) {
        bDetected = true;
        sOptions = "API v" + PE.getString(n3 + 12, n3 + 3);

    }
    return result(bShowType, bShowVersion, bShowOptions);
}