The only hassle is the broken auto-wb
Reenter CR2 white balance back into a dual iso dng can be done quite easily. Every CR2 file stores WB RGGB Levels As Shot. For instance:
WB RGGB Levels As Shot : 1739 1024 1024 19311024/1739=0,588844163312248
1024/1931=0,528107271789582
Then inject the tag with exiftool.
exiftool "-AsShotNeutral=0,588844163312248 1 0,528107271789582" dualiso.dng
I don,t know how to do this in C but since the CR2 is always there in front of you I don,t see why this can,t be done inside cr2hdr.
Calculations coming from Chmee and a lot of trial and error from my part when building scripts.