来源(白菜乐园)

From: http://www.crackbest.org/read.php?tid=18

.386p
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\Wininet.inc
includelib \masm32\lib\Wininet.lib

.data?
ADSL dd ?

.code
start:
    @TestInternet:
    invoke Sleep, 10
    invoke InternetGetConnectedState, addr ADSL, 0
    ;----------------
    test eax,eax ;this is simple example. Create ur logic condition!!
    jz @TestInternet
    ;----------------

    @Connected:
    ;ur code here
end start

Link: http://www.asm32.net/article_details.aspx?id=5233