How to reverse a DLL into C++ code?

早过忘川 提交于 2019-12-21 01:20:07

问题


I know it's impossible to reverse a dll into a c++ code so I would like to collect as much as possible details from it. It's not my dll, so I don't have the source code of course. Which program should I use?


回答1:


Well, if you are skilled you can disassemble the DLL and understand all of its functions. This takes a substantial amount of time, but if you do that you can reverse it back to source by hand.

Otherwise, you can start by using a tool like Dependency Walker to get the DLLs and functions it depends on, and the functions it exports. From there you can find functions that interest you, and use a disassembler like IDA to see what they do.




回答2:


You can see the list of exported functions by using the dumpbin tool. If C++ functions are exported, you might be able to infer parameters by the name mangling.

You can extract all the resources from the DLL by just "opening" it as a file for resource viewing in Visual Studio. If the DLL is a COM based DLL, there's a small chance the Type Library is embedded as a resource inside it. And if you have the Type Library, you can #import it to reconstruct the header files for the public interfaces.

That's about as good as it gets.




回答3:


You need a PE file viewer. This will tell you the exports from the DLL and you can get the data in the .text section to see the machine code.



来源:https://stackoverflow.com/questions/15148950/how-to-reverse-a-dll-into-c-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!