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

init("tool", "de4dot");

function detect(bShowType, bShowVersion, bShowOptions) {
    if (PE.isNET()) {
        if (PE.isNetObjectPresent("smethod_0") && (
                PE.isNetObjectPresent("GClass0") ||
                (PE.isNetObjectPresent("Class0") && PE.isNetObjectPresent("Class1"))
            )) {
            bDetected = true;
            sOptions = "deobfuscated";
        }
    }

    return result(bShowType, bShowVersion, bShowOptions);
}