title: Add an entry to the import table of PE
body: <p>I'm looking for a command line program to add an entry to the import table of a PE file.
  My goal is to add a new imported function from an external DLL to my EXE, and then with ollydbg insert new code using code caves. The new code will use the newly imported function.</p>
  
  <p>Acctualy I've achived my goal, but to add a new entry to the import table I used <a href="http://www.cgsoftlabs.ro/studpe.html" rel="nofollow">Stud_PE</a>, which is a GUI application and I want to automate this part of the process.</p>
  
  <p>I'd consider programmatically solutions, but I'm affraid the PE structure is too complex for me to learn and explore in the time frame I have. Moreover if an implementation is already exists, it would be a shame not to use it. :-)</p>