I'm glad CloneVDI worked for you.
The repair calculations are relatively straightforward but I wouldn't recommend that anyone try it manually without experience (and there should be no need, now that CloneVDI automates it).
From the current VDI size you can calculate the number of 1MB blocks already allocated. Normally the header is 2MB (if the capacity is less than 256GB that is), so N-2 is the number to patch the nAllocatedBlocks header field with. Older VDIs had different rules, header blocks were multiples of 4K but image blocks were still 1MB.
Scanning the block map to find the end - you'll see where it transitions from 0x?????????? to solid 0x00000000. The address of the transition gives you the capacity of the drive. E.g. if we treat the block map as an array of DWORDs and M is the index of the first 0x00000000 after the end of the blockmap then the drive has a capacity of M MB. So get the user to create another VDI with the same capacity to serve as a repair patch.
That's usually all you need to know to reconstruct a usable header for a stand-alone VDI.
Note that these are hueristics, i.e. they usually work, but there is no guarantee. If the block map is trashed then nothing can be done. If the VDI is a snapshot then the prognosis is poor, because the block map patterns are different plus the UUID links are critical and can't be guessed without additional technical info which is often not available from someone who decided to use snapshots.