how to edit or see the source code for dll files

  1. It’s sort of difficult. I mean you can look at the file with a hex editor, but it’s not going to look nice. However, you can use 3rd party tools in order to get as much info you can about the .dll:
    • Dependency Walker – useful to get the .dlls that your .dll depends on (and the functions that it need from there), exported functions, …
    • PE Explorer – a nice tool (I’m not saying it’s the best) that lists lots of info about the dll (sections, resources, …) and it also has a disassembler (this reverse engineers the .dll and displays it in the form of assembly code). If you understand the assembly code you can then modify it (by modifying the corresponding bytes in your .dll), but that’s for experts only. The problem is that it only handles 32bit (x86.dlls, and the latest version is from 2009 🙁
  2. Most likely it was written in C. The tools I listed can tell you more. You can also look with a hex editor at the .dll, inside it there might be references to source files

If the .dll has dependencies in form of msvcr###(d).dll (# sign is a placeholder for a digit) or vcruntime###(d).dll, then it’s C, if it also has msvcp###(d).dll, then it’s C++ (created with VStudio).

Leave a Comment