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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov qword [rsp + 0x70], rax
lea rax, str.upds.azureedge.net
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x70], 0
je 0x1800010b5
xor r9d, r9d
mov r8w, 0x1bb
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov qword [rsp + 0x68], rax
jmp 0x1800010bc
xor eax, eax
jmp 0x1800012c5
cmp qword [rsp + 0x68], 0
je 0x180001102
mov dword [rsp + 0x30], 0x800000
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rsp + 0xa0]
lea rdx, [0x180017438]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x50], rax
jmp 0x180001109
xor eax, eax
jmp 0x1800012c5
cmp qword [rsp + 0x50], 0
je 0x180001143
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [rsp + 0x44], eax
jmp 0x18000114a
xor eax, eax
jmp 0x1800012c5
cmp dword [rsp + 0x44], 0
je 0x180001164
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [rsp + 0x44], eax
jmp 0x18000116b
xor eax, eax
jmp 0x1800012c5
cmp dword [rsp + 0x44], 0
je 0x18000126d
lea rdx, [0x180017440]
mov rcx, qword [rsp + 0xa8]
call fcn.180005bf0
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x18000126d
mov dword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1800011bf
mov dword [rsp + 0x48], 0
mov eax, dword [rsp + 0x40]
inc eax
mov eax, eax
mov ecx, eax
call fcn.18000589c
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x1800011ed
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x48], 0
jmp 0x180001251
mov eax, dword [rsp + 0x40]
inc eax
mov eax, eax
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.180004480
lea r9, [rsp + 0x58]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x18000122c
mov dword [rsp + 0x48], 0
jmp 0x180001247
mov eax, dword [rsp + 0x58]
mov r9, qword [rsp + 0x78]
mov r8d, eax
mov edx, 1
mov rcx, qword [rsp + 0x60]
call fcn.180006880
mov rcx, qword [rsp + 0x60]
call fcn.180005888
cmp dword [rsp + 0x40], 0
jbe 0x180001263
cmp dword [rsp + 0x48], 0
jne 0x18000119b
mov rcx, qword [rsp + 0x78]
call fcn.180005ad0
cmp dword [rsp + 0x44], 0
jne 0x180001288
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error__d_has_occurred._n
call fcn.180002b30
cmp qword [rsp + 0x50], 0
je 0x18000129b
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x68], 0
je 0x1800012ae
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp qword [rsp + 0x70], 0
je 0x1800012c1
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [rsp + 0x48]
add rsp, 0x98
ret