def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("OriginalFileName", default="") == "REGSVR32.EXE",
                ]
            ),
            not any(
                [
                    any(
                        [
                            ".ax" in event.deep_get("CommandLine", default=""),
                            ".cpl" in event.deep_get("CommandLine", default=""),
                            ".dll" in event.deep_get("CommandLine", default=""),
                            ".ocx" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    event.deep_get("CommandLine", default="") == "",
                    event.deep_get("CommandLine", default="") == "",
                ]
            ),
            not any(
                [
                    ".ppl" in event.deep_get("CommandLine", default=""),
                    ".bav" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
