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

Disassembly:
push rbp
push rbx
push rdi
push r14
push r15
lea rbp, [rsp - 0x15d0]
mov eax, 0x16d0
call fcn.1400051c0
sub rsp, rax
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rbp + 0x15c0], rax
mov r14, r8
lea rcx, str.A_WinHTTP_Example_1.0
mov rbx, rdx
xor r15d, r15d
xor r8d, r8d
mov dword [rsp + 0x20], r15d
xor edx, edx
xor r9d, r9d
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rdi, rax
test rax, rax
je 0x140001b53
xorps xmm0, xmm0
mov dword [rsp + 0x40], 0x68
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x200
movups xmmword [rsp + 0x48], xmm0
movups xmmword [rsp + 0x58], xmm0
movups xmmword [rsp + 0x68], xmm0
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rbp - 0x78], xmm0
movups xmmword [rbp - 0x68], xmm0
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rbp + 0x1c0]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x18], 7
lea rax, [rbp - 0x40]
mov qword [rsp + 0x58], rax
lea rax, [rbp + 0x1c0]
mov qword [rbp - 0x78], rax
mov dword [rsp + 0x60], pe_nt_image_headers64
mov dword [rbp - 0x70], 0x200
jbe 0x1400019b6
mov rbx, qword [rbx]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x1700], rsi
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x140001b40
movzx r8d, word [rsp + 0x64]
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov rsi, rax
test rax, rax
je 0x140001b40
mov r8, qword [rbp - 0x78]
lea rdx, [0x140006618]
mov dword [rsp + 0x30], r15d
xor r9d, r9d
mov qword [rsp + 0x28], r15
mov rcx, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
je 0x140001b37
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 0x140001b2e
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001b2e
cmp qword [r14 + 0x18], 7
jbe 0x140001a72
mov r14, qword [r14]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140001b2e
lea r9, [rbp - 0x50]
mov r8d, 0x1000
lea rdx, [rbp + 0x5c0]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001b06
mov r8d, dword [rbp - 0x50]
test r8d, r8d
je 0x140001b06
lea r9, [rbp - 0x4c]
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x5c0]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9, [rbp - 0x50]
mov r8d, 0x1000
lea rdx, [rbp + 0x5c0]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x140001ac6
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, 1
jmp 0x140001b4b
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
mov rsi, qword [rsp + 0x1700]
mov rcx, qword [rbp + 0x15c0]
xor rcx, rsp
call fcn.140004130
add rsp, 0x16d0
pop r15
pop r14
pop rdi
pop rbx
pop rbp
ret