Function at 0x140018194
Capabilities:
Check http status code
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
and dword [rsp + 0x20], 0
mov rdi, rdx
mov rbx, rcx
xor edx, edx
lea rcx, str.SedimentPack
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rsi, rax
test rax, rax
jne 0x1400181e9
mov rcx, qword [rsp + 0x68]
lea r8, str.onecoreenduserupgradeenablers_sedimentpackupdater_sedimentpackupdater.cpp
lea edx, [rax + 0x51]
call fcn.140004148
mov ebp, eax
jmp 0x1400183ad
and qword [rsp + 0x28], 0
xor r9d, r9d
mov rdx, qword [rbx]
xor r8d, r8d
mov rcx, rsi
mov dword [rsp + 0x20], 0x80c00000
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rbx, rax
test rax, rax
jne 0x140018219
lea edx, [rax + 0x59]
jmp 0x1400182b1
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x88]
lea r8, [rsp + 0x40]
mov dword [rsp + 0x88], 4
mov edx, 0x20000013
mov rcx, rbx
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x14001824e
lea edx, [rax + 0x62]
jmp 0x1400182b1
cmp dword [rsp + 0x40], 0xc8
je 0x14001827b
mov rcx, qword [rsp + 0x68]
lea r8, str.onecoreenduserupgradeenablers_sedimentpackupdater_sedimentpackupdater.cpp
mov ebp, 0x8007003a
mov edx, 0x63
mov r9d, ebp
call fcn.140004118
jmp 0x140018396
and qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400182c9
lea edx, [rax + 0x6d]
mov rcx, qword [rsp + 0x68]
lea r8, str.onecoreenduserupgradeenablers_sedimentpackupdater_sedimentpackupdater.cpp
call fcn.140004148
mov ebp, eax
jmp 0x140018396
mov ebp, 0x1000
lea rdx, [0x14002df96]
mov ecx, ebp
call fcn.1400198bc
mov r14, rax
test rax, rax
je 0x1400182f3
mov r8d, ebp
xor edx, edx
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
jmp 0x1400182f6
xor r14d, r14d
test r14, r14
jne 0x14001834f
mov ebp, 0x8007000e
lea edx, [r14 + 0x70]
jmp 0x1400183cc
mov r8d, dword [rsp + 0x80]
cmp r8d, ebp
ja 0x1400183ed
test r8d, r8d
je 0x1400183e9
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x1400183e2
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x80], eax
jne 0x1400183c2
lea r9, [rsp + 0x80]
mov r8d, ebp
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140018309
lea edx, [rax + 0x78]
mov rcx, qword [rsp + 0x68]
lea r8, str.onecoreenduserupgradeenablers_sedimentpackupdater_sedimentpackupdater.cpp
call fcn.140004148
mov ebp, eax
mov rcx, r14
call fcn.140018ef0
test rdi, rdi
je 0x140018396
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test rbx, rbx
je 0x1400183a4
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rbx, qword [rsp + 0x70]
mov eax, ebp
mov rbp, qword [rsp + 0x78]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret
mov edx, 0x83
mov ebp, 0x8000ffff
mov rcx, qword [rsp + 0x68]
lea r8, str.onecoreenduserupgradeenablers_sedimentpackupdater_sedimentpackupdater.cpp
mov r9d, ebp
call fcn.140004118
jmp 0x140018380
mov edx, 0x81
jmp 0x14001836d
xor ebp, ebp
jmp 0x140018380
mov edx, 0x79
jmp 0x1400183c7