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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x1140
call fcn.1400bb600
sub rsp, rax
mov rbp, rdx
mov rsi, rcx
xor ebx, ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, str.Downloader
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rdi, rax
test rax, rax
jne 0x14004b8b3
lea rdx, str.Failed_to_open_internet_connection._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140055720
xor al, al
jmp 0x14004ba86
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rbx, rax
test rax, rax
jne 0x14004b917
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.140055720
mov rcx, rax
mov rdx, rsi
call fcn.140055720
mov rcx, rax
lea rdx, reloc.WS2_32.dll_ioctlsocket
call fcn.140055720
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x14004ba86
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.140054780
nop
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
je 0x14004b986
lea rdx, str.Failed_to_open_file:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140055720
mov rcx, rax
mov rdx, rbp
call fcn.140055720
mov rcx, rax
lea rdx, reloc.WS2_32.dll_ioctlsocket
call fcn.140055720
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor bl, bl
jmp 0x14004ba36
lea r9, [rsp + 0x1160]
mov r8d, 0x1000
lea rdx, [rsp + 0x140]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x14004b9f4
nop dword [rax]
mov eax, dword [rsp + 0x1160]
test eax, eax
je 0x14004b9f4
mov r8d, eax
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0x30]
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 + 0x1160]
mov r8d, 0x1000
lea rdx, [rsp + 0x140]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x14004b9b0
lea rcx, [rsp + 0x38]
call fcn.140054e60
test rax, rax
jne 0x14004ba22
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
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, rdi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov bl, 1
mov rcx, qword [rsp + 0x30]
movsxd rdx, dword [rcx + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rdx + 0x30], rax
mov rcx, qword [rsp + 0x30]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0xa8]
mov dword [rsp + rdx + 0x2c], r8d
lea rcx, [rsp + 0x38]
call fcn.140054710
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0xd8]
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 + 0x1140]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret