Function at 0x140009060
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 [0x1400a7080]
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 0x1400090ea
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.1400120b0
lea rdx, [0x1400126b0]
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 0x14000943c
lea rax, [rbx + 0x10]
mov rax, qword [rax]
cmp qword [rbx + 0x18], 7
jbe 0x140009104
mov rcx, qword [rbx]
mov rbx, rcx
lea rsi, [rcx + rax*2]
jmp 0x140009108
lea rsi, [rbx + rax*2]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], r12
mov edi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x50], rdi
cmp rbx, rsi
jne 0x14000912e
mov byte [rsp + 0x38], r12b
jmp 0x140009224
sub rsi, rbx
sar rsi, 1
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x140009467
cmp rsi, rdi
jbe 0x1400091e6
mov rdi, rsi
or rdi, 0xf
cmp rdi, rax
jbe 0x140009199
mov rdi, rax
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140082b20
mov rcx, rax
test rax, rax
je 0x14000942d
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x1400091eb
mov eax, reloc.WLDAP32.dll_Ordinal_22
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
test rcx, rcx
jne 0x1400091bd
mov rax, r12
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x1400091eb
cmp rcx, 0x1000
jb 0x1400091d5
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000946d
jmp 0x14000916d
call fcn.140082b20
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x50], rdi
jmp 0x1400091eb
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 0x140009216
movzx eax, byte [rbx]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rbx, [rbx + 2]
sub rdx, 1
jne 0x140009203
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 0x140009285
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.1400120b0
lea rdx, [0x1400126b0]
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 0x1400093f9
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
cmp qword [r14 + 0x18], 7
jbe 0x1400092a1
mov r14, qword [r14]
mov rdx, r14
lea rcx, [rsp + 0x60]
call fcn.140010330
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rdi
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 0x140009319
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.1400120b0
lea rdx, [0x1400126b0]
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 0x1400093b8
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 0x140009376
nop word [rax + rax]
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140009376
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 0x140009340
lea rcx, [rsp + 0x68]
call fcn.140010620
test rax, rax
jne 0x1400093a4
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
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], rdi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x68]
call fcn.14000e8a0
lea rcx, [rsp + 0x70]
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]
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x140009439
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140009434
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140009434
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140082e6c
movzx eax, bl
mov rcx, qword [rbp + 0x470]
xor rcx, rsp
call fcn.140082b00
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.140002bb0
int3
call fcn.140002b10
int3