Function at 0x140001530
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
push rdi
mov eax, 0x2938
call fcn.1400029c0
sub rsp, rax
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x28d0], ecx
mov qword [rbp + 0x28d8], rdx
call dbg.__main
lea rax, str.Defined___cplusplus_or___cplusplus__
mov rcx, rax
call dbg.printf(char const*, ::)
lea rdx, [rbp + 0x26d0]
mov eax, 0
mov ecx, 0x33
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp + 0x28a8], 0
lea rax, [rbp + 0x26d0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x28a8], eax
cmp dword [rbp + 0x28a8], 0
je 0x1400015c7
mov eax, dword [rbp + 0x28a8]
mov edx, eax
lea rax, str.WSAStartup_Error.__d
mov rcx, rax
call dbg.printf(char const*, ::)
mov word [rbp + 0x26c0], 2
mov eax, dword [0x140009018]
movzx eax, ax
mov ecx, eax
mov rax, qword [sym.imp.WS2_32.dll_htons]
call rax
mov word [rbp + 0x26c2], ax
mov rax, qword [str.127.0.0.1]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0x28a0], rax
cmp qword [rbp + 0x28a0], 0
je 0x14000163a
mov rax, qword [rbp + 0x28a0]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x14000163a
mov rax, qword [rbp + 0x28a0]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp + 0x26c4], eax
jmp 0x140001653
mov rax, qword [str.127.0.0.1]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov dword [rbp + 0x26c4], eax
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x2898], rax
cmp qword [rbp + 0x2898], 0xffffffffffffffff
jne 0x1400016ae
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rax, qword [rbp + 0x2898]
mov r8d, edx
mov rdx, rax
lea rax, str.socket_error._llu__d
mov rcx, rax
call dbg.printf(char const*, ::)
mov eax, 0
jmp 0x14000185d
lea rdx, [rbp + 0x26c0]
mov rax, qword [rbp + 0x2898]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
cmp eax, 0xffffffff
sete al
test al, al
je 0x1400016f1
lea rax, str.connect_error
mov rcx, rax
call dbg.printf(char const*, ::)
mov eax, 0
jmp 0x14000185d
mov word [rbp + 0x26bd], 0x68
mov byte [rbp + 0x26bf], 0
lea rdx, [rbp + 0x26bd]
mov rax, qword [rbp + 0x2898]
mov r9d, 0
mov r8d, 3
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov dword [rbp + 0x2894], 0
mov qword [rbp + 0x2888], 0
mov byte [rbp + 0x2887], 1
mov dword [rbp + 0x2880], 0
mov dword [rbp + 0x287c], 0
mov dword [rbp + 0x2878], 0
mov dword [rbp + 0x2874], 0
mov dword [rbp + 0x2870], 0x270f
mov byte [rbp + 0x286f], 0
mov word [rbp + 0x286c], 0
cmp dword [rbp + 0x2874], 0
je 0x14000179f
mov eax, 0x270f
sub eax, dword [rbp + 0x2874]
mov dword [rbp + 0x2870], eax
mov eax, dword [rbp + 0x2874]
cdqe
lea rdx, [rbp - 0x60]
add rdx, rax
mov rax, qword [rbp + 0x2898]
mov r9d, 0
mov r8d, 0x270f
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x2894], eax
lea rax, [0x14000a06e]
mov rcx, rax
call dbg.printf(char const*, ::)
cmp dword [rbp + 0x2894], 0
jle 0x140001840
mov eax, dword [rbp + 0x2874]
add dword [rbp + 0x2894], eax
mov eax, dword [rbp + 0x287c]
mov dword [rbp + 0x28ac], eax
jmp 0x14000182d
mov eax, dword [rbp + 0x28ac]
cdqe
movzx eax, byte [rbp + rax - 0x60]
movzx eax, al
mov edx, eax
lea rax, str._02x
mov rcx, rax
call dbg.printf(char const*, ::)
add dword [rbp + 0x28ac], 1
mov eax, dword [rbp + 0x28ac]
cmp eax, dword [rbp + 0x2894]
jl 0x140001805
jmp 0x140001785
mov eax, dword [rbp + 0x2894]
mov edx, eax
lea rax, str.socket_receive_error:_d
mov rcx, rax
call dbg.printf(char const*, ::)
nop
mov eax, 0
add rsp, 0x2938
pop rdi
pop rbp
ret