// Author: DosX
// E-Mail: collab@kay-software.ru
// GitHub: https://github.com/DosX-dev
// Telegram: @DosX_dev

// https://github.com/ZermangoLove/OneVM-Source-Code
init("protector", "OneVM");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (PE.isNET() &&
        PE.isNetObjectPresent("Koi") &&
        PE.isNetObjectPresent("OneVM.Runtime") &&
        PE.isSignatureInSectionPresent(0, "72 .. .. .. .. 73 .. .. .. .. 7A") && // throw
        PE.isSignatureInSectionPresent(0, "%% 00 %% %% %% %% %% %% %% %% 00 %%")) {
        bDetected = true;

        if (PE.isNetUStringPresent("OneVM V2 BETA")) {
            sVersion = "v2, beta";
        }
    }

    return result(bShowType, bShowVersion, bShowOptions);
}