Function at 0x140159ac0
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push rbp
push r14
push rsi
push rdi
push rbx
sub rsp, 0xc0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x38], 0xfffffffffffffffe
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
cmp dword [rcx + 0x58], 0
jne 0x140159bb2
mov rcx, rsi
call fcn.14015a190
test byte [rsi + 0x48], 1
je 0x140159bb2
mov ecx, 0x60
call fcn.14038a538
mov qword [rbp + 0x18], rax
movaps xmm0, xmmword [0x1404e8820]
movups xmmword [rbp + 0x28], xmm0
movups xmm0, xmmword [0x1404e897e]
movups xmmword [rax + 0x40], xmm0
movups xmm0, xmmword [0x1404e896e]
movups xmmword [rax + 0x30], xmm0
movups xmm0, xmmword [0x1404e895e]
movups xmmword [rax + 0x20], xmm0
movups xmm0, xmmword [0x1404e894e]
movups xmmword [rax + 0x10], xmm0
movups xmm0, xmmword [str._TCPClient__Warning__Opening_a_new_connexion._The_last_one_was_automatically_closed.]
movups xmmword [rax], xmm0
mov dword [rax + 0x50], 0x2e646573
mov byte [rax + 0x54], 0
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140159fc4
mov rax, qword [rcx]
lea rdx, [rbp + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x140159bb2
mov rcx, qword [rbp + 0x18]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140159bad
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140159fd3
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.14038a574
xorps xmm0, xmm0
movups xmmword [rsi + 0x70], xmm0
movups xmmword [rsi + 0x90], xmm0
movups xmmword [rsi + 0x80], xmm0
movabs rax, 0x100000002
mov qword [rsi + 0x74], rax
mov dword [rsi + 0x7c], 6
cmp qword [rbx + 0x18], 0x10
jb 0x140159be6
mov rbx, qword [rbx]
lea r8, [rsi + 0x70]
lea r14, [rsi + 0x68]
cmp qword [rdi + 0x18], 0x10
jb 0x140159bf8
mov rdi, qword [rdi]
mov rcx, rdi
mov rdx, rbx
mov r9, r14
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x140159ccf
test byte [rsi + 0x48], 1
je 0x140159cbe
mov edi, eax
mov ecx, gethostbyaddr
call fcn.14038a538
mov qword [rbp - 0x50], rax
movaps xmm0, xmmword [0x1404e8830]
movups xmmword [rbp - 0x40], xmm0
movups xmm0, xmmword [str._TCPClient__Error__getaddrinfo_failed_:__d]
movups xmmword [rax], xmm0
movups xmm0, xmmword [0x1404e89a3]
movups xmmword [rax + 0x10], xmm0
movups xmm0, xmmword [0x1404e89ad]
movups xmmword [rax + 0x1a], xmm0
mov byte [rax + 0x2a], 0
lea rcx, [rbp + 0x18]
lea rdx, [rbp - 0x50]
mov r8d, edi
call fcn.14015ac30
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140159fbf
mov rax, qword [rcx]
lea rdx, [rbp + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x140159cbe
mov rcx, qword [rbp + 0x18]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140159cb9
mov rbx, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbx
cmp rcx, 0x20
jae 0x140159fc9
add rax, 0x28
mov rdx, rax
mov rcx, rbx
call fcn.14038a574
mov rcx, qword [r14]
test rcx, rcx
jne 0x140159e19
jmp 0x140159e26
mov rax, qword [rsi + 0x68]
mov r8d, dword [rax + 0xc]
mov ecx, dword [rax + 4]
mov edx, dword [rax + 8]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x140159d5e
mov dword [rbp + 0x14], 1
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x14]
mov rcx, rax
mov edx, 6
mov r8d, 1
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140159e36
mov rcx, qword [rsi + 0x60]
mov rax, qword [rsi + 0x68]
mov r8d, dword [rax + 0x10]
mov rdx, qword [rax + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
mov edi, eax
mov rcx, qword [rsi + 0x68]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov qword [rsi + 0x68], 0
cmp edi, 0xffffffff
je 0x140159f02
mov dword [rsi + 0x58], 0
mov al, 1
jmp 0x140159e28
test byte [rsi + 0x48], 1
je 0x140159e16
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov ecx, gethostbyaddr
call fcn.14038a538
mov qword [rbp - 0x30], rax
movaps xmm0, xmmword [0x1404e8840]
movups xmmword [rbp - 0x20], xmm0
movups xmm0, xmmword [str._TCPClient__Error__socket_failed_:__d]
movups xmmword [rax], xmm0
movups xmm0, xmmword [0x1404e89ce]
movups xmmword [rax + 0x10], xmm0
movabs rcx, 0x6425203a2064656c
mov qword [rax + 0x1d], rcx
mov byte [rax + 0x25], 0
lea rcx, [rbp + 0x18]
lea rdx, [rbp - 0x30]
mov r8d, edi
call fcn.14015ac30
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140159fce
mov rax, qword [rcx]
lea rdx, [rbp + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x140159e16
mov rcx, qword [rbp + 0x18]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140159e11
mov rbx, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbx
cmp rcx, 0x20
jae 0x140159fe2
add rax, 0x28
mov rdx, rax
mov rcx, rbx
call fcn.14038a574
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov qword [r14], 0
xor eax, eax
add rsp, 0xc0
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
test byte [rsi + 0x48], 1
je 0x140159ee1
mov ecx, 0x40
call fcn.14038a538
mov qword [rbp + 0x18], rax
movaps xmm0, xmmword [0x1404e7ff0]
movups xmmword [rbp + 0x28], xmm0
movups xmm0, xmmword [0x1404e8a04]
movups xmmword [rax + 0x20], xmm0
movups xmm0, xmmword [0x1404e89f4]
movups xmmword [rax + 0x10], xmm0
movups xmm0, xmmword [str._TCPClient__Error__Socket_error_in_call_to_setsockopt]
movups xmmword [rax], xmm0
movabs rcx, 0x74706f6b636f7374
mov qword [rax + 0x2d], rcx
mov byte [rax + 0x35], 0
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140159fd8
mov rax, qword [rcx]
lea rdx, [rbp + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x140159ee1
mov rcx, qword [rbp + 0x18]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140159edc
mov rbx, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbx
cmp rcx, 0x20
jae 0x140159fe7
add rax, 0x28
mov rdx, rax
mov rcx, rbx
call fcn.14038a574
mov rcx, qword [rsi + 0x60]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsi + 0x68]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov qword [rsi + 0x68], 0
jmp 0x140159e26
test byte [rsi + 0x48], 1
je 0x140159e26
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov ecx, 0x40
call fcn.14038a538
mov qword [rbp - 0x10], rax
movaps xmm0, xmmword [reloc.WS2_32.dll_gethostbyaddr]
movups xmmword [rbp], xmm0
movups xmm0, xmmword [str._TCPClient__Error__Unable_to_connect_to_server_:__d]
movups xmmword [rax], xmm0
movups xmm0, xmmword [0x1404e8a2a]
movups xmmword [rax + 0x10], xmm0
movups xmm0, xmmword [0x1404e8a3a]
movups xmmword [rax + 0x20], xmm0
mov dword [rax + 0x2f], 0x6425203a
mov byte [rax + 0x33], 0
lea rcx, [rbp + 0x18]
lea rdx, [rbp - 0x10]
mov r8d, edi
call fcn.14015ac30
mov rcx, qword [rsi + 0x40]
test rcx, rcx
je 0x140159fdd
mov rax, qword [rcx]
lea rdx, [rbp + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x30]
cmp rax, 0x10
jb 0x140159e26
mov rcx, qword [rbp + 0x18]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140159fb5
mov rbx, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rbx
cmp rcx, 0x20
jae 0x140159fec
add rax, 0x28
mov rdx, rax
mov rcx, rbx
call fcn.14038a574
jmp 0x140159e26
call fcn.1403873f4
call fcn.1403873f4
call fcn.14039178c
call fcn.1403873f4
call fcn.14039178c
call fcn.1403873f4
call fcn.1403873f4
call fcn.14039178c
call fcn.14039178c
call fcn.14039178c
int3