Function at 0x40b460
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Read data from internet
Receive data
Reference http user-agent string
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5258fb
mov eax, dword fs:[0]
push eax
sub esp, 0x648
mov eax, dword [0x56e00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x624], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp + 0xc]
push 0
mov dword [ebp - 0x644], eax
mov eax, dword [ebp + 0x10]
push 1
mov dword [ebp - 0x620], eax
mov eax, dword [ebp + 0x14]
push str.http:__www.google.com
mov dword [ebp - 0x648], esi
mov dword [ebp - 0x650], eax
mov dword [ebp - 0x654], 0
mov dword [ebp - 4], 0
call dword [sym.imp.WININET.dll_InternetCheckConnectionA]
test eax, eax
je 0x40b6d4
lea eax, [ebp - 0x624]
mov dword [ebp - 0x624], 0x200
push eax
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.urlmon.dll_ObtainUserAgentString]
xor ecx, ecx
test edi, edi
jne 0x40b530
mov al, byte [ecx + 0x558db4]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x1d], al
test al, al
jne 0x40b513
jmp 0x40b541
mov al, byte [ecx + str.POST]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x1d], al
test al, al
jne 0x40b530
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
test ebx, ebx
je 0x40b6bb
movzx eax, word [0x573678]
push 0
push 0
push 3
push 0
push 0
push eax
push dword [ebp - 0x64c]
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
test edi, edi
je 0x40b6b0
push 0
push dword [0x5738ac]
lea eax, [ebp - 0x1c]
push 0
push 0
push str.HTTP_1.1
push dword [ebp - 0x644]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x644], eax
test eax, eax
je 0x40b6b0
mov ebx, dword [ebp - 0x650]
xor ecx, ecx
test ebx, ebx
je 0x40b5d9
mov ecx, ebx
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b5d0
sub ecx, edx
mov eax, dword [ebp - 0x620]
xor edx, edx
test eax, eax
je 0x40b5ff
mov edx, eax
lea edi, [edx + 1]
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x40b5f0
mov eax, dword [ebp - 0x620]
sub edx, edi
push ecx
push ebx
mov ebx, dword [ebp - 0x644]
push edx
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x40b627
push str.connection_error1
mov ecx, esi
call fcn.00410f40
mov eax, esi
jmp 0x40b716
lea ecx, [ebp - 0x640]
call fcn.004110e0
mov byte [ebp - 4], 1
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
nop dword [eax]
lea eax, [ebp - 0x620]
push eax
push 0x3ff
lea eax, [ebp - 0x61c]
push eax
push ebx
call edi
test eax, eax
je 0x40b693
mov eax, dword [ebp - 0x620]
test eax, eax
je 0x40b693
push eax
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x640]
call fcn.00410ae0
mov eax, dword [ebp - 0x620]
cmp eax, 0x400
jae 0x40b68e
mov byte [ebp + eax - 0x61c], 0
jmp 0x40b640
call fcn.0048d240
lea eax, [ebp - 0x640]
mov ecx, esi
push eax
call fcn.00410db0
lea ecx, [ebp - 0x640]
call fcn.00410cb0
mov eax, esi
jmp 0x40b716
push edi
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call edi
jmp 0x40b6c1
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call edi
push str.connection_error3
mov ecx, esi
call fcn.00410f40
mov eax, esi
jmp 0x40b716
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.connection_error2
mov ecx, esi
call fcn.00410f40
mov eax, esi
jmp 0x40b716
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0048cd50
mov esp, ebp
pop ebp
ret