Function at 0x14004c2b0
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 rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xb0
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rsp + 0x108], rbx
mov rax, qword [0x1400cfdf0]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r15, r8
mov qword [rbp - 0x19], rdx
mov rdi, rcx
mov qword [rbp - 0x21], rcx
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.CUIPromotion
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rbx, rax
mov qword [rbp - 0x31], rax
test rax, rax
jne 0x14004c325
lea eax, [rbx + 1]
jmp 0x14004c880
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 0x44080000
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rdi]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov r13, rax
test rax, rax
jne 0x14004c366
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor ecx, ecx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [r13 + 2]
jmp 0x14004c880
mov dword [rbp + 7], r12d
lea r9, [rbp + 7]
xor r8d, r8d
lea edx, [r8 + 0x21]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
mov ecx, dword [rbp + 7]
call fcn.14004e500
mov rbx, rax
lea r9, [rbp + 7]
mov r8, rax
mov edx, 0x21
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetQueryOptionW]
xor eax, eax
mov qword [rbp - 0x59], rax
mov rdx, rbx
lea rcx, [rbp - 0x59]
call fcn.140025e50
nop
test rbx, rbx
je 0x14004c3be
mov rcx, rbx
call fcn.14004d92c
mov rcx, qword [rbp - 0x59]
mov ebx, dword [rcx - 0x10]
mov edx, 0x2e
call fcn.140054470
mov rcx, rax
mov rax, qword [rbp - 0x59]
mov esi, 0xffffffff
test rcx, rcx
jne 0x14004c3e4
mov ecx, esi
jmp 0x14004c3ea
sub rcx, rax
sar rcx, 1
sub ebx, ecx
mov r14d, r12d
cmovns r14d, ebx
cmp r14d, dword [rax - 0x10]
jl 0x14004c40c
lea rcx, [rax - 0x18]
call fcn.14001e050
add rax, 0x18
mov qword [rbp - 0x29], rax
jmp 0x14004c463
mov rdi, qword [rax - 0x18]
test rdi, rdi
je 0x14004c42f
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rcx, rdi
call rbx
test rax, rax
jne 0x14004c44c
call fcn.140015220
mov rdi, rax
mov rax, qword [rax]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rcx, rdi
call rbx
mov r9, rax
mov r8d, r14d
mov rdx, qword [rbp - 0x59]
lea rcx, [rbp - 0x29]
call fcn.140025d80
mov rax, qword [rbp - 0x29]
lea r14, [rax - 0x18]
mov eax, esi
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x14004c48f
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rdx, r14
mov rcx, rdi
call rbx
mov rax, qword [r15]
cmp dword [rax - 0x10], 0
jg 0x14004c6da
mov rcx, qword [rbp - 0x59]
mov ebx, dword [rcx - 0x10]
mov edx, 0x5c
call fcn.140054470
mov rcx, rax
mov rax, qword [rbp - 0x59]
test rcx, rcx
jne 0x14004c4bd
mov ecx, esi
jmp 0x14004c4c3
sub rcx, rax
sar rcx, 1
sub ebx, ecx
lea ecx, [rbx - 1]
mov r14d, r12d
test ecx, ecx
cmovns r14d, ecx
mov ecx, dword [rax - 0x10]
mov dword [rbp - 0x51], ecx
cmp r14d, ecx
jl 0x14004c4ef
lea rcx, [rax - 0x18]
call fcn.14001e050
lea rbx, [rax + 0x18]
mov qword [rbp - 0x49], rbx
jmp 0x14004c557
mov rdi, qword [rax - 0x18]
test rdi, rdi
je 0x14004c515
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rcx, rdi
call rbx
mov r9, rax
test rax, rax
jne 0x14004c535
call fcn.140015220
mov rdi, rax
mov rax, qword [rax]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rcx, rdi
call rbx
mov r9, rax
movsxd rax, r14d
movsxd rcx, dword [rbp - 0x51]
sub rcx, rax
mov rax, qword [rbp - 0x59]
lea rdx, [rax + rcx*2]
mov r8d, r14d
lea rcx, [rbp - 0x49]
call fcn.140025d80
mov rbx, qword [rbp - 0x49]
lea rdx, [rbp - 0x49]
mov rcx, r15
call fcn.14001ffb0
nop
lea r14, [rbx - 0x18]
mov eax, esi
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x14004c590
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rdx, r14
mov rcx, rdi
call rbx
mov rcx, qword [rbp - 0x21]
mov rcx, qword [rcx]
mov edi, dword [rcx - 0x10]
mov edx, 0x2f
call fcn.140054470
mov rcx, qword [rbp - 0x21]
mov rbx, qword [rcx]
test rax, rax
jne 0x14004c5b4
mov eax, esi
jmp 0x14004c5ba
sub rax, rbx
sar rax, 1
sub edi, eax
lea eax, [rdi - 1]
mov edi, r12d
test eax, eax
cmovns edi, eax
movsxd r14, dword [rbx - 0x10]
cmp edi, r14d
jl 0x14004c5e3
lea rcx, [rbx - 0x18]
call fcn.14001e050
lea rbx, [rax + 0x18]
mov qword [rbp - 0x41], rbx
jmp 0x14004c608
call fcn.140020870
mov r9, rax
movsxd rax, edi
mov rcx, r14
sub rcx, rax
lea rdx, [rbx + rcx*2]
mov r8d, edi
lea rcx, [rbp - 0x41]
call fcn.140025d80
mov rbx, qword [rbp - 0x41]
lea rdx, [rbp - 0x41]
mov rcx, r15
call fcn.14001ffb0
nop
lea r14, [rbx - 0x18]
mov eax, esi
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x14004c641
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rdx, r14
mov rcx, rdi
call rbx
mov edx, 0x3f
mov rcx, qword [r15]
call fcn.140054470
mov rbx, qword [r15]
test rax, rax
je 0x14004c660
sub rax, rbx
sar rax, 1
test eax, eax
jg 0x14004c663
mov eax, dword [rbx - 0x10]
mov edi, r12d
test eax, eax
cmovns edi, eax
cmp edi, dword [rbx - 0x10]
jl 0x14004c683
lea rcx, [rbx - 0x18]
call fcn.14001e050
lea rbx, [rax + 0x18]
mov qword [rbp - 0x39], rbx
jmp 0x14004c6a1
mov rcx, r15
call fcn.140020870
mov r9, rax
mov r8d, edi
mov rdx, rbx
lea rcx, [rbp - 0x39]
call fcn.140025d80
mov rbx, qword [rbp - 0x39]
lea rdx, [rbp - 0x39]
mov rcx, r15
call fcn.14001ffb0
nop
lea r14, [rbx - 0x18]
mov eax, esi
lock xadd dword [r14 + 0x10], eax
sub eax, 1
jg 0x14004c6da
mov rdi, qword [r14]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
mov rdx, r14
mov rcx, rdi
call rbx
mov rax, qword [r15]
cmp dword [rax - 0x10], 0
jg 0x14004c6fe
call fcn.14006b3fc
movsxd rcx, eax
lea rax, str.CUI_d
lea rdx, [rax + rcx*2]
mov rcx, r15
call fcn.140039f50
mov ecx, 0x100000
call fcn.14004e500
mov r14, rax
test rax, rax
jne 0x14004c72c
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea r12d, [r14 + 4]
jmp 0x14004c851
mov dword [rbp + 0x17], 1
mov qword [rbp + 0xf], r12
lea r8, [0x14009a8f8]
mov rdx, qword [rbp - 0x19]
lea rcx, [rbp - 9]
call fcn.1400262f0
nop
mov r8, r15
mov rdx, rax
lea rcx, [rbp - 0x11]
call fcn.140026200
lea r8, [0x1400992e8]
mov rdx, qword [rax]
lea rcx, [rbp + 0xf]
call fcn.140068b14
mov r15, qword [rbp - 0x11]
mov eax, esi
lock xadd dword [r15 - 8], eax
sub eax, 1
jg 0x14004c79d
mov rdi, qword [r15 - 0x18]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
lea rdx, [r15 - 0x18]
mov rcx, rdi
call rbx
nop
mov r15, qword [rbp - 9]
mov eax, esi
lock xadd dword [r15 - 8], eax
sub eax, 1
jg 0x14004c7cb
mov rdi, qword [r15 - 0x18]
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
lea rdx, [r15 - 0x18]
mov rcx, rdi
call rbx
cmp qword [rbp + 0xf], 0
jne 0x14004c7f5
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call fcn.14004d92c
mov r12d, 3
jmp 0x14004c851
cmp dword [rbp + 0x17], 0
jbe 0x14004c82c
lea r9, [rbp + 0x17]
mov r8d, 0x100000
mov rdx, r14
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetReadFile]
mov ebx, eax
mov r8d, dword [rbp + 0x17]
mov r9, qword [rbp + 0xf]
mov edx, 1
mov rcx, r14
call fcn.1400699ac
test ebx, ebx
jne 0x14004c7f5
mov rcx, qword [rbp + 0xf]
call fcn.140068f88
mov rcx, r14
call fcn.14004d92c
mov rcx, r13
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rbp - 0x31]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
mov r14, qword [rbp - 0x59]
lock xadd dword [r14 - 8], esi
sub esi, 1
jg 0x14004c87d
mov rdi, qword [r14 - 0x18]
mov r8, qword [rdi]
mov rbx, qword [r8 + 8]
mov rcx, rbx
call qword [fcn.14000dba0]
lea rdx, [r14 - 0x18]
mov rcx, rdi
call rbx
mov eax, r12d
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14004e4a0
mov rbx, qword [rsp + 0x108]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret