0

I have no prior experience with .dll or .lib files and I need to see the code of a function in these files. I don't know which one to look at, searching around in stackoverflow led me to dumpbin, and I can use dumpbin /EXPORTS to see the headers and the functions are there. But how can I see the actual code? Can I do it just via the console or do I have to download a separate program?

P.S: I use Visual Studio and these are C++ functions.

Any help would be appreciated.

Revangelis
  • 105
  • 3
  • 14

1 Answers1

6

Seeing the source code from a compiled file such as a .lib or .dll is nearly impossible since it is basically a compiled file.

By compilated the source code you will lose some information as comments and most code structure. So your library file don't have those informations anymore. However a few options are still possible.

Obvious first, if your library come from an open-source project you may find the source code by asking our dearest friend.

Depending of what you really want to do with this library, tools such as dumpbin, objdump or else can give you more information on your existing file by reading and decoding some part of the file (headers, table name).

Eventually, you can try to transform your binary into something more readable like assembly or pseudo source code using something like a disassembler or a decompiler although its result will not be the original code source.

88877
  • 485
  • 3
  • 11