def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\bitsadmin.exe"),
                    event.deep_get("OriginalFileName", default="") == "bitsadmin.exe",
                ]
            ),
            any(
                [
                    all(
                        [
                            "/SetNotifyCmdLine" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "%COMSPEC%" in event.deep_get("CommandLine", default=""),
                                    "cmd.exe" in event.deep_get("CommandLine", default=""),
                                    "regsvr32.exe" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    all(
                        [
                            "/Addfile" in event.deep_get("CommandLine", default=""),
                            any(
                                [
                                    "http:" in event.deep_get("CommandLine", default=""),
                                    "https:" in event.deep_get("CommandLine", default=""),
                                    "ftp:" in event.deep_get("CommandLine", default=""),
                                    "ftps:" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
