When it comes out of the microwave, it is cooked.
for bugs, you can cut them off and the chewed parts after it's cooked. Same with bad spots.
I microwave corn in the husks (but not for 4 minutes an ear) and then wrap it in a kitchen towel for 5 minutes or so afterward.
We always rinse the ears after shucking to help cool them down, so we can remove any bad spots or buggy spots then. I have not yet tried this method of shucking though. I saw it last week but I don't know if anyone is still selling corn in the husks around here.