Function at 0x140001590
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x210
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x200], rax
lea rcx, str.connect..._n
call fcn.140001010
mov ecx, 0x202
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140001782
xor ebp, ebp
nop
xorps xmm0, xmm0
mov qword [rsp + 0x20], rbp
xorps xmm1, xmm1
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x20]
mov dword [rsp + 0x38], 1
lea r8, [rsp + 0x30]
mov dword [rsp + 0x3c], 6
lea rdx, str.33110
mov rbx, 0xffffffffffffffff
lea rcx, str.54.178.152.83
movdqu xmmword [rsp + 0x40], xmm0
movdqu xmmword [rsp + 0x50], xmm1
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x1400017d9
mov rsi, qword [rsp + 0x20]
test rsi, rsi
je 0x140001690
mov r8d, dword [rsi + 0xc]
mov edx, dword [rsi + 8]
mov ecx, dword [rsi + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400017b9
mov r8d, dword [rsi + 0x10]
mov rcx, rbx
mov rdx, qword [rsi + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
mov ecx, 0x64
mov edi, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
jne 0x140001660
test rbx, rbx
je 0x1400016fc
nop word [rax + rax]
lea rcx, str.connected__n
call fcn.140001010
xor r9d, r9d
lea rdx, [rsp + 0x28]
mov rcx, rbx
lea r8d, [r9 + 1]
call qword [sym.imp.WS2_32.dll_recv]
inc eax
cmp eax, 1
jbe 0x1400016e8
movsx edx, byte [rsp + 0x28]
lea rcx, [0x14000354c]
call fcn.140001010
movzx edx, byte [rsp + 0x28]
mov rcx, rbx
call fcn.1400012b0
test eax, eax
jne 0x140001690
lea rcx, str.disconnected..._n
call fcn.140001010
jmp 0x140001758
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.recv_failed:__d_n
call fcn.140001010
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp rbx, 0xffffffffffffffff
jne 0x14000171b
lea rcx, str.Unable_to_connect_to_server__n
call fcn.140001010
jmp 0x140001758
xor r9d, r9d
lea rdx, str.Hello_from_client_
mov rcx, rbx
lea r8d, [r9 + 0x12]
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x1400017c8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.send_failed:__d_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
lea rcx, str.connect..._n
call fcn.140001010
mov ecx, 0x202
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400015e0
lea rcx, str.WSAStartup_fail_n
call fcn.140001010
xor eax, eax
mov rcx, qword [rsp + 0x200]
xor rcx, rsp
call fcn.140001810
lea r11, [rsp + 0x210]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rcx, str.socket_failed:__ld_n
jmp 0x1400017e0
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x14000178e
lea rcx, str.getaddrinfo_failed:__d_n
mov edx, eax
call fcn.140001010
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
jmp 0x140001790