deresz/funcap — pull request #10 by JazzCore (2014-02-26 17:55:42+00:00)
Title: Fix not hooked calls in hookFunc()

I've stumbled upon a bug when ``hookFunc()`` sometimes does not hook all calls in function. This happens only when function is "chunked" across segment.

Before the change, there was a single call to ``Heads`` with a start and end taken from ``get_func()``. Thing is, when function is chunked, ``get_func`` returns only first chunk and skips all other chunks. So we need to call ``Heads`` on all function chunks.

I've only fixed it for x86, I guess there may be similar bugs in other parts of code