def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\addinutil.exe"),
                    event.deep_get("OriginalFileName", default="") == "AddInUtil.exe",
                ]
            ),
            any(
                [
                    all(
                        [
                            any(
                                [
                                    "-AddInRoot:" in event.deep_get("CommandLine", default=""),
                                    "-PipelineRoot:" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "\\AppData\\Local\\Temp\\"
                                    in event.deep_get("CommandLine", default=""),
                                    "\\Desktop\\" in event.deep_get("CommandLine", default=""),
                                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                                    "\\Users\\Public\\"
                                    in event.deep_get("CommandLine", default=""),
                                    "\\Windows\\Temp\\"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    "-AddInRoot:." in event.deep_get("CommandLine", default=""),
                                    '-AddInRoot:"."' in event.deep_get("CommandLine", default=""),
                                    "-PipelineRoot:." in event.deep_get("CommandLine", default=""),
                                    '-PipelineRoot:"."'
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            any(
                                [
                                    "\\AppData\\Local\\Temp\\"
                                    in event.deep_get("CurrentDirectory", default=""),
                                    "\\Desktop\\" in event.deep_get("CurrentDirectory", default=""),
                                    "\\Downloads\\"
                                    in event.deep_get("CurrentDirectory", default=""),
                                    "\\Users\\Public\\"
                                    in event.deep_get("CurrentDirectory", default=""),
                                    "\\Windows\\Temp\\"
                                    in event.deep_get("CurrentDirectory", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
