Excellent documentation on the Registry file format: https://github.com/msuhanov/regf/blob/master/Windows%20registry%20file%20format%20specification.md

@williballenthin