Function at 0x4520e0
Capabilities:
Check internet connectivity via wininet
Create http request
Get http content length

Disassembly:
mov eax, 0x46975c
call fcn.00461c40
mov eax, 0x1208
call fcn.00461c80
push ebx
push esi
xor esi, esi
push edi
cmp dword [ebp + 8], esi
mov ebx, ecx
je 0x45224e
mov eax, dword [ebx + 0x24]
cmp eax, esi
je 0x452115
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x24], esi
mov eax, dword [ebx + 0x28]
cmp eax, esi
je 0x452126
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x28], esi
push dword [ebp + 8]
lea edi, [ebx + 4]
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
push eax
mov ecx, edi
push dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
lea eax, [ebp - 0x20]
push 4
push eax
push 0x49
push esi
mov dword [ebp - 0x20], 0x32
call dword [sym.imp.WININET.dll_InternetSetOptionW]
lea eax, [ebp - 0x14]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test byte [ebp - 0x14], 0x20
jne 0x45224e
push 0x1f
xor eax, eax
pop ecx
lea edi, [ebp - 0x102]
mov word [ebp - 0x104], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
lea eax, [ebp - 0x104]
push str.Agent_ld
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
lea eax, [ebp - 0x104]
push esi
push esi
push esi
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, esi
mov dword [ebx + 0x28], eax
je 0x45224e
mov eax, dword [ebx + 8]
mov dword [ebp - 0x10], esi
cmp eax, esi
jne 0x4521c7
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 5
push str.https
push eax
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4521e3
mov dword [ebp - 0x10], 1
mov eax, dword [ebx + 8]
push 8
pop ecx
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp - 0x84]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
xor esi, esi
cmp eax, esi
je 0x452204
mov edi, eax
mov eax, dword [ebp - 0x10]
push esi
neg eax
sbb eax, eax
and eax, 0x3280
add eax, 0x84000100
push eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [ebp - 0x84]
push eax
push edi
push dword [ebx + 0x28]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, esi
mov dword [ebx + 0x24], eax
jne 0x452255
mov eax, dword [ebx + 0x28]
cmp eax, esi
je 0x45224e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x28], esi
xor eax, eax
jmp 0x452425
mov ecx, 0x411
xor eax, eax
lea edi, [ebp - 0x1212]
mov word [ebp - 0x1214], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov al, byte [ebp + 0xb]
push esi
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x18], 0x1048
mov byte [ebp - 0x64], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x18]
mov dword [ebp - 4], esi
push eax
lea eax, [ebp - 0x1214]
push eax
push 0x22
push dword [ebx + 0x24]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
cmp eax, esi
je 0x45237a
mov al, byte [ebp + 0xb]
push esi
lea ecx, [ebp - 0x44]
mov byte [ebp - 0x44], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push dword [ebp + 8]
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
call edi
pop ecx
push eax
lea ecx, [ebp - 0x44]
push dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov al, byte [ebp + 0xb]
push esi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
mov byte [ebp - 0x54], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x1214]
push eax
call edi
pop ecx
push eax
lea eax, [ebp - 0x1214]
push eax
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov al, byte [ebp + 0xb]
push esi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
mov byte [ebp - 0x34], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [ebx + 8]
mov byte [ebp - 4], 3
cmp eax, esi
jne 0x452321
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
lea eax, [ebp - 0x1214]
push eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
pop ecx
test eax, eax
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
pop ecx
push dword [eax]
lea eax, [ebp - 0x44]
push esi
je 0x452343
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x44]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 0x31
xor eax, eax
pop ecx
lea edi, [ebp - 0x1ca]
mov word [ebp - 0x1cc], si
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xc6
push eax
lea eax, [ebp - 0x1cc]
push eax
push 0x13
push dword [ebx + 0x24]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea eax, [ebp - 0x1cc]
push 0x4837ac
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4523e8
mov eax, dword [ebx + 0x24]
cmp eax, esi
je 0x4523d5
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x24], esi
mov eax, dword [ebx + 0x28]
cmp eax, esi
je 0x452414
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x28], esi
jmp 0x452414
lea eax, [ebp - 0x24]
lea edi, [ebx + 0x2c]
push esi
push eax
push edi
push 0x20000005
push dword [ebx + 0x24]
mov dword [ebp - 0x24], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x45240c
mov dword [edi], esi
mov edi, dword [edi]
cmp edi, esi
je 0x4523c4
mov esi, edi
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4