Stock prices of major Washington area firms continued to advance in the second quarter of 1979, although an investors' malaise gripped most of Wall Street.

As measured by Johnston, Lemon & Co.'s index of 30 Washington corporations the second-quarter gain was not as great as for the first three months of the year. Still, the local stock index set new highs continually, and this streak extended throughout July as area issues on average consistently outperformed barometers of national stocks.

At the end of June, the Johnston, Lemon index stood at 016,357, up 5.4 percent for the recent quarter. In the same period, the Dow Jones average of 30 Industrial blue-chip issues fell 2.3 percent to 841.98, and Standard & Poor's index of 500 New York Stock Exchange issues rose 1.3 percent to 102.91.

For the first six months of 1979, the Washington area index was up 17.2 percent from the close of 1978, while the Dow average rose 4.6 percent and the S&P 500 was up 7.1 percent.

To a large extent, the relatively weaker Dow and S&P performances mask stock market gains for smaller corporations, particularly those traded on the American Stock Exchange and over-the-counter market. OTC stock barometers have set records in recent weeks, and the Washington area index includes not only NYSE but Amex and OTC stocks.

For the recent quarter, 19 area stocks were up, 9 declined and 2 were unchanged. Insurance stocks rose 13 percent in the quarter, with Criterion Insurance up 26.9 percent, or $5.25 a share, to $24.75.

Financial General Bankshares had the greatest quarterly percentage gain (27.3) to $17.50. A group of Middle East investors seeking control of the bank holding company last week gained a one-year extension from the Securities and Exchange Commission to make a formal offering at $25 a share. Financial General management has opposed the bid, but investors last week pushed the company's price up to $18.875 by week's end.

The largest percentage decline was registered by Dart Drug (23.9) to $6.375 even though profits in the quarter ended April 30 were up 33 percent. Sales gains were much more modest - up to $50 million from $46.5 million a year earlier, a possible hint of slower retail sales growth here during recession. Dart's stock moved back up by the end of July to $7.25.

For the first six months of the year, banks performed well as a group, rising 11.3 percent on average. These gains were added to in July when American Security rose about 13 percent and Suburban Bancorporation rose about 6 percent. American Security had been flat in the quarter at $29 but stood at $32.75 at the end of July; in recent months, American Security Bank deposits have been increasing at a rapid pace.

Large dollar gains were posted in the first six months by Southern Railway, up $6.625; Communications Satellite Corp., $5.125; and Martin Mearietta Corp., $5. Leading in percentage gains were Geico Corp. (35.7) and Allegheny Airlines (32.8) Drug Fair suffered the largest decline for the six months in both price ( $3) and percentage (27.9).

In July, the Johnston, Lemon index rose another 3.6 percent to 110.34. During the month, Dart was up 13.7 percent; Macke Co. added $2.75 a share for a 30 percent increase on the strength of a solid earnings report (third-quarter profits up 24 percent); Washington Real Estate Investment Trust picked up $2.50, or about 10 percent; and Quality Inns International rose 75 cents a share, or 13 percent. Quality has applied for a listing on the American Stock Exchange.

On Friday, the Johnston, Lemon index closed at 112.171, another high (see chart, Page F12).

The National Association of Securities Dealers' NASDAQ composite index for OTC securities closed July at a record high of 141.33; OTC insurance and utility indexes also were at record levels. OTC trading volume has been active; in the first seven months of 1979, it was 2 billion shares, up 29 percent from the same period a year ago. NASDAQ volume is now about 45 percent that of the Big Board and some 3 1/2 times that of the Amex. CAPTION: Chart, Area Stocks Report