def rule(event):
    if all(
        [
            "Import-Certificate" in event.deep_get("CommandLine", default=""),
            " -FilePath " in event.deep_get("CommandLine", default=""),
            "Cert:\\LocalMachine\\Root" in event.deep_get("CommandLine", default=""),
            any(
                [
                    "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\TEMP\\" in event.deep_get("CommandLine", default=""),
                    "\\Desktop\\" in event.deep_get("CommandLine", default=""),
                    "\\Downloads\\" in event.deep_get("CommandLine", default=""),
                    "\\Perflogs\\" in event.deep_get("CommandLine", default=""),
                    ":\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
