The Late 2012 iMac has no audio input, so you will need a third-party audio interface. Prices and quality range from the Griffin iMic at about US $40 to professional-quality input devices in the hundreds of dollars. Which would suit you will depend on your needs.
As varjak paw stated the iMac would need to have some sort of USB interface, the difference between line level and mic level is not a quality issue, it is a nominal electrical db level (not db as in sound pressure level, but db as used as a measurement unit electrically) line and mic level are approimatley 60 db in difference electrically in a log scale.
That being said, I just checked using a transformer on a sm-58 into my 13" and although it would "see" it the levels would far below a usable signal.
Can't speak for the Sony software as I am not familiar with it, and I don't use Windows (at least not for a long time).
I suppose you might be able have someone write some code maybe, but buying the equipment that is required would be much less expensive and easier.
Many choices of interfaces/preamps on line in many price/quality points.