Function at 0x140003d22
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push rbp
mov rbp, rsp
push rsi
push rbx
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov eax, edx
mov qword [rbp + 0x20], r8
mov edx, r9d
mov word [rbp + 0x18], ax
mov eax, edx
mov word [rbp + 0x28], ax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov ecx, 0
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
movzx eax, word [0x140013234]
test ax, ax
je 0x140003d8d
mov r8d, 0x11
mov edx, 2
mov ecx, 2
mov rax, qword [sym.imp.WSOCK32.dll_socket]
call rax
mov dword [0x140013220], eax
jmp 0x140003dac
mov r8d, 6
mov edx, 1
mov ecx, 2
mov rax, qword [sym.imp.WSOCK32.dll_socket]
call rax
mov dword [0x140013220], eax
mov eax, dword [0x140013220]
test eax, eax
jns 0x140003dc5
lea rax, str.Cant_get_socket
mov rcx, rax
call fcn.1400033f9
mov eax, dword [0x140013220]
test eax, eax
jne 0x140003de2
mov eax, dword [0x140013220]
mov ecx, eax
call sub.msvcrt.dll__dup
mov dword [0x140013220], eax
mov rdx, qword [0x140013218]
mov eax, dword [0x140013220]
cdqe
mov dword [rsp + 0x20], 8
mov r9, rdx
mov r8d, 4
mov edx, 0xffff
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_setsockopt]
call rax
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x140003e29
lea rax, str.nnetfd_reuseaddr_failed
mov rcx, rax
call fcn.140003302
mov rax, qword [0x1400131c8]
mov word [rax], 2
mov rax, qword [0x1400131d0]
mov word [rax], 2
cmp qword [rbp + 0x20], 0
je 0x140003e5b
mov rax, qword [0x1400131c8]
lea rdx, [rax + 4]
mov rax, qword [rbp + 0x20]
mov eax, dword [rax]
mov dword [rdx], eax
cmp word [rbp + 0x28], 0
je 0x140003e7c
movzx eax, word [rbp + 0x28]
mov rbx, qword [0x1400131c8]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_htons]
call rax
mov word [rbx + 2], ax
mov ebx, 0
cmp qword [rbp + 0x20], 0
jne 0x140003e93
cmp word [rbp + 0x28], 0
je 0x140003f3e
movzx eax, word [rbp + 0x28]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x14], 4
jmp 0x140003f2e
mov rdx, qword [0x1400131c8]
mov eax, dword [0x140013220]
cdqe
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_bind]
call rax
mov ebx, eax
test ebx, ebx
je 0x140003f3a
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
cmp eax, 0x2740
jne 0x140003f3d
movzx esi, word [rbp + 0x28]
mov rax, qword [0x1400131c8]
mov eax, dword [rax + 4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov r8d, esi
mov rdx, rax
lea rax, str.retrying_local__s:_d
mov rcx, rax
call fcn.140003302
mov ecx, 1
mov rax, qword [sym.imp.msvcrt.dll__sleep]
call rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
sub dword [rbp - 0x14], 1
cmp dword [rbp - 0x14], 0
jg 0x140003ea6
jmp 0x140003f3e
nop
jmp 0x140003f3e
nop
test ebx, ebx
je 0x140003f70
movzx ebx, word [rbp + 0x28]
mov rax, qword [0x1400131c8]
mov eax, dword [rax + 4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov r8d, ebx
mov rdx, rax
lea rax, str.Cant_grab__s:_d_with_bind
mov rcx, rax
call fcn.1400033f9
movzx eax, word [0x14001322c]
test ax, ax
je 0x140003f87
mov eax, dword [0x140013220]
jmp 0x1400040aa
mov rax, qword [0x1400131d0]
lea rdx, [rax + 4]
mov rax, qword [rbp + 0x10]
mov eax, dword [rax]
mov dword [rdx], eax
movzx eax, word [rbp + 0x18]
mov rbx, qword [0x1400131d0]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_htons]
call rax
mov word [rbx + 2], ax
mov eax, dword [0x1400131a8]
test eax, eax
je 0x140003fcd
lea rax, str.Warning:_source_routing_unavailable_on_this_machine__ignoring
mov rcx, rax
call fcn.140003302
mov eax, dword [0x140013238]
mov edx, eax
mov ecx, 1
call fcn.14000352a
mov rax, rbp
mov rdx, rax
lea rax, [0x1400130a0]
mov rcx, rax
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x14000401d
mov rdx, qword [0x1400131d0]
mov eax, dword [0x140013220]
cdqe
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_connect]
call rax
mov ebx, eax
jmp 0x140004030
mov ebx, 0xffffffff
mov ecx, 0x274c
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
mov edx, 0
mov ecx, 0
call fcn.14000352a
test ebx, ebx
jne 0x14000404b
mov eax, dword [0x140013220]
jmp 0x1400040aa
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov rbx, rax
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov dword [rbx], eax
mov eax, dword [0x140013220]
cdqe
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_shutdown]
call rax
mov eax, dword [0x140013220]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_WSASetLastError]
call rax
mov eax, 0xffffffff
add rsp, 0x40
pop rbx
pop rsi
pop rbp
ret