I think you'd have to write a virus and release it into the wild, to know. AFAIK, it isn't illegal to write a virus, it is illegal to release it into the wild. That is why, I think you can download a viri's source code and look at it, but its up the person if they compile it, and in almost all cases the author accesses no responibly for the code if used.