Function at 0x1400025a1
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push rbp
push rbx
sub rsp, 0x458
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3f0], rcx
lea rax, [rbp + 0x1d0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x3cc], eax
cmp dword [rbp + 0x3cc], 0
je 0x14000265f
lea rax, str.WSAStartup_failed:
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 + 0x3cc]
mov edx, eax
call method.std::ostream.operator___int_
mov rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
lea rax, [rbp + 0x36a]
mov qword [rbp + 0x398], rax
nop
nop
lea rdx, [rbp + 0x36a]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36a]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x140002bff
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x3c0], rax
cmp qword [rbp + 0x3c0], 0xffffffffffffffff
jne 0x14000271b
lea rax, str.Socket_creation_failed:
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call method.std::ostream.operator___int_
mov rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
lea rax, [rbp + 0x36b]
mov qword [rbp + 0x390], rax
nop
nop
lea rdx, [rbp + 0x36b]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36b]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x140002bff
lea rax, str.api.ipify.org
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0x3b8], rax
cmp qword [rbp + 0x3b8], 0
jne 0x1400027ce
lea rax, str.Error_resolving_host
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x3c0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
lea rax, [rbp + 0x36c]
mov qword [rbp + 0x388], rax
nop
nop
lea rdx, [rbp + 0x36c]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36c]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x140002bff
mov word [rbp + 0x1c0], 2
mov ecx, 0x50
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x1c2], ax
mov rax, qword [rbp + 0x3b8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp + 0x1c4], eax
lea rdx, [rbp + 0x1c0]
mov rax, qword [rbp + 0x3c0]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov dword [rbp + 0x3cc], eax
cmp dword [rbp + 0x3cc], 0xffffffff
jne 0x1400028d6
lea rax, str.Connect_failed:
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call method.std::ostream.operator___int_
mov rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x3c0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
lea rax, [rbp + 0x36d]
mov qword [rbp + 0x380], rax
nop
nop
lea rdx, [rbp + 0x36d]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36d]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x140002bff
lea rax, str.GET___formattext_HTTP_1.1_r_nHost:_api.ipify.org_r_nConnection:_close_r_n_r_n
mov qword [rbp + 0x3b0], rax
mov rax, qword [rbp + 0x3b0]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov rdx, qword [rbp + 0x3b0]
mov rax, qword [rbp + 0x3c0]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0x3cc], eax
cmp dword [rbp + 0x3cc], 0xffffffff
jne 0x1400029cc
lea rax, str.Send_failed:
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 rbx, rax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rcx, rbx
call method.std::ostream.operator___int_
mov rcx, rax
mov rax, qword [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
mov rax, qword [rbp + 0x3c0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
lea rax, [rbp + 0x36e]
mov qword [rbp + 0x378], rax
nop
nop
lea rdx, [rbp + 0x36e]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36e]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
jmp 0x140002bff
lea rax, [rbp + 0x1a0]
mov rcx, rax
call fcn.1400bde00
mov dword [rbp + 0x3ac], 0x200
mov ecx, dword [rbp + 0x3ac]
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x3c0]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x3cc], eax
cmp dword [rbp + 0x3cc], 0
jle 0x140002a39
mov eax, dword [rbp + 0x3cc]
movsxd rcx, eax
lea rdx, [rbp - 0x60]
lea rax, [rbp + 0x1a0]
mov r8, rcx
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.append_char_const__unsigned_long_long_
cmp dword [rbp + 0x3cc], 0
jg 0x1400029e5
mov rax, qword [rbp + 0x3c0]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_closesocket]
call rax
mov rax, qword [sym.imp.WS2_32.dll_WSACleanup]
call rax
lea rax, [rbp + 0x1a0]
mov r8d, 0
lea rdx, str._r_n_r_n
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.find_char_const__unsigned_long_long__const
add rax, 4
mov qword [rbp + 0x3a0], rax
cmp qword [rbp + 0x3a0], 0xffffffffffffffff
je 0x140002ab8
mov rax, qword [rbp + 0x3f0]
mov rcx, qword [rbp + 0x3a0]
lea rdx, [rbp + 0x1a0]
mov r9, 0xffffffffffffffff
mov r8, rcx
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.substr_unsigned_long_long__unsigned_long_long__const
jmp 0x140002b23
lea rax, str.No_se_encontr_la_direccin_IP_en_la_respuesta.
mov rdx, rax
mov rax, qword [0x1400ebc60]
mov rcx, rax
call method.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 [method.std::basic_ostream_char__std::char_traits_char____std::endl_char__std.char_traits_char____std::basic_ostream_char__std::char_traits_char____]
mov rdx, rax
call method.std::ostream.operator___std::ostream____std::ostream__
lea rax, [rbp + 0x36f]
mov qword [rbp + 0x370], rax
nop
nop
lea rdx, [rbp + 0x36f]
mov rax, qword [rbp + 0x3f0]
mov r8, rdx
lea rdx, [0x1400e541e]
mov rcx, rax
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string_std.allocator_char____char_const__std::allocator_char__const_
lea rax, [rbp + 0x36f]
mov rcx, rax
call method.std::__new_allocator_char_.__new_allocator__
nop
lea rax, [rbp + 0x1a0]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
jmp 0x140002bff
mov rax, qword [rbp + 0x3f0]
add rsp, 0x458
pop rbx
pop rbp
ret