Option 1, and the most likely:
Assuming you have the source code, extend it with whatever changes you have on your mind.
Option 2:
If you don't have the source code, you could try to use a decompiler to obtain the source, and then extend it.
--
If you are asking how to make an undetected injector, then I don't think you will find an answer here.