Hi
check out this PEFile C++ class by in4matics / AT4RE
Code:
http://www.at4re.com/f/showthread.php?t=2353
example
Code:
PEFile pe("1.exe");
pe.addSection(".at4re", 0x1000, false);
char* functions[] = { "MessageBoxA", "ShowWindow" };
pe.addImport("user32.dll", functions, 2);
pe.saveToFile("1+.exe");
download
Code:
www.at4re.com/tools/Releases/in4matics/m-PEFile.zip