[PATCH 3/5] reg.exe: Add wchar/type conversion functions