https://bugs.winehq.org/show_bug.cgi?id=51998
The first patch should make no functional change, just move the block out to a helper function. I assume changing to L"" literals is expected?
The second patch handles ImagePaths starting with `System32` similar like it is already done for `\SystemRoot\` and adds the windows directory in front of it.
-- v2: ntoskrnl.exe: Support ImagePaths just starting with System32. ntoskrnl.exe: Add helper to create absolute ImagePath.