Function at 0x401523
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1048
call fcn.00402668
sub esp, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], str.WinINet_Example
call sym._InternetOpenA_20
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x401599
mov dword [esp + 4], str.InternetOpen_failed
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov eax, 0
jmp 0x401770
mov ecx, dword [ebp + 8]
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._InternetOpenUrlA_24
sub esp, 0x18
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401619
mov dword [esp + 4], str.InternetOpenUrl_failed
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, 0
jmp 0x401770
mov eax, dword [ebp + 0xc]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::c_str___const
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
call sym._CreateFileA_28
sub esp, 0x1c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4016b2
mov dword [esp + 4], str.CreateFile_failed
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, 0
jmp 0x401770
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0
je 0x4016f4
lea eax, [ebp - 0x101c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1018]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._InternetReadFile_16
sub esp, 0x10
test eax, eax
je 0x4016f4
mov eax, 1
jmp 0x4016f9
mov eax, 0
test al, al
je 0x401741
mov eax, dword [ebp - 0x101c]
test eax, eax
je 0x401740
mov eax, dword [ebp - 0x101c]
mov dword [esp + 0x10], 0
lea edx, [ebp - 0x1020]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WriteFile_20
sub esp, 0x14
jmp 0x4016b9
nop
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, 1
leave
ret