Function at 0x40f620
Capabilities:
Check internet connectivity via wininet
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x44c6cb
push eax
mov eax, 0x10070
mov dword fs:[0], esp
call fcn.0044b050
push ebx
push ebp
push esi
push edi
xor ebx, ebx
lea eax, [esp + 0x2c]
push ebx
push eax
mov dword [esp + 0x10090], 1
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea ecx, [esp + 0x44]
push str.Agent_ld
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov al, byte [esp + 0x38]
add esp, 0xc
test al, 4
push ebx
push ebx
push ebx
jne 0x40f697
lea edx, [esp + 0x4c]
push 4
push edx
jmp 0x40f69d
lea eax, [esp + 0x4c]
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebp, eax
cmp ebp, ebx
je 0x40f7e3
mov ecx, dword [str.Accept:___r_n_r_n]
mov edx, dword [0x4642e8]
mov eax, dword [0x4642ec]
mov dword [esp + 0x30], ecx
mov ecx, dword [0x4642f0]
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x38], eax
call sub.MFC42.DLL_CFile::CFile
mov esi, dword [esp + 0x10090]
push ebx
lea edx, [esp + 0x34]
push 0x84000100
push edx
mov byte [esp + 0x10094], 2
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x3c]
push eax
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x40f71d
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40f7d2
mov ecx, dword [esp + 0x10094]
push ebx
push 0x1001
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x40f7d2
lea edx, [esp + 0x28]
push ebx
lea eax, [esp + 0x18]
push edx
push eax
push 0x20000005
push esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40f767
mov dword [esp + 0x14], ebx
mov ecx, 0x4000
xor eax, eax
lea edi, [esp + 0x80]
lea edx, [esp + 0x80]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x10]
push ecx
push 0x4000
push edx
push esi
call edi
test eax, eax
je 0x40f7c9
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40f812
push eax
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFile::Write
lea ecx, [esp + 0x10]
lea edx, [esp + 0x80]
push ecx
push 0x4000
push edx
push esi
call edi
test eax, eax
jne 0x40f796
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
lea ecx, [esp + 0x18]
mov byte [esp + 0x10088], 1
call fcn.0044aa74
lea ecx, [esp + 0x10090]
mov byte [esp + 0x10088], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10094]
mov dword [esp + 0x10088], 0xffffffff
call sub.MFC42.DLL_CString::CString
or eax, 0xffffffff
jmp 0x40f864
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFile::Close
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebp
call esi
lea ecx, [esp + 0x18]
mov byte [esp + 0x10088], 1
call fcn.0044aa74
lea ecx, [esp + 0x10090]
mov byte [esp + 0x10088], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10094]
mov dword [esp + 0x10088], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x10080]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1007c
ret 8