def rule(event):
    if all(
        [
            event.deep_get("OriginalFileName", default="") == "NirCmd.exe",
            not any(
                [
                    event.deep_get("Image", default="").endswith("\\nircmd.exe"),
                    event.deep_get("Image", default="").endswith("\\nircmdc.exe"),
                ]
            ),
        ]
    ):
        return True
    return False
