Function at 0x1400018a5
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push rbp
push rbx
mov eax, 0x1238
call fcn.14000fd50
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x11d0], rcx
mov qword [rbp + 0x11d8], rdx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rax, str.MyUserAgent
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0x11a8], rax
cmp qword [rbp + 0x11a8], 0
jne 0x140001937
lea rax, str.Failed_to_initialize_WinINet.
mov rdx, rax
mov rax, qword [0x140115160]
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__
jmp 0x140001b20
mov rax, qword [rbp + 0x11d0]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.c_str___const
mov rdx, rax
mov rax, qword [rbp + 0x11a8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0x11a0], rax
cmp qword [rbp + 0x11a0], 0
jne 0x1400019cd
lea rax, str.Failed_to_open_URL.
mov rdx, rax
mov rax, qword [0x140115160]
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 + 0x11a8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
jmp 0x140001b20
mov rdx, qword [rbp + 0x11d8]
lea rax, [rbp - 0x50]
mov r8d, 4
mov rcx, rax
call fcn.1400b6ae0
lea rax, [rbp - 0x50]
add rax, 0xd8
mov rcx, rax
call method.std::basic_ios_char__std::char_traits_char___.operator____const
test al, al
je 0x140001a75
lea rax, str.Failed_to_open_file_for_writing.
mov rdx, rax
mov rax, qword [0x140115160]
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 + 0x11a0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x11a8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 0
jmp 0x140001af4
mov eax, dword [rbp + 0x19c]
mov ecx, eax
lea rdx, [rbp + 0x1a0]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call method.std::ostream.write_char_const__long_long_
lea rcx, [rbp + 0x19c]
lea rdx, [rbp + 0x1a0]
mov rax, qword [rbp + 0x11a0]
mov r9, rcx
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x140001ab4
mov eax, dword [rbp + 0x19c]
test eax, eax
je 0x140001ab4
mov eax, 1
jmp 0x140001ab9
mov eax, 0
test al, al
jne 0x140001a57
lea rax, [rbp - 0x50]
mov rcx, rax
call method.std::basic_ofstream_char__std::char_traits_char___.close__
mov rax, qword [rbp + 0x11a0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0x11a8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 1
lea rax, [rbp - 0x50]
mov rcx, rax
call method.std::basic_ofstream_char__std::char_traits_char___.basic_ofstream__
cmp ebx, 1
jmp 0x140001b20
add rsp, 0x1238
pop rbx
pop rbp
ret