def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\sdbinst.exe"),
                    event.deep_get("OriginalFileName", default="") == "sdbinst.exe",
                ]
            ),
            not any(
                [
                    ".sdb" in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            any(
                                [
                                    event.deep_get("CommandLine", default="").endswith(" -c"),
                                    event.deep_get("CommandLine", default="").endswith(" -f"),
                                    event.deep_get("CommandLine", default="").endswith(" -mm"),
                                    event.deep_get("CommandLine", default="").endswith(" -t"),
                                ]
                            ),
                            " -m -bg" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("CommandLine", default="") == "",
                    event.deep_get("CommandLine", default="") == "",
                ]
            ),
        ]
    ):
        return True
    return False
