Function at 0x140003710
Capabilities:
Check internet connectivity via wininet
Create http request
Delete file
Download and write a file
Get http content length
Move file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
mov eax, 0x80f8
call fcn.140032300
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x8040], 0xfffffffffffffffe
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x8010], 0
mov dword [rbp + 0x800c], 0
mov dword [rbp + 0x7ffc], 4
lea rcx, [rbp + 0x7ff8]
xor edx, edx
call qword [sym.imp.WININET.dll_InternetGetConnectedState]
mov edx, dword [rbp + 0x7ff8]
test dl, 0x20
jne 0x140003929
not edx
and edx, 4
mov dword [rsp + 0x20], 0
lea rcx, str.Overlunky_Updater
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.WININET.dll_InternetOpenA]
test rax, rax
je 0x14000398f
mov rbx, rax
lea rdi, str.Accept:___r_n_r_n
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x84000100
mov rcx, rbx
mov rdx, rsi
mov r8, rdi
mov r9d, eax
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
test rax, rax
je 0x1400039f2
mov qword [rbp + 0x8038], r14
mov qword [rbp + 0x7ff0], rax
mov qword [rbp + 0x8000], rbx
lea rsi, str.Overlunky.exe.old
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
lea rcx, [0x14003799b]
mov rdx, rsi
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rbp + 0x8038]
mov qword [rbp + 0x7fb0], rax
mov qword [rbp + 0x7fd0], 0xc
lea rax, [rbp + 0x7fb0]
mov qword [rbp + 0x7fd8], rax
lea rax, str._info__AutoUpdate:_Downloading_..._n
mov qword [rbp + 0x7fe0], rax
mov qword [rbp + 0x7fe8], 0x25
lea rcx, [rbp + 0x7fe0]
lea rdx, [rbp + 0x7fd0]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
lea r8, [0x140037c3f]
lea rcx, [rbp + 0x8010]
mov rdx, qword [rbp + 0x8038]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x140003a85
mov rcx, qword [rbp + 0x8000]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x8018], 0
lea rax, [rbp - 0x50]
mov qword [rbp + 0x8020], rax
lea rax, str._info__AutoUpdate:_Cant_write_new_file_n
mov qword [rbp + 0x8028], rax
mov qword [rbp + 0x8030], 0x28
lea rcx, [rbp + 0x8028]
lea rdx, [rbp + 0x8018]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140003a5c
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x8018], 0
lea rax, [rbp - 0x50]
mov qword [rbp + 0x8020], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_the_internet_n
mov qword [rbp + 0x8028], rax
mov qword [rbp + 0x8030], 0x31
lea rcx, [rbp + 0x8028]
lea rdx, [rbp + 0x8018]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140003a5c
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x8018], 0
lea rax, [rbp - 0x50]
mov qword [rbp + 0x8020], rax
lea rax, str._info__AutoUpdate:_Cant_connect_to_github_n
mov qword [rbp + 0x8028], rax
mov qword [rbp + 0x8030], 0x2b
lea rcx, [rbp + 0x8028]
lea rdx, [rbp + 0x8018]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140003a5c
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x8018], 0
lea rax, [rbp - 0x50]
mov qword [rbp + 0x8020], rax
lea rax, str._info__AutoUpdate:_Cant_get_release_information_from_github_n
mov qword [rbp + 0x8028], rax
mov qword [rbp + 0x8030], 0x3d
lea rcx, [rbp + 0x8028]
lea rdx, [rbp + 0x8018]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov dword [rbp + 0x8038], 0
mov eax, dword [rbp + 0x8038]
add rsp, 0x80f8
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
mov qword [rsp + 0x20], 0
lea r8, [rbp + 0x800c]
lea r9, [rbp + 0x7ffc]
mov r15, qword [rbp + 0x7ff0]
mov rcx, r15
mov edx, 0x20000005
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x140003abf
mov dword [rbp + 0x800c], 0
lea rsi, [rbp - 0x50]
lea rdi, [rbp + 0x8008]
mov rbx, qword [sym.imp.WININET.dll_InternetReadFile]
mov r14, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
nop dword [rax + rax]
mov rcx, r15
mov rdx, rsi
mov r8d, 0x8000
mov r9, rdi
call rbx
test eax, eax
je 0x140003b50
mov r8d, dword [rbp + 0x8008]
test r8, r8
je 0x140003b1c
mov r9, qword [rbp + 0x8010]
mov edx, 1
mov rcx, rsi
call r14
cmp dword [rbp + 0x8008], 0
jne 0x140003ae0
mov rcx, qword [rbp + 0x8010]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rcx, qword [rbp + 0x8010]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp + 0x8000]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, 1
mov dword [rbp + 0x8038], eax
jmp 0x140003a6f
mov rcx, qword [rbp + 0x8010]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp + 0x8000]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov qword [rbp + 0x8028], 0
lea rax, [rbp + 0x8018]
mov qword [rbp + 0x8030], rax
lea rax, str._info__AutoUpdate:_Cant_read_file_from_github_n
mov qword [rbp + 0x7fc0], rax
mov qword [rbp + 0x7fc8], 0x2f
lea rcx, [rbp + 0x7fc0]
lea rdx, [rbp + 0x8028]
call fcn.140019260
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x140003a5c