def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\msdt.exe"),
            "\\WINDOWS\\diagnostics\\index\\PCWDiagnostic.xml"
            in event.deep_get("CommandLine", default=""),
            any(
                [
                    " -af " in event.deep_get("CommandLine", default=""),
                    " /af " in event.deep_get("CommandLine", default=""),
                    " –af " in event.deep_get("CommandLine", default=""),
                    " —af " in event.deep_get("CommandLine", default=""),
                    " ―af " in event.deep_get("CommandLine", default=""),
                ]
            ),
            not event.deep_get("ParentImage", default="").endswith("\\pcwrun.exe"),
        ]
    ):
        return True
    return False
