Function at 0x40acc8
Capabilities:
Check internet connectivity via wininet
Create http request
Get http content length
Print debug messages

Disassembly:
push ebp
lea ebp, [esp - 0x6dc]
sub esp, 0x6dc
push 0xffffffffffffffff
push 0x40c4b9
mov eax, dword fs:[0]
push eax
mov eax, _initterm_e
call fcn.0040c2e0
mov eax, dword [0x411020]
xor eax, ebp
mov dword [ebp + 0x6d8], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [ebp + 0x38]
mov dword [ebp - 0x14], esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
xor ebx, ebx
lea ecx, [ebp + 0x70]
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
push esi
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push dword [eax]
lea ecx, [ebp + 0x70]
push 0x2f
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char__unsigned_int_const]
mov ecx, dword [ebp + 0x84]
sub ecx, eax
dec ecx
push ecx
inc eax
push eax
lea eax, [ebp + 0x6bc]
push eax
lea ecx, [ebp + 0x70]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp + 0x6bc]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edi, 0x103
push edi
lea eax, [ebp + 0x475]
push ebx
push eax
mov byte [ebp + 0x474], bl
call sub.MSVCR80.dll_memset
push 0x104
lea eax, [ebp + 0x474]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0x18
push ebx
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
push 0x40
lea eax, [ebp + 0x67c]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea eax, [ebp + 0x67c]
push str.Agent_ld
push eax
call esi
add esp, 0xc
push ebx
test byte [ebp - 0x24], 4
push ebx
lea eax, [ebp + 0x67c]
push ebx
jne 0x40ae21
push 4
jmp 0x40ae22
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x40ae8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp + 0x474]
push str.InternetOpen
push eax
call esi
push edi
lea eax, [ebp + 0x579]
push ebx
push eax
mov byte [ebp + 0x578], bl
call sub.MSVCR80.dll_memset
lea eax, [ebp + 0x474]
push eax
lea eax, [ebp + 0x578]
push str.online_log__s
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x24
lea eax, [ebp + 0x578]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x40affb
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp + 0x6c8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
push 0x84000100
lea eax, [ebp + 0x6c8]
push eax
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [ebp - 0x14]
push eax
lea eax, [ebp + 0x6c8]
push eax
push edi
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
jne 0x40af74
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x14], 0x3e7
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
test eax, eax
je 0x40af22
push 0x40d8a8
lea eax, [ebp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40af22
lea eax, [ebp + 0x8c]
push eax
push edi
push 0x40dbe8
jmp 0x40af2b
push dword [ebp - 0x18]
push edi
push str.InternetOpenUrl
lea eax, [ebp + 0x474]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x103
lea eax, [ebp + 0x579]
push ebx
push eax
mov byte [ebp + 0x578], bl
call sub.MSVCR80.dll_memset
lea eax, [ebp + 0x474]
push eax
lea eax, [ebp + 0x578]
push str.online_log__s
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x18
jmp 0x40ae78
push ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x20000005
push esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x40afd2
push 0x103
lea eax, [ebp + 0x579]
push ebx
push eax
mov byte [ebp + 0x578], bl
call sub.MSVCR80.dll_memset
push edi
lea eax, [ebp + 0x578]
push str.online_log_HttpQueryInfo__s
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x18
lea eax, [ebp + 0x578]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x10000
lea eax, [ebp - 0x10024]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x10]
call esi
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x6d8]
xor ecx, ebp
call fcn.0040ba0c
add ebp, 0x6dc
leave
ret