If the halyards are visible through the aperture, it may be possible to use them to pull a mouse up and hook it out with something akin to a crotchet hook (much underated tool!). If not, attack the other direction and lower a weighted line down through the hole and try to hook it at the bottom.
It's a job I've done mast up and down several times. Tape a thin mouse to a masthead halyard and pull it up with the halyard. Untape the mouse at the mast head, then put the wire(s) on the mouse and pull it back down. Biggest problem is getting the wire out of the right hole at the foot of the mast but that's just a bit fiddly. Long needle nose pliers are helpful, ditto a wire coat hanger that you've remodeled as required.
Ah the metal coat hanger, an essential component of any boat tool kit, getting hard to obtain now as dry cleaners go to plastic. Had to use a bit of welding rod last time I went cable fishing.
When I have needed to use a mouse to fish wires or halyards up a mast. I have used 2mm line with 100 nuts fed on to the line (End knoted), this gives a good weight which will ensure the mouse drops cleanly. The other advantage is that if you apply some tension to the line by taking a couple of turns around the line close to the end with the nuts then pushing against the row of nuts you will be able to make the line rigid while horizontal. This will allow you to feed in a good length of line with nuts on it. when you release the tension the line will collapse and the weight of the nuts will pull the line straight in. This will also make the line easier to catch at the base of the mast.
Good fishing