It is a classic move of any developer to reuse code – actually it is a professional move to reuse code that you know works. So it is no surprise that hackers take professional steps to ensure their malware attacks work. Even taking legitimate code from GitHub.
Code Reuse In the Malware Landscape – SANS Internet Storm Center