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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov rax, qword [0x140284010]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r14, rdx
mov rbx, rcx
xor r15b, r15b
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.WinHTTP_Download_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r13, rax
test rax, rax
je 0x14004480c
mov rsi, qword [rbx + 0x10]
mov rcx, rbx
mov rdi, qword [rbx + 0x18]
cmp rdi, 0x10
jb 0x140044480
mov rcx, qword [rbx]
mov qword [rsp + 0x20], 1
lea r9, [0x1402783b4]
mov r8d, 7
mov rdx, rsi
call fcn.140050680
mov r8, rax
mov qword [rbp - 0x69], r12
mov qword [rbp - 0x59], r12
mov qword [rbp - 0x51], send
mov byte [rbp - 0x69], r12b
cmp rsi, 7
jb 0x14004483d
lea rcx, [rsi - 7]
add rax, 0xfffffffffffffff9
cmp rcx, rax
cmovb r8, rsi
sub r8, 7
mov rdx, rbx
cmp rdi, 0x10
jb 0x1400444de
mov rdx, qword [rbx]
add rdx, 7
lea rcx, [rbp - 0x69]
call fcn.14003cd20
nop
lea rdx, [rbp - 0x69]
lea rcx, [rbp - 0x29]
call fcn.140043830
cmp qword [rax + 0x18], 8
jb 0x140044503
mov rax, qword [rax]
mov r8d, 0x50
xor r9d, r9d
mov rdx, rax
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r12, rax
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x14004455e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140044559
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140044559
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005a61c
xor edi, edi
mov qword [rbp - 0x19], rdi
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], di
mov rdx, qword [rbp - 0x51]
cmp rdx, 0x10
jb 0x1400445ae
inc rdx
mov rcx, qword [rbp - 0x69]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400445a9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400445a9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005a61c
mov qword [rbp - 0x59], rdi
mov qword [rbp - 0x51], send
mov byte [rbp - 0x69], 0
test r12, r12
je 0x140044803
mov rdi, qword [rbx + 0x10]
mov rcx, rbx
mov rsi, qword [rbx + 0x18]
cmp rsi, 0x10
jb 0x1400445db
mov rcx, qword [rbx]
mov qword [rsp + 0x20], 1
lea r9, [0x1402783b4]
mov r8d, 7
mov rdx, rdi
call fcn.140050680
xor ecx, ecx
mov qword [rbp - 0x49], rcx
mov qword [rbp - 0x39], rcx
mov qword [rbp - 0x31], send
mov byte [rbp - 0x49], cl
cmp rdi, rax
jb 0x140044837
sub rdi, rax
mov r8, 0xffffffffffffffff
cmp rdi, r8
cmovb r8, rdi
cmp rsi, 0x10
jb 0x140044631
mov rbx, qword [rbx]
lea rdx, [rbx + rax]
lea rcx, [rbp - 0x49]
call fcn.14003cd20
nop
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 9]
call fcn.140043830
cmp qword [rax + 0x18], 8
jb 0x140044656
mov rax, qword [rax]
xor ebx, ebx
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, rax
lea rdx, [0x140278578]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x1400446c2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400446bd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400446bd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005a61c
mov qword [rbp + 7], rbx
mov qword [rbp + 0xf], 7
mov word [rbp - 9], bx
mov rdx, qword [rbp - 0x31]
cmp rdx, 0x10
jb 0x140044710
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004470b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004470b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005a61c
mov qword [rbp - 0x39], rbx
mov qword [rbp - 0x31], send
mov byte [rbp - 0x49], 0
test rdi, rdi
je 0x1400447fa
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x1400447f1
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x1400447f1
cmp qword [r14 + 0x18], 0x10
jb 0x14004476c
mov r14, qword [r14]
lea rdx, [0x1402785e4]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
test rax, rax
je 0x1400447f1
mov dword [rbp + 0x17], ebx
mov dword [rbp + 0x1b], ebx
nop word [rax + rax]
lea rdx, [rbp + 0x17]
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov ecx, dword [rbp + 0x17]
inc ecx
call fcn.14005a960
mov rbx, rax
lea r9, [rbp + 0x1b]
mov r8d, dword [rbp + 0x17]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1400447d7
mov r8d, dword [rbp + 0x1b]
mov r9, rsi
mov edx, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call fcn.14005a61c
cmp dword [rbp + 0x17], 0
ja 0x140044790
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov r15b, 1
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r12
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
movzx eax, r15b
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14005a2a0
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.14003ceb0
int3
call fcn.14003ceb0
int3