Function at 0x140009b34
Capabilities:
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push rbp
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp + 0x20], rcx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rax, str.Example
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140009ba4
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Failed_to_open_internet_connection_n
mov rdx, rax
call sym.fprintf__iobuf__char_const__::_
mov eax, 0
jmp 0x140009dde
mov rdx, qword [rbp + 0x20]
mov rax, qword [rbp - 8]
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 - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140009c1a
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Failed_to_open_URL_n
mov rdx, rax
call sym.fprintf__iobuf__char_const__::_
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x140009dde
mov dword [rbp - 0x20], 0
mov dword [rbp - 0x24], 4
lea rcx, [rbp - 0x24]
lea rdx, [rbp - 0x20]
mov rax, qword [rbp - 0x10]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8, rdx
mov edx, 0x20000005
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_HttpQueryInfoA]
call rax
test eax, eax
sete al
test al, al
je 0x140009ca7
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Failed_to_get_file_size_n
mov rdx, rax
call sym.fprintf__iobuf__char_const__::_
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x140009dde
mov eax, dword [rbp - 0x20]
mov ebx, eax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 0x18], rax
cmp qword [rbp - 0x18], 0
jne 0x140009d1e
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Failed_to_allocate_memory_for_file_content_n
mov rdx, rax
call sym.fprintf__iobuf__char_const__::_
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0
jmp 0x140009dde
mov ecx, dword [rbp - 0x20]
lea r8, [rbp - 0x28]
mov rdx, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
mov dword [rbp - 0x1c], eax
cmp dword [rbp - 0x1c], 0
je 0x140009d52
mov edx, dword [rbp - 0x28]
mov eax, dword [rbp - 0x20]
cmp edx, eax
je 0x140009dba
mov ecx, 2
mov rax, qword [dbg.__acrt_iob_func]
call rax
mov rcx, rax
lea rax, str.Failed_to_read_entire_file_n
mov rdx, rax
call sym.fprintf__iobuf__char_const__::_
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov rdx, qword [rbp - 0x18]
mov r8, rdx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapFree]
call rax
mov eax, 0
jmp 0x140009dde
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 0x18]
add rsp, 0x68
pop rbx
pop rbp
ret