Function at 0x14004f7c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov eax, r8d
mov word [rbp + 0x20], ax
mov dword [rbp - 4], 0
mov qword [rbp - 0x10], 0
lea rax, [0x14012e460]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WSOCK32.dll_WSAStartup]
call rax
mov dword [rbp - 0x24], eax
cmp dword [rbp - 0x24], 0
je 0x14004f825
mov eax, dword [rbp - 0x24]
mov edx, eax
lea rax, str.Socket_startup_failed:__d_n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
mov rax, qword [rbp + 0x18]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyname]
call rax
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
jne 0x14004f860
mov rax, qword [rbp + 0x18]
mov rdx, rax
lea rax, str.Couldnt_get_hostname:__s_n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WSOCK32.dll_socket]
call rax
mov qword [rbp - 0x38], rax
cmp qword [rbp - 0x38], 0xffffffffffffffff
jne 0x14004f8a5
call dbg.WSAErrorMsg
mov rdx, rax
lea rax, str.Socket_initialisation_failed:__s_n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
lea rax, [serv.sin_family]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov word [serv.sin_family], 2
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [serv.sin_addr], eax
movzx eax, word [rbp + 0x20]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_htons]
call rax
mov word [serv.sin_port], ax
lea rdx, [serv.sin_family]
mov rax, qword [rbp - 0x38]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_connect]
call rax
cmp eax, 0xffffffff
jne 0x14004f928
call dbg.WSAErrorMsg
mov rdx, rax
lea rax, str.Socket_connect_failed:__s_n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov rdx, qword [rbp + 0x10]
mov rax, qword [rbp - 0x38]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_send]
call rax
mov dword [rbp - 0x3c], eax
cmp dword [rbp - 0x3c], 0xffffffff
jne 0x14004f97f
call dbg.WSAErrorMsg
mov rdx, rax
lea rax, str.Send_failed:__s_n
mov rcx, rax
call sym.printf_17
mov dword [rbp - 4], 1
jmp 0x14004fae5
mov qword [rbp - 0x18], 0xffff
mov rax, qword [rbp - 0x18]
add rax, 1
mov rcx, rax
call sym.malloc
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14004f9c4
mov rax, qword [rbp - 0x18]
add eax, 1
mov edx, eax
lea rax, str.Err:_OOM___d__n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
mov qword [rbp - 0x20], 0
mov rax, qword [rbp - 0x18]
cmp rax, qword [rbp - 0x20]
jne 0x14004fa1f
add qword [rbp - 0x18], 0xffff
mov rax, qword [rbp - 0x18]
lea rdx, [rax + 1]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.realloc
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14004fa1f
mov rax, qword [rbp - 0x18]
add eax, 1
mov edx, eax
lea rax, str.Err:_OOM___d__n
mov rcx, rax
call sym.printf_17
mov eax, 1
jmp 0x14004faf8
mov rax, qword [rbp - 0x18]
mov ecx, eax
mov rax, qword [rbp - 0x20]
mov edx, eax
mov eax, ecx
sub eax, edx
mov ecx, eax
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
add rdx, rax
mov rax, qword [rbp - 0x38]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_recv]
call rax
mov dword [rbp - 0x3c], eax
cmp dword [rbp - 0x3c], 0xffffffff
jne 0x14004fa7e
call dbg.WSAErrorMsg
mov rdx, rax
lea rax, str.Recv_failed:__s_n
mov rcx, rax
call sym.printf_17
mov dword [rbp - 4], 1
jmp 0x14004fa93
cmp dword [rbp - 0x3c], 0
je 0x14004fa92
mov eax, dword [rbp - 0x3c]
cdqe
add qword [rbp - 0x20], rax
jmp 0x14004f9cc
nop
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x20]
add rax, rdx
mov byte [rax], 0
mov eax, dword [0x14012e5f8]
test eax, eax
je 0x14004fac3
mov rax, qword [rbp - 0x10]
mov rdx, rax
lea rax, [0x1400ff5b6]
mov rcx, rax
call sym.printf_17
jmp 0x14004fae5
mov rax, qword [rbp - 0x10]
mov rdx, rax
lea rax, str.Reply_was__s_n
mov rcx, rax
call sym.printf_17
mov rax, qword [rbp - 0x10]
mov rcx, rax
call dbg.display
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov eax, dword [rbp - 4]
add rsp, 0x70
pop rbp
ret