def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                    event.deep_get("OriginalFileName", default="") == "reg.exe",
                ]
            ),
            "query" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "currentVersion\\windows" in event.deep_get("CommandLine", default=""),
                    "winlogon\\" in event.deep_get("CommandLine", default=""),
                    "currentVersion\\shellServiceObjectDelayLoad"
                    in event.deep_get("CommandLine", default=""),
                    "currentVersion\\run" in event.deep_get("CommandLine", default=""),
                    "currentVersion\\policies\\explorer\\run"
                    in event.deep_get("CommandLine", default=""),
                    "currentcontrolset\\services" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
