Function at 0x140001010
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:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x450
mov rax, qword [0x14013f040]
xor rax, rsp
mov qword [rsp + 0x440], rax
xor r9d, r9d
mov dword [rsp + 0x20], 0
mov rbx, rcx
xor r8d, r8d
lea rcx, str.MyAgent
lea edx, [r9 + 1]
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rsi, rax
test rax, rax
jne 0x14000109c
xor r9d, r9d
lea r8, [0x14004b930]
lea rdx, [0x14004b940]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_initialize_WinINet_
call fcn.140001280
lea rdx, [0x140001450]
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 0x14000125d
cmp qword [rbx + 0x18], 0xf
jbe 0x1400010a6
mov rbx, qword [rbx]
mov qword [rsp + 0x28], 0
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], pe_nt_image_headers64
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rbx, rax
test rax, rax
jne 0x14000111d
xor r9d, r9d
lea r8, [0x14004b930]
lea rdx, [0x14004b9a0]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_open_URL_
call fcn.140001280
lea rdx, [0x140001450]
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]
xor al, al
jmp 0x14000125d
cmp qword [0x14013f2b0], 0xf
lea rdx, [0x14004b9dc]
mov qword [rsp + 0x468], rbp
lea rbp, [0x14013f298]
mov rcx, rbp
mov qword [rsp + 0x470], rdi
cmova rcx, qword [0x14013f298]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x1400011d0
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_file_at_path:
call fcn.140001280
cmp qword [0x14013f2b0], 0xf
mov rcx, rax
mov r8, qword [0x14013f2a8]
cmova rbp, qword [0x14013f298]
mov rdx, rbp
call fcn.140001500
lea rdx, [0x140001450]
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 r9d, r9d
lea r8, [0x14004b930]
lea rdx, str.Failed_to_create_file_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x14000124d
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], 0
mov r8d, 0x400
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x140001230
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140001230
mov r8d, eax
lea rcx, [rsp + 0x40]
mov r9, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea r9, [rsp + 0x30]
mov r8d, 0x400
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x1400011f5
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, 1
mov rbp, qword [rsp + 0x468]
mov rdi, qword [rsp + 0x470]
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140048c70
mov rbx, qword [rsp + 0x478]
add rsp, 0x450
pop rsi
ret