Hacker News new | ask | show | jobs
by imtringued 1897 days ago
That would require you know which C++ compiler and which exact version the code was compiled with. Your decompiler would also need to be built for this specific version of the C++ compiler to allow for round tripping. After you have done that, the risk of the patch being unnecessarily large still exists and now you have to mess around with the source code hoping you find a way to rewrite it such that only one byte has changed. That's a lot of effort compared to just changing the instructions directly which for an inexperienced engineer merely requires frequent lookup of a reference sheet.

There is absolutely no need to do any of that, even in cases where you write a lot of new code yourself. 99% of the time it is enough to find the code location, insert a call to a DLL (which can be created in any language of your choice) you injected and be done with it.