import re


def rule(event):
    if all(
        [
            event.deep_get("Provider_Name", default="") == "Service Control Manager",
            event.deep_get("EventID", default="") == 7045,
            any(
                [
                    re.match(
                        r"^[Cc]:\\\\[Pp]rogram[Dd]ata\\\\.{1,9}\\.exe",
                        event.deep_get("ImagePath", default=""),
                    ),
                    re.match(r"^[Cc]:\\\\.{1,9}\\.exe", event.deep_get("ImagePath", default="")),
                ]
            ),
        ]
    ):
        return True
    return False
