Function at 0x406d80
Capabilities:
Check internet connectivity via wininet
Create http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4743bc
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x4931e0]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
push esi
push edi
mov eax, dword [0x4931e0]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x494d48]
inc eax
mov dword [0x494d48], eax
cmp eax, 3
jg 0x406f36
cmp byte [edi + 8], 0
je 0x407031
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test byte [esp + 0x18], 0x20
jne 0x407031
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push str.Agent_u
lea eax, [esp + 0x4c]
push 0x40
push eax
call dword [sym.imp.MSVCR120.dll_swprintf_s]
mov eax, dword [esp + 0x28]
add esp, 0x10
not eax
and eax, 4
push 0
push 0
push 0
push eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
test esi, esi
je 0x407031
lea edx, [esp + 0x10]
mov dword [esp + 0x10], 0xffffffff
mov ecx, esi
call fcn.00405b20
mov ecx, dword [esp + 0x10]
cmp ecx, dword [edi + 0xc]
jae 0x406e64
mov byte [edi + 0xa], 1
mov dword [edi + 0xc], ecx
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [esp + 0x2c]
mov ecx, edi
push eax
call fcn.00407b70
push eax
lea ecx, [esp + 0x14]
call fcn.004089a0
lea ecx, [esp + 0x2c]
mov dword [esp + 0xd8], 0
call fcn.00401b60
lea eax, [esp + 0x10]
mov edx, 0x406cd0
push eax
lea ecx, [esp + 0x28]
call fcn.00408a00
add esp, 4
push 0
mov byte [esp + 0xdc], 1
mov esi, dword [edi + 0x60]
push 0x989680
push eax
mov dword [esp + 0x28], 0x989680
mov dword [esp + 0x2c], 0
call fcn.00447930
push eax
push 0x189
push str.bandwidth_concession_bandwidth_test.cpp
push str.BandwidthTest::OnDownload
lea ecx, [esp + 0x50]
call fcn.00447910
push eax
mov ecx, esi
call fcn.00449a60
lea ecx, [esp + 0x24]
mov byte [esp + 0xd8], 0
call fcn.00447d40
mov dword [esp + 0xd8], 0xffffffff
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x407031
lea eax, [ecx + 8]
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x407031
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x407031
cmp byte [edi + 8], 0
je 0x407008
lea eax, [esp + 0x24]
push eax
call fcn.00407b70
push eax
lea ecx, [esp + 0x14]
call fcn.004089a0
mov dword [esp + 0xd8], 2
or ebx, 0xffffffff
mov esi, dword [esp + 0x28]
test esi, esi
je 0x406f8d
lea eax, [esi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
jne 0x406f8d
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lea eax, [esi + 8]
mov edx, ebx
lock xadd dword [eax], edx
jne 0x406f8d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esp + 0x10]
mov edx, 0x407060
push eax
lea ecx, [esp + 0x20]
call fcn.00408a00
add esp, 4
mov byte [esp + 0xd8], 3
mov esi, dword [edi + 0x60]
push eax
call fcn.00447930
push eax
push 0x193
push str.bandwidth_concession_bandwidth_test.cpp
push str.BandwidthTest::OnDownload
lea ecx, [esp + 0x48]
call fcn.00447910
push eax
mov ecx, esi
call fcn.00449a90
lea ecx, [esp + 0x1c]
mov byte [esp + 0xd8], 2
call fcn.00447d40
mov dword [esp + 0xd8], 0xffffffff
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x407008
lea eax, [ecx + 8]
lock xadd dword [eax], ebx
dec ebx
jne 0x407008
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x407031
cmp byte [edi + 0xa], 0
je 0x407031
cmp dword [edi + 0xc], 0
jne 0x407022
mov dword [edi + 0xc], 1
xor edx, edx
mov eax, 0x30d40
div dword [edi + 0xc]
mov edx, dword [ecx]
push eax
call dword [edx]
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call fcn.0047259d
mov esp, ebp
pop ebp
ret