def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\regsvr32.exe"),
                    event.deep_get("OriginalFileName", default="") == "REGSVR32.EXE",
                ]
            ),
            any(
                [
                    ":\\ProgramData\\" in event.deep_get("CommandLine", default=""),
                    ":\\Temp\\" in event.deep_get("CommandLine", default=""),
                    ":\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Roaming\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
