def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\reg.exe"),
                    event.deep_get("OriginalFileName", default="") == "reg.exe",
                ]
            ),
            " import " in event.deep_get("CommandLine", default=""),
            any(
                [
                    "C:\\Users\\" in event.deep_get("CommandLine", default=""),
                    "%temp%" in event.deep_get("CommandLine", default=""),
                    "%tmp%" in event.deep_get("CommandLine", default=""),
                    "%appdata%" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "C:\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "C:\\ProgramData\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
