Function at 0x140002cc0
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4a0]
sub rsp, 0x5a0
mov rax, qword [0x14006cfd8]
xor rax, rsp
mov qword [rbp + 0x490], rax
mov r12, rdx
mov rbx, rcx
xor r13d, r13d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 1]
lea rcx, str.Downloader
call qword [sym.imp.WININET.dll_InternetOpenW]
mov rsi, rax
test rax, rax
je 0x140002f62
mov edi, dword [rbx + 0x10]
mov r8, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140002d31
mov r8, qword [rbx]
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
lea r9d, [rdi + 1]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd r15, eax
mov eax, 2
mul r15
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14002baa4
mov r14, rax
cmp qword [rbx + 0x18], 0x10
jb 0x140002d74
mov rbx, qword [rbx]
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r14
lea r9d, [rdi + 1]
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rdx, r14
lea rcx, [rsp + 0x30]
call fcn.140006aa0
mov rcx, r14
call fcn.14002ba60
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 8
cmovae rdx, qword [rsp + 0x30]
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 0x84000100
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rbx, rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x140002e16
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002e11
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002fde
call fcn.14002ba60
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r13w
test rbx, rbx
je 0x140002f59
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x80]
call fcn.14002e0e0
mov rdx, r12
lea rcx, [rbp - 0x80]
call fcn.1400064e0
nop
lea r9, [rsp + 0x78]
mov r8d, 0x400
lea rdx, [rbp + 0x90]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x140002eaa
mov eax, dword [rsp + 0x78]
test eax, eax
je 0x140002eaa
mov r8d, eax
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x80]
call fcn.140006880
lea r9, [rsp + 0x78]
mov r8d, 0x400
lea rdx, [rbp + 0x90]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140002e70
lea rcx, [rbp - 0x78]
call fcn.140007390
test rax, rax
jne 0x140002ee8
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov eax, 6
cmp qword [rbp + rcx - 0x38], 0
mov edx, 2
cmovne eax, edx
or eax, dword [rbp + rcx - 0x70]
and eax, 0x17
mov dword [rbp + rcx - 0x70], eax
and eax, dword [rbp + rcx - 0x6c]
jne 0x140002f8c
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x78]
call fcn.140006430
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rax
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x28], rax
lea rcx, [rbp + 0x28]
call fcn.14002b19c
nop
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rbp + 0x490]
xor rcx, rsp
call fcn.14002ba40
mov rbx, qword [rsp + 0x5f0]
add rsp, 0x5a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
test al, 4
je 0x140002f99
lea rbx, str.ios_base::badbit_set
jmp 0x140002fad
test dl, al
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.1400013d0
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140001f60
lea rdx, [0x14006a738]
lea rcx, [rsp + 0x50]
call fcn.14002e468
nop
call fcn.140033fd8
int3