On Windows you have to learn the PE file format, on *nix the ELF format.
Yes it is possible. Best way is to isolate the particular code into its own section, with plenty if padding space to insert code without realigning everything.
MosaicFuneral
Posting Virtuoso
1,691 posts since Nov 2008
Reputation Points: 888
Solved Threads: 116