def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                    event.deep_get("OriginalFileName", default="") == "reg.exe",
                ]
            ),
            "add" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "Control Panel\\Desktop" in event.deep_get("CommandLine", default=""),
                    "CurrentVersion\\Policies\\ActiveDesktop"
                    in event.deep_get("CommandLine", default=""),
                    "CurrentVersion\\Policies\\System" in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    all(
                        [
                            "/v NoChangingWallpaper" in event.deep_get("CommandLine", default=""),
                            "/d 1" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "/v Wallpaper" in event.deep_get("CommandLine", default=""),
                            "/t REG_SZ" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    all(
                        [
                            "/v WallpaperStyle" in event.deep_get("CommandLine", default=""),
                            "/d 2" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
