Currently that does NtSetValueKey() with the size of 2. That succeeds and later results in RegQueryValueEx() or RegEnumValue() to return only 2 byte length of the data and fill only 2 bytes in the requested data, even though the type is DWORD. That breaks things for apps if, e. g., they don't nullify output data before RegEnumValue(). We already have some tests around that for registry API behaviour, and I tested that separately just in case and it looks like registry API Windows behaviour: it is possible to create DWORD key with shorter data length, and then the shorted data length is returned. So fixing that in win32u where we set that data looks like the only correct place. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10280#note_131655