Applicable: VB6 & VB6 Created Exe files
This a Not a robust trick: Some Anti-Virus programs won't allow this and they will detect the scrambled exe file as virus
PUBLIC FUNCTION ScrambleVbExe(Fname as string, DoIt as boolean)
Dim sBuffer As String
Dim FN As Integer
FN = FreeFile
Open Fname For Binary As #FN
sBuffer = Space$(LOF(FN))
Get #FN, 1, sBuffer
Close #FN
if DoIt=true then
sBuffer = Replace(sBuffer, "MSVBVM60.DLL", "PREVENTMYRUN")
else
sBuffer = Replace(sBuffer, "PREVENTMYRUN", "MSVBVM60.DLL")
end if
Open Fname For Binary As #FN
Put #FN, , sBuffer
Close #FN
End function