Novel way to backup and restore Windows EFI partition?

Hi,

When developing my EFI scsi dxe driver, it’s quite easy to corrupt the
windows EFI partition. I googled but can’t find a known good solution to
recover it.

I resorted to mount the drive under BSD, dd to save it. When bad thing
happens, dd it back. There got to be a better way??

Thanks,
Calvin