Function at 0x140003139
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 rbp
push rsi
push rbx
sub rsp, 0x4a0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x440], rcx
mov qword [rbp + 0x448], rdx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rax, str.User_Agent
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenW]
call rax
mov qword [rbp + 0x418], rax
cmp qword [rbp + 0x418], 0
je 0x1400033f7
mov rax, qword [rbp + 0x440]
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.c_str___const
mov rdx, rax
mov rax, qword [rbp + 0x418]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80400100
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlW]
call rax
mov qword [rbp + 0x410], rax
cmp qword [rbp + 0x410], 0
je 0x1400033b7
lea rax, [rbp + 0x3f7]
mov qword [rbp + 0x3f8], rax
nop
nop
mov rax, qword [rbp + 0x448]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.end___const
mov rbx, rax
mov rax, qword [rbp + 0x448]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.begin___const
mov rdx, rax
lea rcx, [rbp + 0x3f7]
lea rax, [rbp - 0x40]
mov r9, rcx
mov r8, rbx
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string___gnu_cxx::__normal_iterator_char_const__std::__cxx11::basic_string_char__std::char_traits_char___std.allocator_char_______void____gnu_cxx::__no
lea rax, [rbp + 0x3f7]
mov rcx, rax
call method.std::__new_allocator_wchar_t_.__new_allocator__
nop
lea rax, [rbp - 0x40]
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___.c_str___const
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
mov r9d, 0
mov r8d, 0
mov edx, 0x40000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileW]
call rax
mov qword [rbp + 0x408], rax
cmp qword [rbp + 0x408], 0xffffffffffffffff
je 0x140003374
lea rcx, [rbp + 0x3f0]
lea rdx, [rbp - 0x20]
mov rax, qword [rbp + 0x410]
mov r9, rcx
mov r8d, 0x400
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
mov dword [rbp + 0x404], eax
cmp dword [rbp + 0x404], 0
je 0x140003318
mov eax, dword [rbp + 0x3f0]
test eax, eax
je 0x140003318
mov ecx, dword [rbp + 0x3f0]
lea r8, [rbp + 0x3ec]
lea rdx, [rbp - 0x20]
mov rax, qword [rbp + 0x408]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
cmp dword [rbp + 0x404], 0
je 0x14000332f
mov eax, dword [rbp + 0x3f0]
test eax, eax
jne 0x1400032a5
mov rax, qword [rbp + 0x408]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x410]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x418]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov esi, 1
mov ebx, 0
jmp 0x1400033a4
lea rax, str.Failed_to_create_file_for_image_download.
mov rdx, rax
mov rax, qword [0x1400c36f0]
mov rcx, rax
call method.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 rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov ebx, 1
lea rax, [rbp - 0x40]
mov rcx, rax
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string__
cmp ebx, 1
jne 0x140003427
jmp 0x1400033e2
lea rax, str.Failed_to_open_URL_for_image_download.
mov rdx, rax
mov rax, qword [0x1400c36f0]
mov rcx, rax
call method.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 rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x418]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
jmp 0x140003422
lea rax, str.Failed_to_open_internet_connection.
mov rdx, rax
mov rax, qword [0x1400c36f0]
mov rcx, rax
call method.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 rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov esi, 0
mov eax, esi
jmp 0x140003463
add rsp, 0x4a0
pop rbx
pop rsi
pop rbp
ret