Function at 0x1400356c4
Capabilities:
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:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov rax, qword [0x1400a1df8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rbx, r8
mov r12, rdx
mov r15, rcx
xor edi, edi
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.CUIPromotion
call qword [sym.imp.WININET.dll_InternetOpenW]
mov r14, rax
test rax, rax
jne 0x14003571d
lea eax, [rdi + 1]
jmp 0x140035af8
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0x44080000
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [r15]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rsi, rax
test rax, rax
jne 0x14003575d
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [rsi + 2]
jmp 0x140035af8
mov dword [rbp - 1], edi
lea r9, [rbp - 1]
xor r8d, r8d
lea edx, [r8 + 0x21]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
mov ecx, dword [rbp - 1]
call fcn.1400374f0
mov rdi, rax
lea r9, [rbp - 1]
mov r8, rax
mov edx, 0x21
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
and qword [rbp - 0x39], 0
mov rdx, rdi
lea rcx, [rbp - 0x39]
call fcn.1400067dc
nop
test rdi, rdi
je 0x1400357b3
mov rcx, rdi
call fcn.140036a34
mov rcx, qword [rbp - 0x39]
mov edi, dword [rcx - 0x10]
mov edx, 0x2e
call fcn.14003cfec
test rax, rax
jne 0x1400357ce
or eax, 0xffffffff
jmp 0x1400357d5
sub rax, qword [rbp - 0x39]
sar rax, 1
sub edi, eax
mov r8d, edi
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 0x39]
call fcn.14001cb0c
mov rdx, qword [rbp - 0x31]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14003580f
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
mov rax, qword [rbx]
cmp dword [rax - 0x10], 0
jg 0x14003595d
mov rcx, qword [rbp - 0x39]
mov edi, dword [rcx - 0x10]
mov edx, 0x5c
call fcn.14003cfec
test rax, rax
jne 0x140035837
or eax, 0xffffffff
jmp 0x14003583e
sub rax, qword [rbp - 0x39]
sar rax, 1
sub edi, eax
lea r8d, [rdi - 1]
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x39]
call fcn.14001d694
nop
mov rdx, rax
mov rcx, rbx
call fcn.140013330
nop
mov rdx, qword [rbp - 0x29]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140035886
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
mov rcx, qword [r15]
mov edi, dword [rcx - 0x10]
mov edx, 0x2f
call fcn.14003cfec
test rax, rax
jne 0x1400358a0
or eax, 0xffffffff
jmp 0x1400358a6
sub rax, qword [r15]
sar rax, 1
sub edi, eax
lea r8d, [rdi - 1]
lea rdx, [rbp - 0x21]
mov rcx, r15
call fcn.14001d694
nop
mov rdx, rax
mov rcx, rbx
call fcn.140013330
nop
mov rdx, qword [rbp - 0x21]
add rdx, 0xffffffffffffffe8
or r15d, 0xffffffff
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x1400358f3
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
mov edx, 0x3f
mov rcx, qword [rbx]
call fcn.14003cfec
mov rcx, qword [rbx]
test rax, rax
je 0x140035912
sub rax, rcx
sar rax, 1
test eax, eax
jg 0x140035915
mov eax, dword [rcx - 0x10]
mov r8d, eax
lea rdx, [rbp - 0x19]
mov rcx, rbx
call fcn.14001cb0c
nop
mov rdx, rax
mov rcx, rbx
call fcn.140013330
nop
mov rdx, qword [rbp - 0x19]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140035961
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
jmp 0x140035961
or r15d, 0xffffffff
mov rax, qword [rbx]
cmp dword [rax - 0x10], 0
jg 0x140035985
call fcn.1400565b4
movsxd rcx, eax
lea rax, str.CUI_d
lea rdx, [rax + rcx*2]
mov rcx, rbx
call fcn.140027148
mov ecx, 0x100000
call fcn.1400374f0
mov rdi, rax
test rax, rax
jne 0x1400359b1
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea ebx, [rdi + 4]
jmp 0x140035acc
mov dword [rbp + 0xf], 1
and qword [rbp + 7], 0
lea r8, [0x14007ce60]
mov rdx, r12
lea rcx, [rbp - 9]
call fcn.1400133b8
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 0x11]
call fcn.140018fc8
lea r8, [0x14007cbd0]
mov rdx, qword [rax]
lea rcx, [rbp + 7]
call fcn.140053cf0
mov rdx, qword [rbp - 0x11]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140035a1e
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
nop
mov rdx, qword [rbp - 9]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140035a48
lfence
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140078a80]
cmp qword [rbp + 7], 0
jne 0x140035a70
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call fcn.140036a34
mov ebx, 3
jmp 0x140035acc
cmp dword [rbp + 0xf], 0
jbe 0x140035aa7
lea r9, [rbp + 0xf]
mov r8d, 0x100000
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
mov r8d, dword [rbp + 0xf]
mov r9, qword [rbp + 7]
mov edx, 1
mov rcx, rdi
call fcn.140054b78
test ebx, ebx
jne 0x140035a70
mov rcx, qword [rbp + 7]
call fcn.140054154
mov rcx, rdi
call fcn.140036a34
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor ebx, ebx
mov rdx, qword [rbp - 0x39]
add rdx, 0xffffffffffffffe8
mov ecx, r15d
lock xadd dword [rdx + 0x10], ecx
add ecx, r15d
test ecx, ecx
jg 0x140035af6
lfence
mov rcx, qword [rdx]
mov r8, qword [rcx]
mov rax, qword [r8 + 8]
call qword [0x140078a80]
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140037490
add rsp, 0x90
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret