I'm reversing an application written in C. I have a certain function that I want to log runtime, without pausing/stopping the application.
My desired values of that function are:
[ESP + 4]which is the length of a buffer
[ESP + 8]which is a pointer to a string buffer
Then I want to read the buffer and write it into a file.
First thing I was told to use is Immunity's
LogBpHook, which worked great, but it stops the application and it becomes really slow due to this, because it's a frequently called function.
Then I tried to setup
FastLogHook which sounds more like what I'm after. It injects a log stub and stores encountered values, but as far as I know it can not perform further memory readings like the one I described above anyway (if it can please tell me). Also it constantly crashed my application so it's out of the question.
So I left with the idea of injecting a customized code stub that would take care of further readings and logging of the values into a file. Is there any tool that could do this, or I have to manually write+inject this assembly?
How can I log function parameters runtime, without stopping the application?