Hi Piyush,
So we can help you further with your patches, could you let us know what your patches are supposed to do?
Is there a bug in Wine's reg.exe utililty you are trying to fix? Or are you trying to implement some kind of helper function to improve the code logic?
And could you tell us a litle bit about your programming experience as well?
Unfortunately, I don't have time for an extended reply today. But your code base seems rather out-of-date. For example, the function reg_printfW() has not been included in Wine for a long time.
I also noticed you are using git for Windows. That will make it difficult and inconvenient for you to test your own patches.
-- Hugh McMaster