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).
Where To Buy Foam Spray Insulation
How Much For Spray Foam Insulation In Attic
Heat which is created elsewhere that is transported by means of a fluid, such as water or in our case air. Spray foam insulation's most important attribute is the ability to air seal creating a custom airtight envelope within the building structure. The added benefit to air sealing is the ability to block convective heat transfer from interior to exterior during heating months and vice versa during cooling months, as the heat cannot escape through gaps in the buildings envelope without the aid of air movement from infiltration as a means of transport.
Note: The practice of foam insulating the attic has raised eyebrows in the building industry because "standard" roofing techniques call for the attic to be ventilated; however, in a vented attic situation it will become approximately 130 degrees in the summer. There's no reason for an air-conditioning and vent-ductwork to have to work in that type of severe conditions. By applying Icynene right on the underside of the roof deck, the severe temperatures no longer exist in the attic. In short, the attic is now a "conditioned" space of the house that is just as comfortable as any other room in the home. This is called a "Compact Roof", which means you can frame right up against it. The one drawback of using expanded foam on the inside of the roof is that this will cause the temperature of the shingles to rise, but how much is not yet known. And how much damage a rise in temperatures could cause is debatable.
Roof Spray Foam Insulation