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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x480]
sub rsp, 0x580
mov rax, qword [0x140014040]
xor rax, rsp
mov qword [rbp + 0x470], rax
mov r14, rdx
mov rbx, rcx
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, str.Download
call qword [sym.imp.WININET.dll_InternetOpenA]
mov r15, rax
test rax, rax
jne 0x14000252a
lea rdx, str.Failed_to_initialize_WinINet.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140009d20
lea rdx, [0x140009f00]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor al, al
jmp 0x140002846
lea rax, [rbx + 0x10]
mov rax, qword [rax]
cmp qword [rbx + 0x18], 7
jbe 0x140002544
mov rcx, qword [rbx]
mov rbx, rcx
lea rsi, [rcx + rax*2]
jmp 0x140002548
lea rsi, [rbx + rax*2]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], r12
mov edi, 0xf
mov qword [rsp + 0x50], rdi
cmp rbx, rsi
jne 0x14000256e
mov byte [rsp + 0x38], r12b
jmp 0x140002664
sub rsi, rbx
sar rsi, 1
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x140002871
cmp rsi, rdi
jbe 0x140002626
mov rdi, rsi
or rdi, 0xf
cmp rdi, rax
jbe 0x1400025d9
mov rdi, rax
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.14000b0d0
mov rcx, rax
test rax, rax
je 0x140002837
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x14000262b
mov eax, 0x16
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
test rcx, rcx
jne 0x1400025fd
mov rax, r12
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x14000262b
cmp rcx, 0x1000
jb 0x140002615
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002877
jmp 0x1400025ad
call fcn.14000b0d0
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x14000262b
mov rax, qword [rsp + 0x38]
lea r8, [rsp + 0x38]
cmp rdi, 0xf
cmova r8, rax
mov rcx, r8
mov rdx, rsi
test rsi, rsi
je 0x140002656
movzx eax, byte [rbx]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rbx, [rbx + 2]
sub rdx, 1
jne 0x140002643
mov qword [rsp + 0x48], rsi
mov byte [r8 + rsi], r12b
mov rdi, qword [rsp + 0x50]
lea rdx, [rsp + 0x38]
cmp rdi, 0xf
cmova rdx, qword [rsp + 0x38]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rbx, rax
test rax, rax
jne 0x1400026c5
lea rdx, str.Failed_to_open_URL.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140009d20
lea rdx, [0x140009f00]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140002803
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
cmp qword [r14 + 0x18], 7
jbe 0x1400026e1
mov r14, qword [r14]
mov rdx, r14
lea rcx, [rsp + 0x60]
call fcn.1400096a0
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
cmp qword [rbp - 0x18], 0
jne 0x140002759
lea rdx, str.Failed_to_create_file.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140009d20
lea rdx, [0x140009f00]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
jmp 0x1400027f8
mov dword [rsp + 0x30], r12d
lea r9, [rsp + 0x30]
mov r8d, 0x400
lea rdx, [rbp + 0x70]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1400027b6
nop word [rax + rax]
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x1400027b6
mov r8d, eax
lea rdx, [rbp + 0x70]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
lea r9, [rsp + 0x30]
mov r8d, 0x400
lea rdx, [rbp + 0x70]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x140002780
lea rcx, [rsp + 0x68]
call fcn.1400095e0
test rax, rax
jne 0x1400027e4
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r15
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov bl, 1
lea rcx, [rsp + 0x60]
call fcn.140002880
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x140002843
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000283e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000283e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b41c
movzx eax, bl
mov rcx, qword [rbp + 0x470]
xor rcx, rsp
call fcn.14000b0b0
lea r11, [rsp + 0x580]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.1400022a0
int3
call fcn.140002200
int3