Try disabling AVG entirely then check if mIRC can connect. If it can then there should be a way to specifically exempt mirc.exe from interference within AVG. mIRC tends to be the victim of interference from security software as it is used as part of the payload of many viruses (due to its combination of IRC connectivity, scripting capability and small size).

Only two other people have reported this "Permission Denied" error on the forums and if they ever found a solution they didn't share it, so I don't know what else to suggest.