Function at 0x140024b50
Capabilities:
Connect 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:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r13
push r14
lea rbp, [rsp - 0x340]
sub rsp, 0x440
mov rax, qword [0x140052080]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov rsi, rcx
mov qword [rsp + 0x38], rcx
xor r13d, r13d
mov ecx, 0x202
lea rdx, [rbp - 0x70]
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, eax
test eax, eax
je 0x140024bf7
lea rdx, str.WSAStartup_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
mov edx, ebx
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___int____ptr64]
lea rdx, [0x140029320]
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]
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r13
xor r8d, r8d
lea rdx, [0x14003ba09]
mov rcx, rsi
call fcn.140024a20
jmp 0x14002500f
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x60], r13d
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
mov dword [rsp + 0x64], 2
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x6c], 6
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x60]
lea rdx, [0x1400485c4]
lea rcx, str.api.ipify.org
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebx, eax
test eax, eax
je 0x140024c87
lea rdx, str.getaddrinfo_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
mov edx, ebx
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___int____ptr64]
lea rdx, [0x140029320]
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]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140024bd2
mov rcx, qword [rsp + 0x38]
mov r8d, dword [rcx + 0xc]
mov edx, dword [rcx + 8]
mov ecx, dword [rcx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140024cf2
lea rdx, str.Error_at_socket__:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
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___int____ptr64]
lea rdx, [0x140029320]
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, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140024bd2
mov rdx, qword [rsp + 0x38]
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140024d4f
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
lea rdx, str.Unable_to_connect_to_server_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
lea rdx, [0x140029320]
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, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140024bd2
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xor r9d, r9d
mov r8d, 0x3a
lea rdx, str.GET___HTTP_1.1_r_nHost:_api.ipify.org_r_nConnection:_close_r_n_r_n
mov rcx, r14
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x140024dc3
lea rdx, str.send_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
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___int____ptr64]
lea rdx, [0x140029320]
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, r14
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x140024bd2
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], send
mov byte [rsp + 0x40], r13b
nop
xor r9d, r9d
mov r8d, 0x200
lea rdx, [rbp + 0x130]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x140024e66
movsxd rdi, eax
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x58]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x140024e48
lea rax, [rcx + rdi]
mov qword [rsp + 0x50], rax
lea rbx, [rsp + 0x40]
cmp rdx, 0xf
cmova rbx, qword [rsp + 0x40]
add rbx, rcx
mov r8, rdi
lea rdx, [rbp + 0x130]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x140024de0
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 0x130]
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.140029c00
jmp 0x140024de0
je 0x140024e9f
lea rdx, str.recv_failed:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140028310
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rbx
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___int____ptr64]
lea rdx, [0x140029320]
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, r14
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rbx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
cmp rdi, 4
jb 0x140024f18
lea r14, [rdi + rbx]
lea r8, [r14 - 3]
sub r8, rbx
mov edx, recv
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140024f18
nop word [rax + rax]
cmp dword [rax], 0xa0d0a0d
je 0x140024f80
inc rax
lea r8, [r14 - 3]
sub r8, rax
mov edx, recv
mov rcx, rax
call sub.VCRUNTIME140.dll_memchr
test rax, rax
jne 0x140024ef0
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r13
xor r8d, r8d
lea rdx, [0x14003ba09]
mov rcx, rsi
call fcn.140024a20
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x14002500f
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002500a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14002500a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
sub rax, rbx
cmp rax, 0xffffffffffffffff
je 0x140024f18
lea rcx, [rax + 4]
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r13
cmp rdi, rcx
jb 0x14002503e
sub rdi, rcx
mov r8, 0xffffffffffffffff
cmp rdi, r8
cmovb r8, rdi
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rdx, qword [rsp + 0x40]
add rdx, rcx
mov rcx, rsi
call fcn.140024a20
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x14002500f
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002500a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140024f79
call fcn.140034c00
mov rax, rsi
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.140034be0
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret
call fcn.140027c90
nop
int3