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

Disassembly:
push rbp
push rdi
mov eax, 0x2928
call fcn.140002960
sub rsp, rax
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x28c0], ecx
mov qword [rbp + 0x28c8], rdx
call dbg.__main
lea rdx, [rbp + 0x26c0]
mov eax, 0
mov ecx, 0x33
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rbp + 0x2898], 0
lea rax, [rbp + 0x26c0]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov dword [rbp + 0x2898], eax
cmp dword [rbp + 0x2898], 0
je 0x1400015b8
mov eax, dword [rbp + 0x2898]
mov edx, eax
lea rax, str.WSAStartup_Error.__d
mov rcx, rax
call dbg.printf(char const*, ::)
mov word [rbp + 0x26b0], 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 + 0x26b2], 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 + 0x2890], rax
cmp qword [rbp + 0x2890], 0
je 0x14000162b
mov rax, qword [rbp + 0x2890]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
test rax, rax
je 0x14000162b
mov rax, qword [rbp + 0x2890]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp + 0x26b4], eax
jmp 0x140001644
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 + 0x26b4], eax
mov r8d, 0
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov qword [rbp + 0x2888], rax
cmp qword [rbp + 0x2888], 0xffffffffffffffff
jne 0x14000169f
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rax, qword [rbp + 0x2888]
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 0x140001818
lea rdx, [rbp + 0x26b0]
mov rax, qword [rbp + 0x2888]
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 0x1400016e2
lea rax, str.connect_error
mov rcx, rax
call dbg.printf(char const*, ::)
mov eax, 0
jmp 0x140001818
mov dword [rbp + 0x2884], 0
mov qword [rbp + 0x2878], 0
mov byte [rbp + 0x2877], 1
mov dword [rbp + 0x2870], 0
mov dword [rbp + 0x286c], 0
mov dword [rbp + 0x2868], 0
mov dword [rbp + 0x2864], 0
mov dword [rbp + 0x2860], 0x270f
mov byte [rbp + 0x285f], 0
mov word [rbp + 0x285c], 0
cmp dword [rbp + 0x2864], 0
je 0x14000175a
mov eax, 0x270f
sub eax, dword [rbp + 0x2864]
mov dword [rbp + 0x2860], eax
mov eax, dword [rbp + 0x2864]
cdqe
lea rdx, [rbp - 0x60]
add rdx, rax
mov rax, qword [rbp + 0x2888]
mov r9d, 0
mov r8d, 0x270f
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_recv]
call rax
mov dword [rbp + 0x2884], eax
lea rax, [0x14000a042]
mov rcx, rax
call dbg.printf(char const*, ::)
cmp dword [rbp + 0x2884], 0
jle 0x1400017fb
mov eax, dword [rbp + 0x2864]
add dword [rbp + 0x2884], eax
mov eax, dword [rbp + 0x286c]
mov dword [rbp + 0x289c], eax
jmp 0x1400017e8
mov eax, dword [rbp + 0x289c]
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 + 0x289c], 1
mov eax, dword [rbp + 0x289c]
cmp eax, dword [rbp + 0x2884]
jl 0x1400017c0
jmp 0x140001740
mov eax, dword [rbp + 0x2884]
mov edx, eax
lea rax, str.socket_receive_error:_d
mov rcx, rax
call dbg.printf(char const*, ::)
nop
mov eax, 0
add rsp, 0x2928
pop rdi
pop rbp
ret