def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\AnyDesk.exe"),
                    event.deep_get("Image", default="").endswith("\\AnyDeskMSI.exe"),
                ]
            ),
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith(".dll"),
                    event.deep_get("TargetFilename", default="").endswith(".exe"),
                ]
            ),
            not event.deep_get("TargetFilename", default="").endswith("\\gcapi.dll"),
        ]
    ):
        return True
    return False
