This tutorial should explain how to add imports to a PE file. I hope I can explain it understandable without forgetting important details. The tutorial structure is following :
Part one: some theoretical words about adding imports manually
Part two: we'll have a look at our simple file I've coded for this tut, then we'll add imports to it.
Bonus Part: we'll inject some code which uses our new imports