def rule(event):
    if all(
        [
            any(
                [
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\schtasks.exe"),
                                    event.deep_get("OriginalFileName", default="")
                                    == "schtasks.exe",
                                ]
                            ),
                            "create" in event.deep_get("CommandLine", default=""),
                            "ONSTART" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            any(
                                [
                                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                                    event.deep_get("OriginalFileName", default="") == "reg.exe",
                                ]
                            ),
                            "add" in event.deep_get("CommandLine", default=""),
                            "\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
                            in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
            "rundll32" in event.deep_get("CommandLine", default=""),
            ".wll" in event.deep_get("CommandLine", default=""),
            "#1" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "Sens Api" in event.deep_get("CommandLine", default=""),
                    "OneDrive" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
