I have to spy on a C++ DLL. I would like to insert trace calls inside the assembly code, e.g modifying the code to put a small code that would trace some variable into a text file. I do not have access to the runtime of the machine where the dll is used, I only can access the storage, so I cannot spy dynamically using IDA debug, I must put some files with spy code inside and then start the machine, run it then shutdown the machine and get back the trace files eventually created in the storage.
Is there some way to automate that spy code insertion using IDA Pro for example or a similar tool. I have decompiled the Dll using Hex-Ray and, yes I could modify the C source code and plant the functions there but unfortunately Hex-Ray cannot reverse all the code , only like 90%, and then I cannot use that way.