Hello, please ignore this patch for now.
It seems that systemfontfileenumerator_GetCurrentFontFile uses RegEnumValueW in a way not supported on Windows - with giving NULL parameters for value and/or val_count [1].
When RegEnumValueW is called with proper value parameter the problem with not returning correct count would not happen already.
So, as far as I see, first all uses of RegEnumValue with NULL parameters for value or val_count need a fix.
Kind regards, Bernhard