def rule(event):
    if any(
        [
            all(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\reg.exe"),
                            event.deep_get("OriginalFileName", default="") == "reg.exe",
                        ]
                    ),
                    "add" in event.deep_get("CommandLine", default=""),
                    "CurrentVersion\\Control Panel\\CPLs"
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("CommandLine", default="").endswith(".cpl"),
                    not any(
                        [
                            any(
                                [
                                    "\\System32\\" in event.deep_get("CommandLine", default=""),
                                    "%System%" in event.deep_get("CommandLine", default=""),
                                    "|C:\\Windows\\system32|"
                                    in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    "regsvr32 " in event.deep_get("CommandLine", default=""),
                                    " /s " in event.deep_get("CommandLine", default=""),
                                    "igfxCPL.cpl" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
