BUENOS AIRES, Dec 2 (Reuters) - Argentine state energy firm YPF is close to signing a loan deal with a multilateral lender which could cover part of its $400 million debt obligations next year, its chief financial officer said on Thursday, which will free up funds for investment.

Alejandro Lew said the loan would inject funds to balance out repayments YPF, which leads development of the country's massive Vaca Muerta shale formation, faces in 2022. It has also $500 million in maturities due in 2023.

"If all goes well, in a few days we will be signing and largely matching the payments that we have to make in 2022 with the funds that will come from this loan," he said during an event with credit ratings agency Moody's.

Argentina, locked in talks with the International Monetary Fund to roll over some $45 billion in debts it cannot pay, is something of a pariah in global financial markets. It defaulted and restructured over $100 billion in sovereign bonds last year.

"This is a sign the international financial market is not necessarily open for Argentina, but not fully closed either," Lew said.

On Wednesday, YPF President Pablo González told Reuters that the firm was looking to boost investment next year to around $3.5 billion, which could rise further.

"If we increase that by some $200 million more, it may be the largest investment in the last four years," he said. (Reporting by Eliana Raszewski; Additional reporting by Agustin Geist; Editing by Adam Jourdan and Marguerita Choy)