def rule(event):
    if all(
        [
            event.deep_get("TargetFilename", default="").endswith(".evtx"),
            not any(
                [
                    event.deep_get("TargetFilename", default="").startswith(
                        "C:\\Windows\\System32\\winevt\\Logs\\"
                    ),
                    all(
                        [
                            event.deep_get("TargetFilename", default="").startswith(
                                "C:\\ProgramData\\Microsoft\\Windows\\Containers\\BaseImages\\"
                            ),
                            event.deep_get("TargetFilename", default="").endswith(
                                "\\Windows\\System32\\winevt\\Logs\\"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
