def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\squirrel.exe"),
                    event.deep_get("Image", default="").endswith("\\update.exe"),
                ]
            ),
            any(
                [
                    "--processStart" in event.deep_get("CommandLine", default=""),
                    "--processStartAndWait" in event.deep_get("CommandLine", default=""),
                    "--createShortcut" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not any(
                [
                    all(
                        [
                            ":\\Users\\" in event.deep_get("CommandLine", default=""),
                            "\\AppData\\Local\\Discord\\Update.exe"
                            in event.deep_get("CommandLine", default=""),
                            "Discord.exe" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "--createShortcut" in event.deep_get("CommandLine", default=""),
                                    "--processStart" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            ":\\Users\\" in event.deep_get("CommandLine", default=""),
                            "\\AppData\\Local\\GitHubDesktop\\Update.exe"
                            in event.deep_get("CommandLine", default=""),
                            "GitHubDesktop.exe" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "--createShortcut" in event.deep_get("CommandLine", default=""),
                                    "--processStartAndWait"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            ":\\Users\\" in event.deep_get("CommandLine", default=""),
                            "\\AppData\\Local\\Microsoft\\Teams\\Update.exe"
                            in event.deep_get("CommandLine", default=""),
                            "Teams.exe" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "--processStart" in event.deep_get("CommandLine", default=""),
                                    "--createShortcut" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            ":\\Users\\" in event.deep_get("CommandLine", default=""),
                            "\\AppData\\Local\\yammerdesktop\\Update.exe"
                            in event.deep_get("CommandLine", default=""),
                            "Yammer.exe" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "--processStart" in event.deep_get("CommandLine", default=""),
                                    "--createShortcut" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
