Function at 0x140015360
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get common file path
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x348]
sub rsp, 0x448
mov rax, qword [0x1400213f8]
xor rax, rsp
mov qword [rbp + 0x330], rax
xorps xmm0, xmm0
mov qword [rsp + 0x58], rdx
mov rdx, qword [rbp + 0x3b8]
xor r15d, r15d
mov r14, rcx
mov qword [rsp + 0x48], rcx
mov rcx, qword [rbp + 0x3b0]
mov rax, r9
mov rbx, r8
mov qword [rbp - 0x80], rcx
mov qword [rbp - 0x78], rdx
lea rcx, [rbp - 0x60]
mov r12, 0xffffffffffffffff
mov qword [rsp + 0x70], rbx
mov edx, 0x80
mov qword [rsp + 0x68], r15
mov r9, r12
mov r8, rax
mov r13d, r15d
mov edi, r15d
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
movups xmmword [rbp + 0x10], xmm0
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
lea rax, [rbp - 0x60]
mov rdx, r12
nop
inc rdx
cmp byte [rax + rdx], dil
jne 0x140015410
movzx eax, byte [rbp - 0x60]
test rdx, rdx
mov ecx, 0x78
mov dword [rsp + 0x20], r15d
cmove eax, ecx
xor r9d, r9d
xor r8d, r8d
mov byte [rbp - 0x60], al
xor edx, edx
lea rcx, str.openvpn_gui_1.0
call qword [sym.imp.WININET.dll_InternetOpenW]
mov qword [rbp - 0x70], rax
mov rsi, rax
test rax, rax
jne 0x14001545e
mov rcx, r14
call fcn.140016110
jmp 0x1400156d5
mov r9d, 4
mov dword [rsp + 0x50], 0x7530
lea r8, [rsp + 0x50]
mov rcx, rsi
lea edx, [r9 - 2]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
mov r9d, 4
lea r8, [rsp + 0x50]
mov rcx, rsi
lea edx, [r9 + 2]
call qword [sym.imp.WININET.dll_InternetSetOptionW]
mov edx, 0x7f02
xor ecx, ecx
call qword [sym.imp.USER32.dll_LoadCursorW]
mov rcx, rax
call qword [sym.imp.USER32.dll_SetCursor]
mov rax, qword [rsp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 3
movzx r8d, word [rax]
lea rcx, [rax + 4]
mov qword [rsp + 0x78], rcx
mov rdx, rcx
mov rcx, rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.WININET.dll_InternetConnectW]
mov qword [rsp + 0x68], rax
mov r10, rax
test rax, rax
jne 0x1400154fe
mov rcx, r14
call fcn.140016110
jmp 0x1400156d5
mov rcx, qword [rsp + 0x58]
mov eax, 0x80000000
mov qword [rsp + 0x38], r15
mov edx, 0x80800000
cmp dword [rcx + 0x1104], edi
lea r8, [rcx + 0x804]
mov rcx, r10
cmovne eax, edx
xor r9d, r9d
mov dword [rsp + 0x30], eax
xor edx, edx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.WININET.dll_HttpOpenRequestW]
mov r13, rax
test rax, rax
jne 0x140015553
mov rcx, r14
call fcn.140016110
jmp 0x1400156d5
test rdi, rdi
je 0x140015564
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, r15
mov r9, r12
inc r9
cmp byte [rbx + r9], r15b
jne 0x140015567
mov r8, rbx
mov edx, 0x1c
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetSetOptionA]
lea rax, [rbp - 0x60]
mov r9, r12
nop dword [rax + rax]
inc r9
cmp byte [rax + r9], r15b
jne 0x140015590
lea r8, [rbp - 0x60]
mov edx, 0x1d
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetSetOptionA]
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x1400156bd
lea r9, [rsp + 0x60]
mov dword [rsp + 0x44], r15d
lea r8, [rsp + 0x44]
mov dword [rsp + 0x60], 4
mov edx, 0x20000013
mov qword [rsp + 0x20], r15
mov rcx, r13
call qword [sym.imp.WININET.dll_HttpQueryInfoW]
mov eax, dword [rsp + 0x44]
mov rsi, r15
cmp eax, 0xc8
je 0x14001560c
cmp eax, 0x191
jne 0x14001582e
mov ebx, 0x10000
mov ecx, 1
lea edx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rdi, rax
mov r14, rax
test rax, rax
je 0x140015801
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], r15d
mov r8d, ebx
mov rdx, rax
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1400156bd
nop dword [rax + rax]
mov eax, dword [rsp + 0x40]
add rax, rsi
mov byte [rax + rdi], r15b
mov ecx, dword [rsp + 0x40]
test ecx, ecx
je 0x140015738
lea rax, [rsi + rcx]
cmp rax, rbx
jb 0x140015697
add rbx, 0x10000
mov rcx, rdi
lea rdx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
test rax, rax
je 0x1400157f8
mov ecx, dword [rsp + 0x40]
mov r14, rax
mov eax, ecx
lea r9, [rsp + 0x40]
add rsi, rax
mov dword [rsp + 0x40], r15d
mov r8d, 0x10000
mov rcx, r13
lea rdx, [rsi + rdi]
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140015650
mov rcx, qword [rsp + 0x48]
call fcn.140016110
test rdi, rdi
je 0x1400156d5
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
lea rdi, [rbp - 0x60]
mov ecx, 0x80
rep stosb byte [rdi], al
test r13, r13
je 0x1400156f0
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x140015703
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x140015712
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, r15d
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.140016590
add rsp, 0x448
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, str._Message_CRV1:
mov rcx, rdi
call sub.VCRUNTIME140.dll_strstr
lea rdx, str.__Message_
mov rcx, rdi
mov r14, rax
call sub.VCRUNTIME140.dll_strstr
mov rcx, rax
mov eax, dword [rsp + 0x44]
cmp eax, 0x191
jne 0x14001582e
test r14, r14
je 0x140015835
test rcx, rcx
je 0x140015835
mov edx, 0x30
mov byte [rcx], r15b
lea ecx, [rdx - 0x2f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rbx, rax
test rax, rax
je 0x1400156c7
lea rcx, [r14 + 0xe]
mov rdx, rax
call fcn.14000c170
test eax, eax
je 0x140015822
mov r8, rbx
lea rdx, [0x140015190]
mov ecx, 0xbe
call fcn.140003d40
cmp rax, 1
jne 0x140015822
mov rax, qword [rbx + 0x28]
lea r8, str.CRV1::_s::_s
mov r9, qword [rbx + 0x18]
lea rcx, [rbp - 0x60]
mov edx, 0x80
mov qword [rsp + 0x20], rax
call fcn.140006070
mov rcx, rbx
call fcn.14000c0d0
mov rbx, qword [rsp + 0x70]
jmp 0x140015553
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x48]
lea r8, [0x140018d88]
xor r9d, r9d
lea rdx, str.Out_of_memory
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1400156d5
mov rcx, rbx
call fcn.14000c0d0
mov eax, dword [rsp + 0x44]
cmp eax, 0xc8
je 0x140015863
mov rdx, qword [rsp + 0x48]
lea rcx, str.HTTP_error
mov qword [rsp + 0x28], rcx
lea r8, [0x140018d88]
xor ecx, ecx
mov dword [rsp + 0x20], eax
mov r9d, 0x193
call fcn.140003f90
jmp 0x1400156c7
mov rbx, qword [rsp + 0x58]
nop dword [rax + rax]
inc r12
cmp byte [rbx + r12 + 0x1004], r15b
jne 0x140015870
test r12, r12
je 0x1400158ee
lea r9, [rsp + 0x58]
mov dword [rsp + 0x58], 0x100
lea r8, [rbp + 0x20]
mov qword [rsp + 0x20], r15
mov edx, 1
mov rcx, r13
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x1400158bf
lea rdx, [rbp + 0x20]
lea rcx, [rbx + 0x1004]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1400158ee
mov rdx, qword [rsp + 0x48]
lea rax, str.HTTP_content_type_mismatch
mov qword [rsp + 0x28], rax
lea r8, [0x140018d88]
mov r9d, 0x193
mov qword [rsp + 0x20], r15
xor ecx, ecx
call fcn.140003f90
jmp 0x1400156c7
xor edx, edx
lea rcx, [rbp + 0x120]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov rcx, rdi
call fcn.140006e70
mov rbx, rax
test rax, rax
jne 0x140015933
mov rcx, qword [rsp + 0x48]
lea r8, [0x140018d88]
xor r9d, r9d
lea rdx, str.Failed_to_convert_profile_content_to_wchar
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1400156c7
mov rdx, qword [rsp + 0x78]
lea r8, [rbp + 0x120]
mov r9d, 0x104
mov rcx, rbx
call fcn.140015a30
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rbp - 0x80]
mov r14, qword [rbp - 0x78]
mov rdx, rbx
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140015a05
mov eax, eax
cmp rax, r14
ja 0x140015a05
lea rax, [rbp + 0x120]
mov r9, rbx
lea r8, str._s_s
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, rbx
call fcn.140002a20
lea rdx, [0x14001b590]
mov word [rbx + r14*2 - 2], r15w
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov rbx, rax
test rax, rax
jne 0x1400159dd
mov rcx, qword [rsp + 0x48]
lea r8, [0x140018d88]
xor r9d, r9d
lea rdx, str.Unable_to_save_downloaded_profile
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1400156c7
mov r9, rbx
mov r8, rsi
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov r15d, 1
jmp 0x1400156c7
mov rcx, qword [rsp + 0x48]
lea r8, [0x140018d88]
xor r9d, r9d
lea rdx, str.Failed_to_get_TMP_path
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1400156c7