A lawyer for Garda Commissioner Martin Callinan revealed that officers have exhausted all options to identify her, her family background or simply where she came from.
The High Court was told more than 80 lines of inquiry have been investigated by gardai to try and find out who the girl is.
She is aged between 14 and 16 and was found in the city centre three weeks ago.
She is in State care and remains under armed guard in a hospital.
Genevieve Coonan, junior council for the Commissioner, said officers had used every avenue open to them without going public.
"The only option at this time is to release a photograph," she said.
Mr Justice George Birmingham said he will make his decision on whether to release a photograph on Monday but indicated he will allow the image to be shown to the public unless "circumstances change".
Detectives launched a major probe amid fears the girl was smuggled in to the country by traffickers.
A legal guardian appointed by the courts launched a legal challenge against a decision by the Health Service Executive (HSE) to move the girl from the hospital to a non-secure care facility.
Legislation prohibits the identification of a child in care, but the rules can be relaxed by a judge.
Gardai applied to have her photograph released under section 31.2 of the Child Care Act 1991.
Lawyers for the guardian, who want her placed in a secure unit, said any delay in identifying the child could damage her welfare and that releasing the photograph is in her best interest.
But Tim O'Leary, senior counsel for the HSE, said staff do not agree.
"The social workers believe that at this stage it may have a disturbing effect on her," he said.
"They are concerned if you make that order. They do not believe it's in her best interest."
Ms Coonan told the court gardai are in an invidious position, monitoring her, and wanted to progress the investigation as quickly as possible.
She revealed the girl had already tried to leave the hospital on a number of occasions.
"The circumstances she was found in indicate a criminal offence was carried out on her," she said.
"In terms of progression, gardai are at a deadlock, facing a brick wall."
The judge deferred the question of the photograph until after the weekend.
"That's designed to give her a few more days to settle where she is and become more comfortable with the staff member dealing with her and other professionals in contact with her," he said.
"Currently, as of now, my expectation is I will make the order permitting the use of the photograph on Monday."
Separately the lawyer for the guardian argued the girl should be placed in a secure unit and requested that part of the case to be adjourned for a week.
Senior counsel Felix McEnroy gave a hand written letter on green paper to the judge which he said was from the girl.
"The minor is very pleased in relation to the involvement of the court," he said.
"Her letter remarks she is inviting the court to assist."
Mr Justice Birmingham adjourned the care aspect of the case until next Thursday.
"There is a difficulty in that she is to effect ''blocking a bed that is badly needed'," the judge noted.
The guardian has been given permission by the High Court to bring judicial review proceedings against the HSE, Ireland, and the Attorney General.
Mr McEnroy is seeking a number of orders, including that the decision to provide her with a non-secure placement be quashed.
Elsewhere the judge rejected an application by the HSE for the case to be held in camera.
He said that childcare matters were in the public interest and that there seemed to be public interest in how the authorities respond to cases such as this.
Mr Justice Birmingham ordered that the media should not report anything that might identify the girl, where she is located or where she might be moved to.