Anyone know of a good library for editing PE files? I tried PeLib but it is very basic and you pretty much have to do everything anyways.
A:
As an alternative, there is libbfd (the backend behind GCC and others): Documentation and download
I took a quick look at the overview of PeLib, but it doesn't appear to be worse in accessibility. I don't know what you expect of such a library, but most object format libraries have no clue as to what you expect from them, and thus offer little specific access. In other words: such a library only saves you from parsing the object format.
If you want to do something specific, it helps if we know about it.
Combuster
2010-01-26 12:42:00
I want to add an import to a pe.
2010-01-26 13:01:06
Just a hunch, but if you are compiling the input binary yourself, you could probably use the /INCLUDE argument to force linkage to a DLL function, and achieve the wanted effect without postprocessing altogether: http://msdn.microsoft.com/en-us/library/aa278363%28VS.60%29.aspx
Combuster
2010-01-26 14:32:13
I need to add the import to an existing PE file...
2010-01-26 14:42:13
Well then, I'm out of easy solutions; You may still want to take a look at the initial answer though.
Combuster
2010-01-26 16:29:19