Function at 0x407990
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request

Disassembly:
sub esp, 0x19c
mov eax, dword [0x425074]
xor eax, esp
mov dword [esp + 0x198], eax
push esi
mov esi, ecx
cmp dword [esi + 4], 0
push edi
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
mov dword [esp + 8], 0x7530
jne 0x407af5
cmp dword [esi + 0x30], 0
push 0
je 0x4079d6
push str._local_
push str.proxy
push 3
jmp 0x4079de
mov eax, dword [esi + 0x54]
push 0
push 0
push eax
push str.Mozilla_4.0__compatible__MSIE_5.00__Windows_98__Rising_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 4], eax
test eax, eax
jne 0x407a12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x198]
xor ecx, esp
call fcn.0040a920
add esp, 0x19c
ret
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
cmp dword [esi + 0x30], eax
je 0x407ae2
push 0x103
push eax
lea ecx, [esp + 0xa5]
push ecx
mov byte [esp + 0xa8], al
call fcn.00411980
mov eax, dword [esi + 0x28]
add esp, 0xc
push 3
lea edx, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x14], 3
mov dword [esp + 0x20], edx
call fcn.00403e20
movzx ecx, word [esi + 0x2c]
mov edx, dword [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0xa4]
push str._s:_d
push eax
call fcn.0040bb75
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
add esp, 0x10
cmp eax, ecx
je 0x407a99
push eax
call fcn.0040accb
add esp, 4
mov ecx, dword [esi + 4]
push 0xc
lea eax, [esp + 0x10]
push eax
push 0x26
lea edx, [esp + 0xa8]
push ecx
mov dword [esp + 0x20], edx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
test eax, eax
jne 0x407ae2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
call fcn.004082c0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x198]
xor ecx, esp
call fcn.0040a920
add esp, 0x19c
ret
mov eax, dword [esi + 4]
push 4
lea edx, [esp + 0xc]
push edx
push 2
push eax
call edi
test eax, eax
je 0x407abb
cmp dword [esi + 8], 0
jne 0x407bba
cmp dword [esi + 0x18], 0
push 0
push 0
push 3
jne 0x407b1e
movzx ecx, word [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 4]
push 0
push 0
push ecx
push eax
push edx
jmp 0x407b33
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x10]
push eax
movzx eax, word [esi + 0x14]
push ecx
mov ecx, dword [esi + 4]
push eax
push edx
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 8], eax
test eax, eax
je 0x407abb
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x407abb
mov eax, dword [esi + 8]
push 4
lea edx, [esp + 0xc]
push edx
push 5
push eax
call edi
test eax, eax
je 0x407abb
mov edx, dword [esi + 8]
push 4
lea ecx, [esp + 0xc]
push ecx
push 6
push edx
call edi
test eax, eax
je 0x407abb
cmp dword [esi + 0x34], 0
je 0x407bba
mov eax, dword [esi + 0x38]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
mov eax, dword [esi + 8]
push 0x2b
push eax
call edi
test eax, eax
je 0x407abb
mov eax, dword [esi + 0x3c]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
mov ecx, dword [esi + 8]
push eax
push 0x2c
push ecx
call edi
test eax, eax
je 0x407abb
mov ecx, dword [esp + 0x1a0]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.0040a920
add esp, 0x19c
ret