Function at 0x408560
Capabilities:
Check http status code
Check internet connectivity via wininet
Create http request

Disassembly:
push 0xffffffffffffffff
push 0x469df3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x280
push ebx
push ebp
push esi
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x91]
mov byte [esp + 0x90], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor ebp, ebp
lea ecx, [esp + 0x34]
mov dword [esp + 0x298], ebp
mov dword [esp + 0x18], 0x200
stosb byte es:[edi], al
call fcn.004012f0
mov edx, dword [esp + 0x2a0]
lea eax, [esp + 0x18]
push 0x8000000
lea ecx, [esp + 0x94]
push eax
push ecx
push edx
mov dword [esp + 0x24], 0xffffffff
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
cmp eax, ebp
je 0x408753
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x90]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.00401360
add esp, 0xc
push eax
lea ecx, [esp + 0x2a4]
mov byte [esp + 0x29c], 1
call fcn.0045b6e3
lea ecx, [esp + 0x10]
mov byte [esp + 0x298], 0
call fcn.0045b5aa
lea eax, [esp + 0x1c]
push ebp
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x3c]
call fcn.00459b66
mov edx, dword [esp + 0x4a]
lea eax, [esp + 0x50]
and edx, 0xffff
push edx
push str.Agent_ld
push eax
call fcn.0043e574
mov al, byte [esp + 0x28]
add esp, 0xc
test al, 4
push ebp
push ebp
push ebp
jne 0x40867c
lea ecx, [esp + 0x5c]
push 4
push ecx
jmp 0x408682
lea edx, [esp + 0x5c]
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
cmp edi, ebp
je 0x408753
mov ecx, dword [0x488484]
mov eax, dword [str.Accept:___r_n_r_n]
mov edx, dword [0x488488]
mov esi, dword [esp + 0x2a0]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
mov eax, dword [0x48848c]
push ebp
lea ecx, [esp + 0x28]
push 0x84000100
push ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x2c]
push eax
push edx
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, eax
cmp esi, ebp
je 0x408750
lea eax, [esp + 0x20]
push ebp
lea ecx, [esp + 0x14]
push eax
push ecx
push 0x20000013
push esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x34], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
push esi
mov ebp, eax
call ebx
push edi
call ebx
mov eax, dword [esp + 0x10]
test ebp, ebp
je 0x40874c
cmp eax, 0xc8
jb 0x40874c
cmp eax, 0x12c
jae 0x40874c
lea ecx, [esp + 0x2a0]
mov dword [esp + 0x298], 0xffffffff
call fcn.0045b5aa
mov eax, 1
jmp 0x4087e1
mov dword [esp + 0x14], eax
push edi
call ebx
mov edx, dword [esp + 0x14]
lea eax, [edx - 0x190]
cmp eax, 0x66
ja case.0x40876a.411
xor ecx, ecx
mov cl, byte [eax + 0x40882c]
jmp dword [ecx*4 + 0x4087fc]
push str.Http
jmp 0x4087bc
push 0x4888f0
jmp 0x4087bc
push 0x4888d8
jmp 0x4087bc
push 0x4888bc
jmp 0x4087bc
push 0x4888a4
jmp 0x4087bc
push 0x48888c
jmp 0x4087bc
push 0x48886c
jmp 0x4087bc
push 0x48884c
jmp 0x4087bc
push 0x48882c
jmp 0x4087bc
push 0x488814
jmp 0x4087bc
push 0x4887fc
mov ecx, dword [esp + 0x2a8]
call fcn.0045b733
lea ecx, [esp + 0x2a0]
mov dword [esp + 0x298], 0xffffffff
call fcn.0045b5aa
xor eax, eax
mov ecx, dword [esp + 0x290]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x28c
ret