Function at 0x405510
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c2d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov eax, dword [ebp + 0x1c]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
push 0
push 0
push 0
mov esi, ecx
push 0
push eax
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x11], 1
mov dword [ebp - 4], 0
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 4], eax
je 0x405872
cmp eax, 0xffffffff
je 0x405872
mov ecx, dword [ebp + 0x18]
sub ecx, 0
je 0x40559d
dec ecx
je 0x405589
dec ecx
jne 0x4055c9
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x405581
mov ecx, 0x1bb
push 0
push 0
push 3
jmp 0x4055b2
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x405595
mov ecx, 0x50
push 0
push 0
push 3
jmp 0x4055b2
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x4055a9
mov ecx, 0x15
push 0
push 0x8000000
push 1
mov edx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 0x10]
push edx
push ecx
mov ecx, dword [ebp + 8]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x40585d
cmp eax, 0xffffffff
je 0x40585d
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x4055fe
lea edx, [ebp - 0x1c]
push 0x40f5f0
push edx
mov dword [ebp - 0x1c], str.connect_failed...
call sub.MSVCRT.dll__CxxThrowException
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esi + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, ebx
mov dword [ebp + 0x1c], edi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, edi
jae 0x405625
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40564b
mov al, byte [ecx - 1]
test al, al
je 0x40564b
cmp al, 0xff
je 0x40564b
test edi, edi
jne 0x405671
dec al
push edi
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x40569f
test edi, edi
jne 0x40565b
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x40569f
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x405667
cmp eax, edi
jae 0x40567a
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push edi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebx + 4]
mov esi, dword [ebp + 8]
mov ecx, eax
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4056cf
mov eax, dword [ebp + 0x18]
sub eax, 0
je 0x4056c6
dec eax
je 0x4056bd
dec eax
jne 0x4056d2
mov dword [esi + 0x50], 0x1bb
jmp 0x4056d2
mov dword [esi + 0x50], 0x50
jmp 0x4056d2
mov dword [esi + 0x50], 0x15
jmp 0x4056d2
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x54], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x405788
mov ecx, dword [ebp - 0x18]
mov edi, eax
xor eax, eax
lea ebx, [ecx + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, ebx
mov dword [ebp + 0x1c], esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, esi
jae 0x40570c
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x405732
mov al, byte [ecx - 1]
test al, al
je 0x405732
cmp al, 0xff
je 0x405732
test esi, esi
jne 0x405758
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405785
test esi, esi
jne 0x405742
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405785
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x40574e
cmp eax, esi
jae 0x405761
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebx + 4]
mov esi, dword [ebp + 0x10]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x405839
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp + 0x14]
or ecx, 0xffffffff
lea ebx, [eax + 0x30]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, ebx
mov dword [ebp + 0x10], esi
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, esi
jae 0x4057bd
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x4057e3
mov al, byte [ecx - 1]
test al, al
je 0x4057e3
cmp al, 0xff
je 0x4057e3
test esi, esi
jne 0x405809
dec al
push esi
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405836
test esi, esi
jne 0x4057f3
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x405836
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x4057ff
cmp eax, esi
jae 0x405812
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov eax, dword [ebp + 0x10]
mov edi, dword [ebx + 4]
mov esi, dword [ebp + 0x14]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.00405ee0
mov ecx, esi
call fcn.00405e00
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18
lea eax, [ebp - 0x20]
push 0x40f5f0
push eax
mov dword [ebp - 0x20], str.connect_failed...
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x24]
push 0x40f5f0
push ecx
mov dword [ebp - 0x24], str.open_internet_failed...
call sub.MSVCRT.dll__CxxThrowException
mov esi, dword [ebp - 0x18]
mov byte [ebp - 0x11], 0
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [esi + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.00407020
add esp, 0x10
mov eax, 0x405847
ret