So you want the good news or the ....nevermind...I'll just give you the bad news.
The siding is brick, with gaps in the joints that are letting in moisture..with a foam backing board at the interior of this space.
Basically what you have is a couple of issues.
1. The window area was poorly sealed around the exterior and let water in.
2. you found holes in the mortar joints and sealed them with foam. Those holes are for air movement to dry the backside of brick when it gets wet. Brick can absorb about a pint of water, and is porous material. When you seal the holes you stop the convection of air from the bottom holes to the soffit roof line.There should be a 1 inch air space from the brick to the board...all the way up and sideways. And there needs to be a continuos moisture barrier on the foamboard...so it doesn't get wet.
The board behind the brick is not for brick siding applications.
Sorry to be the guy, but you really should have a good reputable mason come buy and give you a look, then tell us and we can help.
Some pictures would help too.
I'm sure the guy's will be by to put in 2 more cents...or more...to keep the meter runnin.