Function at 0x1400182c0
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 + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x488
mov rax, qword [0x140089080]
xor rax, rsp
mov qword [rsp + 0x470], rax
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 1
lea rcx, str.MyApp
call qword [sym.imp.WININET.dll_InternetOpenA]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140018341
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.140014490
mov qword [rsp + 0x48], rax
lea rdx, [0x140015a40]
mov rcx, qword [rsp + 0x48]
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 0x140018481
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x490]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x1400183b4
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.140014490
mov qword [rsp + 0x50], rax
lea rdx, [0x140015a40]
mov rcx, qword [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__::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, qword [rsp + 0x30]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x140018481
lea rdx, [0x14006dd14]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x14001841a
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.140014490
mov qword [rsp + 0x58], rax
lea rdx, [0x140015a40]
mov rcx, qword [rsp + 0x58]
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, qword [rsp + 0x38]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x140018481
lea r9, [rsp + 0x60]
mov r8d, 0x400
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x14001845e
cmp dword [rsp + 0x60], 0
jbe 0x14001845e
mov eax, dword [rsp + 0x60]
mov r9, qword [rsp + 0x40]
mov r8d, eax
mov edx, 1
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
jmp 0x14001841a
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, 1
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.14006a5b0
add rsp, 0x488
ret