Your question is pretty vague, so I can give you only a vague answer: try Mono Cecil. It allows you to inspect IL in an existing assembly and modify it, which sounds close to what you’re asking.
1
solved System.Reflection.Emit::DynamicMethod: Is there a tool to have IL code generated from existing assembly?