Modifying a stock muffler is very hard. You can sometimes re-use the canister, but if you want an in-cowl muffler usually you will need to build one (steel and weld/braze, aluminum and TIG, brass and silver-solder ... not the best). Or you will need to buy one. J-Tec radiowave and bisson make a number of these. J-Tec has a mufflers for a lot of different engines.
http://www.jtecrc.com/
Also, Jet Engineering has a in-cowl that's best for radial applications.
It all depends on your use, engine size and how it's mounted. $50-70 for an in-cowl that is made specifically for your engine with the right amount of back-pressure, heat disapation and pressure tap will make sure that you don't loose an aircraft because of a poor performing muffler.
JM2C