Function at 0x1801f01e0
Capabilities:
Act as tcp client
Connect tcp socket
Create tcp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x180717100]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r13, rcx
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x28], 1
xor edi, edi
mov dword [rsp + 0x20], edi
xor r9d, r9d
mov edx, 1
mov r8d, 6
mov r14d, 2
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r15, rax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea rcx, [0x180717d40]
mov rsi, 0xffffffffffffffff
cmp r15, rsi
jne 0x1801f027f
mov r15, rsi
jmp 0x1801f0291
mov dword [rbp - 0x50], edi
mov qword [rbp - 0x48], rcx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, edi
mov qword [rbp - 0x30], r15
cmp r15, 0xffffffffffffffff
je 0x1801f06c5
mov dword [rbp - 0x40], 1
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x40]
mov edx, 0xffff
mov r8d, 4
mov rcx, r15
call qword [sym.imp.WS2_32.dll_setsockopt]
call fcn.1801e1d10
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rbp - 0x18], rdi
mov word [rbp - 0x20], r14w
mov ecx, 0x7f000001
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x1c], eax
mov word [rbp - 0x1e], di
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov r8d, select
lea rdx, [rbp - 0x20]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_bind]
mov r14d, eax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r14d, r14d
je 0x1801f0343
cmp r14d, 0xffffffff
jne 0x1801f0343
test eax, eax
jne 0x1801f0709
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rbp - 0x38], select
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x20]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_getsockname]
mov r14d, eax
movsxd r12, dword [rbp - 0x38]
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r14d, r14d
je 0x1801f039b
cmp r14d, 0xffffffff
jne 0x1801f039b
test eax, eax
jne 0x1801f0709
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
cmp dword [rbp - 0x1c], eax
jne 0x1801f03b6
mov ecx, 0x7f000001
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x1c], eax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov edx, 0x7fffffff
mov rcx, r15
call qword [sym.imp.WS2_32.dll_listen]
mov r14d, eax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r14d, r14d
je 0x1801f0400
cmp r14d, 0xffffffff
jne 0x1801f0400
test eax, eax
jne 0x1801f0709
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], edi
xor r9d, r9d
mov edx, 1
mov r8d, 6
mov ecx, 2
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r14, rax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
cmp r14, 0xffffffffffffffff
jne 0x1801f0459
mov r14, rsi
jmp 0x1801f0472
mov dword [rbp - 0x50], edi
lea rax, [0x180717d40]
mov qword [rbp - 0x48], rax
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, edi
mov qword [rbp - 0x38], r14
cmp r14, 0xffffffffffffffff
je 0x1801f071a
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov r8d, r12d
lea rdx, [rbp - 0x20]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_connect]
mov r12d, eax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r12d, r12d
je 0x1801f04cc
cmp r12d, 0xffffffff
jne 0x1801f04cc
test eax, eax
jne 0x1801f0737
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.WS2_32.dll_accept]
mov r15, rax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea r12, [0x180717d40]
cmp r15, 0xffffffffffffffff
je 0x1801f0525
mov dword [rbp - 0x50], edi
mov qword [rbp - 0x48], r12
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov rsi, r15
mov eax, edi
mov qword [rbp - 0x28], rsi
cmp rsi, 0xffffffffffffffff
jne 0x1801f0537
test eax, eax
jne 0x1801f0761
mov dword [rbp - 0x3c], 1
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea r8, [rbp - 0x3c]
mov edx, 0x8004667e
mov rcx, r14
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r15d, eax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r15d, r15d
js 0x1801f0590
mov dword [rbp - 0x50], edi
mov qword [rbp - 0x48], r12
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
mov eax, edi
test r15d, r15d
cmovs eax, ecx
je 0x1801f05a2
test eax, eax
jne 0x1801f0761
mov dword [rbp - 0x40], 1
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x40]
mov edx, 6
mov r8d, 1
mov rcx, r14
call qword [sym.imp.WS2_32.dll_setsockopt]
call fcn.1801e1d10
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x3c], 1
cmp rsi, 0xffffffffffffffff
je 0x1801f0748
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea r8, [rbp - 0x3c]
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r15d, eax
call fcn.1801e1d10
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x48], rbx
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test r15d, r15d
js 0x1801f063d
mov dword [rbp - 0x50], edi
mov qword [rbp - 0x48], r12
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
cmovs edi, eax
test r15d, r15d
je 0x1801f064d
test edi, edi
jne 0x1801f0761
mov dword [rbp - 0x40], 1
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x40]
mov edx, 6
mov r8d, 1
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
call fcn.1801e1d10
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [r13], rsi
mov qword [r13 + 8], r14
lea rcx, [rbp - 0x30]
call fcn.1801f0110
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.18027f010
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
test eax, eax
jne 0x1801f0709
mov dword [rbp - 0x40], 1
call fcn.1801e1d10
mov qword [rbp - 0x18], rdi
mov word [rbp - 0x20], r14w
mov ecx, 0x7f000001
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x1c], eax
mov word [rbp - 0x1e], di
call fcn.1801e1d10
mov dword [rbp - 0x50], 0x2719
mov qword [rbp - 0x48], rax
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea rdx, str.socket_select_interrupter
lea rcx, [rbp - 0x50]
call fcn.1801e1c80
nop
test eax, eax
jne 0x1801f0737
call fcn.1801e1d10
mov dword [rbp - 0x50], 0x2719
mov qword [rbp - 0x48], rax
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea rdx, str.socket_select_interrupter
lea rcx, [rbp - 0x50]
call fcn.1801e1c80
nop
call fcn.1801e1d10
mov dword [rbp - 0x50], 0x2719
mov qword [rbp - 0x48], rax
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea rdx, str.socket_select_interrupter
lea rcx, [rbp - 0x50]
call fcn.1801e1c80
int3