def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\calc.exe"),
                            event.deep_get("Image", default="").endswith("\\certutil.exe"),
                            event.deep_get("Image", default="").endswith("\\cmstp.exe"),
                            event.deep_get("Image", default="").endswith("\\cscript.exe"),
                            event.deep_get("Image", default="").endswith("\\installutil.exe"),
                            event.deep_get("Image", default="").endswith("\\mshta.exe"),
                            event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("Image", default="").endswith("\\rundll32.exe"),
                            event.deep_get("Image", default="").endswith("\\wscript.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in [
                        "CALC.EXE",
                        "CertUtil.exe",
                        "CMSTP.EXE",
                        "cscript.exe",
                        "installutil.exe",
                        "MSHTA.EXE",
                        "REGSVR32.EXE",
                        "RUNDLL32.EXE",
                        "wscript.exe",
                    ],
                ]
            ),
            not any(
                [
                    "C:\\" in event.deep_get("CurrentDirectory", default=""),
                    event.deep_get("CurrentDirectory", default="") == "",
                    event.deep_get("CurrentDirectory", default="") == "",
                ]
            ),
        ]
    ):
        return True
    return False
