def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 4674,
            event.deep_get("ObjectType", default="") == "SC_MANAGER OBJECT",
            event.deep_get("ObjectName", default="") == "servicesactive",
            event.deep_get("PrivilegeList", default="") == "SeTakeOwnershipPrivilege",
            not all(
                [
                    event.deep_get("SubjectLogonId", default="") == "0x3e4",
                    event.deep_get("ProcessName", default="").endswith(
                        ":\\Windows\\System32\\services.exe"
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
