Call to DllMain when unloading reflective DLL
Call to DllMain when unloading reflective DLL

Prior to this fix, DllMain with the ProessDetach flag was not called
when unloading the reflectively loaded DLL. This was causing very weird
crashes in the Invoke-NinjaCopy script which is built on this script.
This should fix the crash.

forbidden-ali/PowerSploit,jakxx/PowerSploit,amrme/PowerSploit,leverz/PowerSploit,lamkeysing92/PowerSploit,reuf/PowerSploit,gabemarshall/PowerSploit,efateva/PowerSploit,j4s0nh4ck/PowerSploit,j4s0nh4ck/PowerSploit,jorik041/PowerSploit,hoangcuongflp/PowerSploit,leverz/PowerSploit,zigitax/PowerSploit,api0cradle/PowerSploit,mattifestation/PowerSploit,jr69ss/PowerSploit,HarmJ0y/PowerSploit,forbidden-ali/PowerSploit,brianaddicks/PowerSploit,reuf/PowerSploit,demondayza/PowerSploit,PYANTSU/test,HarmJ0y/PowerSploit,adeptex/PowerSploit,lamkeysing92/PowerSploit,daviwesley/PowerSploit,ttyard/PowerSploit,z8oon/Powershell,mattifestation/PowerSploit,beni55/PowerSploit,gabemarshall/PowerSploit,NoobCam/PowerSploit,bmroberts1987/PowerSploit,azizjonm/PowerSploit,PYANTSU/test,api0cradle/PowerSploit,xujun10110/PowerSploit,amrme/PowerSploit,bmroberts1987/PowerSploit,xujun10110/PowerSploit,brianaddicks/PowerSploit,jtaylo78/PowerSploit,indigosax/PowerSploit,chouchouzzj/Powershell,kk9599/PowerSploit,coca1ne/PowerSploit,jr69ss/PowerSploit,secabstraction/PowerSploit,masterdon/PowerSploit,sammbertram/PowerSploit,zigitax/PowerSploit,chouchouzzj/Powershell,masterdon/PowerSploit,jakxx/PowerSploit,daviwesley/PowerSploit,NoobCam/PowerSploit,beni55/PowerSploit,coca1ne/PowerSploit,jorik041/PowerSploit,z8oon/Powershell,secabstraction/PowerSploit,demondayza/PowerSploit,adeptex/PowerSploit,ttyard/PowerSploit,jtaylo78/PowerSploit,efateva/PowerSploit,kk9599/PowerSploit,sammbertram/PowerSploit,indigosax/PowerSploit,hoangcuongflp/PowerSploit,azizjonm/PowerSploit