If you cut the nails holding one of the corner studs to the bottom plate and the top plate with a Sawzall, you can use a flat bar (or a flat bar plus a wrecking bar) to pull the stud off the sheathing nails. Either re-use the stud, or buy a new stud, and install the stud with toenails as shown in the link I provided in Comment #51 (this link: Outside corner detail). http://m.youtu.be/ggLAUsiuI_o
For large jobs, professionals such as Dr. Energy Saver use two-part foam, which comes in larger containers. With 2-part spray foam, it's necessary to mix separate resin and catalyst compounds at the application nozzle. Combining these ingredients starts a chemical reaction that creates expanding foam. Contractors use small 2-part foam "kits" to air-seal an attic or to seal and insulate ductwork. To insulate an entire attic or wood-framed wall with spray foam, the resin and catalyst compounds are pumped to the application nozzle from 50-gallon drums in a specially equipped truck.