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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x1188
call fcn.14004e2cc
sub rsp, rax
mov rdi, rdx
mov rbx, rcx
mov dword [rsp + 0x20], 0
lea rcx, str.MyAgent
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.WININET.dll_InternetOpenA]
test rax, rax
je 0x1400013f2
mov rsi, rax
test byte [rbx], 1
je 0x14000146b
mov rbx, qword [rbx + 0x10]
jmp 0x14000146e
mov rcx, qword [0x140080498]
lea rdx, str.InternetOpen_failed
mov r8d, 0x13
call fcn.1400026b0
mov rsi, rax
mov rax, qword [rax]
mov rdx, qword [rax - 0x18]
add rdx, rsi
lea rdi, [rsp + 0x180]
mov rcx, rdi
call fcn.1400063c0
mov rdx, qword [str._E_n_]
mov rcx, rdi
call fcn.140038cd0
mov r8, qword [rax]
mov rcx, rax
mov dl, 0xa
call qword [r8 + 0x38]
mov ebx, eax
lea rcx, [rsp + 0x180]
call fcn.1400384f0
mov rcx, rsi
mov edx, ebx
call fcn.14000bac0
mov rcx, rsi
call fcn.140007a10
xor edi, edi
jmp 0x1400016da
inc rbx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov rcx, rsi
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
test rax, rax
je 0x14000158c
mov rbx, rax
lea rcx, [rsp + 0x38]
mov rdx, rdi
mov r8d, 4
call fcn.140001940
cmp qword [rsp + 0xb8], 0
setne dil
je 0x14000160e
lea r14, [rsp + 0x180]
lea r15, [rsp + 0x34]
mov r13, qword [sym.imp.WININET.dll_InternetReadFile]
lea r12, [rsp + 0x38]
nop dword [rax]
mov rcx, rbx
mov rdx, r14
mov r8d, 0x1000
mov r9, r15
call r13
test eax, eax
je 0x14000150d
mov r8d, dword [rsp + 0x34]
test r8d, r8d
je 0x14000150d
mov rcx, r12
mov rdx, r14
call fcn.14000bbb0
jmp 0x1400014e0
mov r14, qword [rsp + 0xb8]
test r14, r14
je 0x140001558
lea r15, [rsp + 0x40]
mov rax, qword [rsp + 0x40]
mov rcx, r15
call qword [rax + 0x30]
mov ebp, eax
mov rcx, r14
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov r14d, eax
mov qword [rsp + 0xb8], 0
mov rax, qword [rsp + 0x40]
mov rcx, r15
xor edx, edx
xor r8d, r8d
call qword [rax + 0x18]
or r14d, ebp
je 0x140001575
mov rax, qword [rsp + 0x38]
mov rax, qword [rax - 0x18]
lea rcx, [rsp + rax]
add rcx, 0x38
mov edx, dword [rsp + rax + 0x58]
or edx, 4
call fcn.140006790
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x140001694
mov rcx, qword [0x140080498]
lea rdx, str.InternetOpenUrl_failed
mov r8d, 0x16
call fcn.1400026b0
mov rdi, rax
mov rax, qword [rax]
mov rdx, qword [rax - 0x18]
add rdx, rdi
lea rbx, [rsp + 0x180]
mov rcx, rbx
call fcn.1400063c0
mov rdx, qword [str._E_n_]
mov rcx, rbx
call fcn.140038cd0
mov r8, qword [rax]
mov rcx, rax
mov dl, 0xa
call qword [r8 + 0x38]
mov ebx, eax
lea rcx, [rsp + 0x180]
call fcn.1400384f0
mov rcx, rdi
mov edx, ebx
call fcn.14000bac0
mov rcx, rdi
call fcn.140007a10
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
xor edi, edi
jmp 0x1400016da
mov rcx, qword [0x140080498]
lea rdx, str.Could_not_open_output_file
mov r8d, 0x1a
call fcn.1400026b0
mov r14, rax
mov rax, qword [rax]
mov rdx, qword [rax - 0x18]
add rdx, r14
lea rcx, [rsp + 0x180]
call fcn.1400063c0
mov rdx, qword [str._E_n_]
lea rcx, [rsp + 0x180]
call fcn.140038cd0
mov r8, qword [rax]
mov rcx, rax
mov dl, 0xa
call qword [r8 + 0x38]
mov ebp, eax
lea rcx, [rsp + 0x180]
call fcn.1400384f0
mov rcx, r14
mov edx, ebp
call fcn.14000bac0
mov rcx, r14
call fcn.140007a10
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea rax, fcn.140001a40
mov qword [rsp + 0x38], rax
lea rsi, [rsp + 0xe8]
lea rax, [0x1400801c0]
mov qword [rsp + 0xe8], rax
lea rcx, [rsp + 0x40]
call fcn.140001bc0
lea rdx, [0x1400801d8]
lea rcx, [rsp + 0x38]
call fcn.14000a130
mov rcx, rsi
call fcn.140006dc0
mov eax, edi
add rsp, 0x1188
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret