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

Disassembly:
push rbx
push rbp
mov eax, 0x1098
call fcn.1400042f0
sub rsp, rax
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x1060], rax
xor ebx, ebx
lea rcx, str.File_Downloader_1.0
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor r8d, r8d
xor edx, edx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov rbp, rax
test rax, rax
je 0x1400015da
mov r8d, 0x1bb
mov qword [rsp + 0x1088], r14
xor r9d, r9d
lea rdx, str.github.com
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
jne 0x140001332
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x1400015d2
mov dword [rsp + 0x30], 0x800000
lea r8, str.nonglext_nonware_releases_download_non_nonware.rar
mov qword [rsp + 0x28], rbx
lea rdx, [0x140005668]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov rcx, r14
mov qword [rsp + 0x10b0], rsi
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
test rax, rax
je 0x140001624
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], ebx
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], ebx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x14000161b
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x14000161b
lea rax, [rsp + 0x50]
mov qword [rsp + 0x10c0], r12
mov qword [rsp + 0x28], rbx
lea r9, [rsp + 0x4c]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x20000005
mov qword [rsp + 0x1090], r13
mov rcx, rsi
mov dword [rsp + 0x4c], ebx
mov r12d, ebx
mov dword [rsp + 0x50], 4
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov r13d, dword [rsp + 0x4c]
lea r8, [0x140005670]
lea rdx, str.nonware.rar
mov qword [rsp + 0x40], rbx
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
test eax, eax
jne 0x1400015f4
cmp qword [rsp + 0x40], rbx
je 0x1400015f4
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], ebx
mov r8d, 0x1000
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x14000157f
mov qword [rsp + 0x10b8], rdi
movaps xmmword [rsp + 0x1070], xmm6
movsd xmm6, qword [0x1400059f8]
mov qword [rsp + 0x1080], r15
nop word [rax + rax]
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x140001567
mov r9, qword [rsp + 0x40]
lea rcx, [rsp + 0x60]
mov r8d, eax
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add r12d, dword [rsp + 0x48]
lea rdx, [0x140005624]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
xorps xmm1, xmm1
mov eax, r12d
xorps xmm0, xmm0
cvtsi2sd xmm0, r13
cvtsi2sd xmm1, rax
divsd xmm1, xmm0
mulsd xmm1, xmm6
cvttsd2si r15d, xmm1
call fcn.1400027c0
mov eax, r15d
cdq
sub eax, edx
sar eax, 1
mov edi, eax
cmp ebx, edi
jge 0x1400014e3
lea rdx, str.___
jmp 0x1400014f3
lea rdx, [0x14000562c]
je 0x1400014f3
lea rdx, [0x140005630]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400027c0
inc ebx
cmp ebx, 0x32
jl 0x1400014d6
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x140005638]
call fcn.1400027c0
mov rcx, rax
mov edx, r15d
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___int____ptr64]
mov rcx, rax
lea rdx, [0x140005634]
call fcn.1400027c0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::flush_void____ptr64]
lea r9, [rsp + 0x48]
mov r8d, 0x1000
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov ebx, 0
test eax, eax
jne 0x140001470
mov r15, qword [rsp + 0x1080]
mov rdi, qword [rsp + 0x10b8]
movaps xmm6, xmmword [rsp + 0x1070]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str._nDownload_completed_successfully__n
call fcn.1400027c0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov al, 1
mov r12, qword [rsp + 0x10c0]
mov r13, qword [rsp + 0x1090]
mov rsi, qword [rsp + 0x10b0]
mov r14, qword [rsp + 0x1088]
mov rcx, qword [rsp + 0x1060]
xor rcx, rsp
call fcn.140003490
add rsp, 0x1098
pop rbp
pop rbx
ret
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_open_the_file_for_writing_
call fcn.1400027c0
mov rcx, rax
lea rdx, [0x140002990]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x1400015ba
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, rbp
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor al, al
jmp 0x1400015ca