i just want to block user who use a unregistered copy of mirc
This will never be possible because it is simply against privacy laws to gain information about someone else's system without their express permission. To do what you want, you would have to access someone else's registry (major no no, think of the implications if some dumbass would rework the code so he could write to the registry as well as read).
The only way I see it can be easily done is via the VERSION reply, but then you've still got people who removed that, and again the privacy issues. I for one may have a registered mIRC, but it's no one's business whether I do or not.
Also -- you wanna block people without a regged mIRC. How about those people still in their trial? They are using their non-regged version perfectly legit. So either there would have to be a third response (regged,unregged,trial), or the trial version should just return the regged response.
Lastly, a person who has used a crack has for all purposes a registered copy of mIRC, yet he didn't actually register it. There is no way to tell the difference...