def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 5140,
            event.deep_get("ShareName", default="") == "Admin$",
            not event.deep_get("SubjectUserName", default="").endswith("$"),
        ]
    ):
        return True
    return False
