def rule(event):
    if all(
        [
            "\\System\\CurrentControlSet\\Control\\Session Manager"
            in event.deep_get("TargetObject", default=""),
            any(
                [
                    "\\SetupExecute" in event.deep_get("TargetObject", default=""),
                    "\\S0InitialCommand" in event.deep_get("TargetObject", default=""),
                    "\\KnownDlls" in event.deep_get("TargetObject", default=""),
                    "\\Execute" in event.deep_get("TargetObject", default=""),
                    "\\BootExecute" in event.deep_get("TargetObject", default=""),
                    "\\AppCertDlls" in event.deep_get("TargetObject", default=""),
                ]
            ),
            not event.deep_get("Details", default="") == "(Empty)",
        ]
    ):
        return True
    return False
