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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x19d0]
mov eax, 0x1ad0
call fcn.140008570
sub rsp, rax
mov rax, qword [0x140042040]
xor rax, rsp
mov qword [rbp + 0x19c0], rax
mov rsi, rdx
mov rbx, rcx
xor r12d, r12d
lea rcx, [0x14003dfb0]
xor edx, edx
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rdi, rax
test rax, rax
je 0x140001b0a
xorps xmm0, xmm0
mov qword [rsp + 0x1b10], r14
xor eax, eax
lea r9, [rsp + 0x40]
mov qword [rbp - 0x60], rax
xor r8d, r8d
lea rax, [rbp - 0x40]
xor edx, edx
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x58], rax
mov rcx, rbx
lea rax, [rbp + 0x1c0]
movups xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x40], 0x68
movups xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x60], pe_nt_image_headers64
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x78], rax
movups xmmword [rbp - 0x70], xmm0
mov dword [rbp - 0x70], 0x400
movups xmmword [rsp + 0x70], xmm0
call qword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
movzx r8d, word [rsp + 0x64]
lea rdx, [rbp - 0x40]
xor r9d, r9d
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x1400019de
cmp dword [rsp + 0x54], 2
lea r8, [rbp + 0x1c0]
mov eax, r12d
lea rdx, [0x14003dfd8]
mov ecx, 0x800000
cmove eax, ecx
xor r9d, r9d
mov dword [rsp + 0x30], eax
mov rcx, r14
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rbx, rax
test rax, rax
jne 0x1400019ee
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140001b02
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], r12d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r12d
mov rcx, rbx
mov qword [rsp + 0x1b18], r15
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
setne r15b
test eax, eax
je 0x140001a31
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
setne r15b
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001a82
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x140001afa
test r15b, r15b
je 0x140001ad2
nop word [rax + rax]
lea r9, [rbp - 0x50]
mov r8d, 0x1000
lea rdx, [rbp + 0x9c0]
mov rcx, rbx
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001ad2
mov r8d, dword [rbp - 0x50]
test r8d, r8d
je 0x140001ad2
lea r9, [rbp - 0x4c]
mov qword [rsp + 0x20], r12
lea rdx, [rbp + 0x9c0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140001a90
mov rcx, rsi
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, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movzx eax, r15b
mov r15, qword [rsp + 0x1b18]
mov r14, qword [rsp + 0x1b10]
mov rcx, qword [rbp + 0x19c0]
xor rcx, rsp
call fcn.1400073f0
add rsp, 0x1ad0
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret