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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1060]
mov eax, 0x1160
call fcn.1401205e0
sub rsp, rax
mov rdi, rdx
mov rbx, rcx
xor r15d, r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, str.Downloader
call qword [sym.imp.WININET.dll_InternetOpenW]
mov r14, rax
test rax, rax
jne 0x14003e10f
lea rdx, str.Failed_to_open_Internet_handle.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140051560
lea rdx, [0x140051740]
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 0x14003e418
cmp qword [rbx + 0x18], 0xf
jbe 0x14003e122
mov r9, qword [rbx]
mov rdx, r9
add r9, qword [rbx + 0x10]
jmp 0x14003e12c
mov rdx, rbx
mov r9, qword [rbx + 0x10]
add r9, rbx
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
cmp rdx, r9
jne 0x14003e154
mov eax, 7
mov qword [rsp + 0x48], rax
mov word [rsp + 0x30], r15w
jmp 0x14003e166
sub r9, rdx
lea rcx, [rsp + 0x30]
call fcn.140052c60
mov rax, qword [rsp + 0x48]
lea rdx, [rsp + 0x30]
cmp rax, 7
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetOpenUrlW]
mov rsi, rax
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x14003e1d9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003e1d4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14003e1d4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401200e8
movdqa xmm0, xmmword [0x14015d1a0]
movdqu xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x30], r15w
test rsi, rsi
jne 0x14003e23e
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.140051560
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0xf
jbe 0x14003e213
mov rbx, qword [rbx]
mov rdx, rbx
mov rcx, rax
call fcn.140052db0
lea rdx, [0x140051740]
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, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x14003e418
mov rdx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x14003e24b
mov rdx, qword [rdi]
lea rcx, [rsp + 0x50]
call fcn.140050900
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea r12, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], r12
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rbp - 0x28], 0
jne 0x14003e2d9
lea rdx, str.Failed_to_open_file_for_writing:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140051560
mov r8, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0xf
jbe 0x14003e2a5
mov rdi, qword [rdi]
mov rdx, rdi
mov rcx, rax
call fcn.140052db0
lea rdx, [0x140051740]
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, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
jmp 0x14003e3d3
mov dword [rbp + 0x10a0], r15d
lea r9, [rbp + 0x10a0]
mov r8d, 0x1000
lea rdx, [rbp + 0x60]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x14003e33a
nop
mov eax, dword [rbp + 0x10a0]
test eax, eax
je 0x14003e33a
mov r8d, eax
lea rdx, [rbp + 0x60]
lea rcx, [rsp + 0x50]
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, [rbp + 0x10a0]
mov r8d, 0x1000
lea rdx, [rbp + 0x60]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x14003e300
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::fail_void_const___ptr64]
test al, al
je 0x14003e391
lea rdx, str.Failed_to_write_data_to_file:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140051560
mov r8, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0xf
jbe 0x14003e376
mov rdi, qword [rdi]
mov rdx, rdi
mov rcx, rax
call fcn.140052db0
lea rdx, [0x140051740]
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]
lea rcx, [rsp + 0x58]
call fcn.1400510e0
test rax, rax
jne 0x14003e3bf
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
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, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, r14
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov bl, 1
mov rcx, qword [rsp + 0x50]
movsxd rdx, dword [rcx + 4]
mov qword [rsp + rdx + 0x50], r12
mov rcx, qword [rsp + 0x50]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0xa8]
mov dword [rsp + rdx + 0x4c], r8d
lea rcx, [rsp + 0x58]
call fcn.140050890
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
movzx eax, bl
lea r11, [rsp + 0x1160]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret