def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\certutil.exe"),
                    event.deep_get("OriginalFileName", default="") == "CertUtil.exe",
                ]
            ),
            any(
                [
                    "-encode" in event.deep_get("CommandLine", default=""),
                    "/encode" in event.deep_get("CommandLine", default=""),
                    "–encode" in event.deep_get("CommandLine", default=""),
                    "—encode" in event.deep_get("CommandLine", default=""),
                    "―encode" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    "\\AppData\\Roaming\\" in event.deep_get("CommandLine", default=""),
                    "\\Desktop\\" in event.deep_get("CommandLine", default=""),
                    "\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\PerfLogs\\" in event.deep_get("CommandLine", default=""),
                    "\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                    "\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "$Recycle.Bin" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
