Function at 0x420160
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1dc
mov eax, dword [0x4ce724]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push str.GetInternetConnectedState___Test_cnx_Internet
call fcn.00457270
add esp, 4
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x42043e
mov ecx, dword [ebp - 4]
push ecx
push str.GetInternetConnectedState___InternetGetConnectedState_returns_TRUE_with_dwFlags___x
call fcn.00457270
add esp, 8
call fcn.004099f0
test eax, eax
je 0x4201c8
mov dword [ebp - 0x1c4], str.ws2_32.dll
jmp 0x4201d2
mov dword [ebp - 0x1c4], str.wsock32.dll
mov edx, dword [ebp - 0x1c4]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x420433
cmp dword [0x4e8c5c], 0
jne 0x420433
push str.WSACleanup
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x14], eax
push str.WSAStartup
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
push str.gethostbyname
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x14], 0
je 0x420417
cmp dword [ebp - 0x10], 0
je 0x420417
cmp dword [ebp - 0x18], 0
je 0x420417
xor eax, eax
mov word [ebp - 0x1b0], ax
push 0x18e
push 0
lea ecx, [ebp - 0x1ae]
push ecx
call fcn.00468010
add esp, 0xc
lea edx, [ebp - 0x1b0]
push edx
push 0x101
call dword [ebp - 0x10]
test eax, eax
jne 0x420415
call fcn.004040e0
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1b8], eax
cmp dword [ebp - 0x1b8], 0
jne 0x4202ac
mov dword [ebp - 0x1c8], 0
jmp 0x420322
mov ecx, dword [ebp - 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x1b4], eax
cmp dword [ebp - 0x1b4], 0x3fffffff
jle 0x4202da
mov dword [ebp - 0x1cc], 0
jmp 0x420316
mov eax, dword [ebp - 0x1b4]
shl eax, 1
call fcn.0046dc70
mov dword [ebp - 0x1d0], esp
mov edx, dword [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x1b4]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x1b8]
push ecx
mov edx, dword [ebp - 0x1d0]
push edx
call fcn.00423510
mov dword [ebp - 0x1cc], eax
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x1c8], eax
mov ecx, dword [ebp - 0x1c8]
push ecx
call dword [ebp - 0x18]
test eax, eax
je 0x42034a
mov edx, dword [ebp - 8]
or edx, 2
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
push eax
push 0x4b1c80
call fcn.00457270
add esp, 8
cmp dword [ebp + 0xc], 0
jne 0x420412
mov dword [ebp - 0x1b8], 0x4b1cd0
cmp dword [ebp - 0x1b8], 0
jne 0x420373
mov dword [ebp - 0x1d4], 0
jmp 0x4203e9
mov ecx, dword [ebp - 0x1b8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0x1b4], eax
cmp dword [ebp - 0x1b4], 0x3fffffff
jle 0x4203a1
mov dword [ebp - 0x1d8], 0
jmp 0x4203dd
mov eax, dword [ebp - 0x1b4]
shl eax, 1
call fcn.0046dc70
mov dword [ebp - 0x1dc], esp
mov edx, dword [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x1b4]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x1b8]
push ecx
mov edx, dword [ebp - 0x1dc]
push edx
call fcn.00423510
mov dword [ebp - 0x1d8], eax
mov eax, dword [ebp - 0x1d8]
mov dword [ebp - 0x1d4], eax
mov ecx, dword [ebp - 0x1d4]
push ecx
call dword [ebp - 0x18]
test eax, eax
je 0x420412
mov edx, dword [ebp - 8]
or edx, 2
mov dword [ebp - 8], edx
push str.microsoft.com
push str.GetInternetConnectedState___Ping_OK:__s
call fcn.00457270
add esp, 8
call dword [ebp - 0x14]
jmp 0x420420
mov eax, dword [ebp - 8]
or eax, 2
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0xc], 0
jmp 0x42043c
mov edx, dword [ebp - 8]
or edx, 2
mov dword [ebp - 8], edx
jmp 0x42044f
mov eax, dword [ebp - 4]
push eax
push str.GetInternetConnectedState___InternetGetConnectedState_returns_FALSE_with_dwFlags___u
call fcn.00457270
add esp, 8
mov ecx, dword [ebp - 4]
and ecx, 0x53
je 0x420460
mov edx, dword [ebp - 8]
or edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
push str.GetInternetConnectedState___Return__u_with_1CONNECTION_CONFIGURED_and_2CONNECTION_ACTIVED
call fcn.00457270
add esp, 8
push str.GetInternetConnectedState___End_cnx_Internet
call fcn.00457270
add esp, 4
mov eax, dword [ebp - 8]
lea esp, [ebp - 0x1dc]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00467fff
mov esp, ebp
pop ebp
ret