Function at 0x140027000
Capabilities:
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Write file on windows

Disassembly:
push rbx
push rbp
push rdi
push r15
sub rsp, 0x58
movsd xmm0, qword [str.example.com]
mov rbp, rcx
mov eax, dword [0x14001e568]
lea rcx, str.InternetOpenA___n
movsd qword [rsp + 0x40], xmm0
mov rbx, rdx
mov dword [rsp + 0x48], eax
call fcn.140001010
xor r15d, r15d
lea rcx, str.Mozilla_5.0__Windows_NT_6.1__WOW64__Trident_7.0__AS__rv:11.0__like_Gecko
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
lea edx, [r15 + 1]
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rdi, rax
test rax, rax
je 0x14002730d
mov qword [rsp + 0x80], rsi
lea rcx, str.InternetConnectA___n
mov qword [rsp + 0x50], r14
call fcn.140001010
mov r14d, 0xdeadb33f
lea r8d, [r15 + 0x50]
mov qword [rsp + 0x38], r14
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x30], r15d
xor r9d, r9d
mov dword [rsp + 0x28], 3
mov rcx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.WININET.dll_InternetConnectA]
mov rsi, rax
test rax, rax
jne 0x1400270c2
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [rsi + 2]
jmp 0x1400272f6
lea rcx, str.running_InternetOpenUrlA_n
call fcn.140001010
xor r9d, r9d
mov qword [rsp + 0x28], r14
xor r8d, r8d
mov dword [rsp + 0x20], 0x80080300
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov r14, rax
test rax, rax
jne 0x140027110
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [r14 + 3]
jmp 0x1400272f6
lea rcx, str.running_CreateFileA_n
call fcn.140001010
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 4
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateFileA]
lea rcx, str.file_created_lol_n
mov rbp, rax
call fcn.140001010
cmp rbp, 0xffffffffffffffff
jne 0x140027180
lea rcx, str.failed_with_file._wutwut_n
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [rbp + 5]
jmp 0x1400272f6
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, str.file_created_n
mov dword [rsp + 0x98], eax
call fcn.140001010
mov ecx, 0x400
call fcn.140007218
lea r9, [rsp + 0x90]
mov r8d, 0x400
mov rdx, rax
mov rcx, r14
mov rbx, rax
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x14002721c
nop
mov r8d, dword [rsp + 0x90]
test r8d, r8d
je 0x140027290
lea r9, [rsp + 0x98]
mov qword [rsp + 0x20], r15
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14002725b
lea r9, [rsp + 0x90]
mov r8d, 0x400
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x1400271d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400272c3
lea rcx, str.read_error_n
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbx
call fcn.140007204
mov eax, 6
jmp 0x1400272f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.failed_for_some_reason_n_d_n
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbx
call fcn.140007204
mov eax, 5
jmp 0x1400272f6
lea rcx, str.finished_downloading_file_n
call fcn.140001010
mov rcx, rbx
call fcn.140007204
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400272f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x14001e5d4]
call fcn.140001010
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rbx
call fcn.140007204
mov eax, 7
mov rsi, qword [rsp + 0x80]
mov r14, qword [rsp + 0x50]
add rsp, 0x58
pop r15
pop rdi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [0x14001e5d4]
call fcn.140001010
mov ecx, 0xffffffff
call fcn.140004f80
int3