Function at 0x140001000
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x90
mov rsi, rcx
xor r15d, r15d
mov qword [rsp + 0x30], r15
lea rcx, str.output.txt
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140001285
mov rdi, qword [rsi + 0x18]
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0xc8], r15d
xor edx, edx
mov rcx, rax
add rdi, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x14000127c
lea r9, [rsp + 0xc8]
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000127c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0xc8]
cmp rax, rdi
jne 0x140001285
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
lea rcx, str.Program
mov edx, 1
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rdi, rax
test rax, rax
je 0x140001285
mov r8d, 0x1bb
lea rdx, str.learn.microsoft.com
xor r9d, r9d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rbp, rax
test rax, rax
jne 0x140001111
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001285
lea rax, str.text_html
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x40], rax
lea r9, str.HTTP_1.1
lea rax, str.application_xhtmlxml
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x48], rax
lea r8, str._en_us_windows_win32_api_winhttp_nf_winhttp_winhttpconnect
lea rax, str.application_xml
mov rcx, rbp
mov qword [rsp + 0x50], rax
lea rdx, [0x140002288]
lea rax, str.q0.9
mov qword [rsp + 0x58], rax
lea rax, str.image_avif
mov qword [rsp + 0x60], rax
lea rax, str.image_webp
mov qword [rsp + 0x68], rax
lea rax, str.image_apng
mov qword [rsp + 0x70], rax
lea rax, [0x1400021e0]
mov qword [rsp + 0x78], rax
lea rax, str.q0.8
mov qword [rsp + 0x80], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x140001285
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], r15d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140001285
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001285
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0x186a0
mov rcx, rax
mov r14, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x140001285
lea r9, [rsp + 0xd0]
mov dword [rsp + 0xd0], r15d
mov r8d, 0x186a0
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001285
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov r8, rsi
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x140001287
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret