3 ms·
In the case of self-modifying code, I wonder if the techniques behind profile-guided optimisation could work for decompilation: https://en.m.wikipedia.org/wiki
by ZenoArrow 9y ago
In the case of self-modifying code, I wonder if the techniques behind profile-guided optimisation could work for decompilation:
https://en.m.wikipedia.org/wiki/Profile-guided_optimization https://en.m.wikipedia.org/wiki/Profile-guided_optimization
In other words, you create a JIT to run the executable, building a profile of the execution paths at runtime, and use that profile to guide a static decompilation process. That way it should be easier to identify the sections of self-modifying code, as well as model the behaviour of this code.
The only difficulty I can see is how much time it might take to map out all the code paths, but in principal it's possible, and there may be some efficient approaches for doing so.