Function at 0x1400015a1
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
mov eax, 0x1070
call fcn.140002ad0
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1000], rcx
mov qword [rbp + 0x1008], rdx
mov qword [rbp + 0xfe0], 0
mov qword [rbp + 0xfd8], 0
mov dword [rbp + 0xfcc], 0
mov dword [rbp + 0xfc8], 0
mov dword [rbp + 0xfec], 0
mov qword [rbp + 0xfd0], 0
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rcx, str.FileDownloader
mov rax, qword [sym.imp.WININET.dll_InternetOpenA]
call rax
mov qword [rbp + 0xfe0], rax
cmp qword [rbp + 0xfe0], 0
jne 0x14000165f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.InternetOpen_failed:__ld_n
call sym.printf
mov eax, 0xffffffff
jmp 0x140001877
mov rax, qword [rbp + 0xfe0]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rdx, qword [rbp + 0x1000]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlA]
call rax
mov qword [rbp + 0xfd8], rax
cmp qword [rbp + 0xfd8], 0
jne 0x1400016db
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.InternetOpenUrl_failed:__ld_n
call sym.printf
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0xffffffff
jmp 0x140001877
mov rax, qword [rbp + 0x1008]
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_CreateFileA]
call rax
mov qword [rbp + 0xfd0], rax
cmp qword [rbp + 0xfd0], 0xffffffffffffffff
jne 0x1400017ce
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.CreateFile_failed:__ld_n
call sym.printf
mov rax, qword [rbp + 0xfd8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov eax, 0xffffffff
jmp 0x140001877
mov ecx, dword [rbp + 0xfcc]
lea r8, [rbp + 0xfc8]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0xfd0]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
test eax, eax
jne 0x1400017c4
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov edx, eax
lea rcx, str.WriteFile_failed:__ld_n
call sym.printf
jmp 0x140001807
mov dword [rbp + 0xfec], 1
lea rcx, [rbp + 0xfcc]
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0xfd8]
mov r9, rcx
mov r8d, 0x1000
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x140001807
mov eax, dword [rbp + 0xfcc]
test eax, eax
jne 0x140001774
mov rax, qword [rbp + 0xfd0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0xfd8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
cmp dword [rbp + 0xfec], 0
je 0x140001866
mov rax, qword [rbp + 0x1008]
mov rdx, rax
lea rcx, str.File_downloaded_successfully_to__s_n
call sym.printf
mov eax, 0
jmp 0x140001877
lea rcx, str.Failed_to_download_file._n
call sym.printf
mov eax, 0xffffffff
add rsp, 0x1070
pop rbp
ret