But if a hacker installs a virus and then encrypts it is he still able to obtain his money?
Yes if already installed the virus works normally, encryption has nothing to do with the virii once installed.
Also I don't see why you would want to encrypt the virus, can't find any purpose in it...
I can ;) Encrypt and Hide both.