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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x15d0]
mov eax, 0x16d0
call fcn.140006100
sub rsp, rax
mov rax, qword [0x14000c040]
xor rax, rsp
mov qword [rbp + 0x15c0], rax
mov rdi, 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 rsi, rax
test rax, rax
je 0x140001cab
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], 0x100
mov dword [rbp - 0x70], 0x200
jbe 0x140001b05
mov rbx, qword [rbx]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x1700], r14
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x140001c98
movzx r8d, word [rsp + 0x64]
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x140001c98
mov r8, qword [rbp - 0x78]
lea rdx, [0x140007588]
mov dword [rsp + 0x30], 0x800000
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 0x140001c8f
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 0x140001c86
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001c86
cmp qword [rdi + 0x18], 7
jbe 0x140001bc4
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], 0x80000080
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140001c86
nop word [rax + rax]
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 0x140001c38
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x140001c5e
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140001c00
mov r8d, dword [rbp - 0x50]
test r8d, r8d
je 0x140001c5e
lea r9, [rbp - 0x4c]
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x5c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140001c00
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, 1
jmp 0x140001ca3
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
mov r14, qword [rsp + 0x1700]
mov rcx, qword [rbp + 0x15c0]
xor rcx, rsp
call fcn.140004fa0
add rsp, 0x16d0
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret