Function at 0x18001ebd0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push rbp
push rsi
push rdi
push r14
mov rbp, rsp
sub rsp, 0x78
mov rax, qword [0x18002f108]
xor rax, rsp
mov qword [rbp - 0x20], rax
mov rdi, r9
mov r14d, r8d
mov esi, edx
cmp ecx, 2
jne 0x18001ef50
mov ecx, edx
sub ecx, 1
je 0x18001ec0c
cmp ecx, 1
jne 0x18001ef50
cmp rdi, 0x1000
jb 0x18001ef50
movabs rax, 0xffff800000000000
test rax, rdi
jne 0x18001ef50
mov qword [rsp + 0x70], rbx
xorps xmm0, xmm0
xor ebx, ebx
mov qword [r9 + 8], 0xffffffffffffffff
mov qword [r9], 0xffffffffffffffff
xor r9d, r9d
mov qword [rsp + 0x68], r15
mov r15d, 2
mov dword [rsp + 0x28], ebx
mov ecx, r15d
mov dword [rbp - 0x40], r15d
mov dword [rsp + 0x20], ebx
mov qword [rbp - 0x28], rbx
mov dword [rbp - 0x3c], 0x100007f
movdqu xmmword [rbp - 0x38], xmm0
cmp esi, 1
jne 0x18001edc3
mov edx, esi
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18001ed9e
lea r9, [rbp - 0x44]
mov dword [rbp - 0x44], 1
mov edx, 0xffff
mov dword [rbp - 0x48], 4
lea r8d, [rbx + 4]
mov dword [rsp + 0x20], 4
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x18001ed76
lea r8d, [rbx + 0x10]
mov dword [rbp - 0x48], reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x18001ed76
movsxd r8, dword [rbp - 0x48]
lea rcx, [rbp - 0x40]
xor edx, edx
call sub.VCRUNTIME140.dll_memset
lea r8, [rbp - 0x48]
mov rcx, rsi
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x18001ed76
lea edx, [rbx + 1]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x18001ed76
mov dword [rsp + 0x28], ebx
lea edx, [rbx + 1]
xor r9d, r9d
mov dword [rsp + 0x20], ebx
mov r8d, r14d
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
je 0x18001ed76
mov r8d, dword [rbp - 0x48]
lea rdx, [rbp - 0x40]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x18001ed76
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rdi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x18001ed76
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x18001eef0
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x18001ed8e
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 8]
cmp rcx, 0xffffffffffffffff
je 0x18001ed9e
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffff1f
mov rbx, qword [rsp + 0x70]
mov r15, qword [rsp + 0x68]
mov rcx, qword [rbp - 0x20]
xor rcx, rsp
call fcn.18001f500
add rsp, 0x78
pop r14
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r8d, reloc.WS2_32.dll_recv
mov dword [rbp - 0x48], reloc.WS2_32.dll_recv
mov rcx, rax
mov qword [rdi], rax
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x18001ed7f
mov dword [rsp + 0x28], ebx
xor r9d, r9d
mov r8d, r14d
mov dword [rsp + 0x20], ebx
mov edx, esi
mov dword [rbp - 0x30], r15d
mov ecx, r15d
mov dword [rbp - 0x2c], 0x100007f
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov r8d, dword [rbp - 0x48]
lea rdx, [rbp - 0x30]
mov rcx, rax
mov qword [rdi + 8], rax
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x18001ed7f
mov rcx, qword [rdi]
lea r8, [rbp - 0x44]
mov edx, 0x8004667e
mov dword [rbp - 0x44], ebx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x18001ed9e
mov rcx, qword [rdi + 8]
lea r8, [rbp - 0x44]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x18001ed9e
mov eax, dword [rbp - 0x48]
lea rcx, [rbp - 0x40]
add eax, eax
xor edx, edx
movsxd r8, eax
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rdi]
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x18001ed7f
mov rcx, qword [rdi + 8]
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x18001ed7f
mov r8d, dword [rbp - 0x48]
lea rdx, [rbp - 0x30]
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x18001ed7f
mov r8d, dword [rbp - 0x48]
lea rdx, [rbp - 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x18001ed7f
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [rdi + rbx*8]
lea r8, [rbp - 0x44]
mov edx, 0x8004667e
mov dword [rbp - 0x44], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x18001ef41
lea ecx, [rax + 0x11]
call qword [sym.imp.VBoxRT.dll_RTLogRelGetDefaultInstanceEx]
mov rsi, rax
test rax, rax
je 0x18001ef41
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor r8d, r8d
lea r9, str.FIONBIO:__R_sockerr__n
mov rcx, rsi
mov dword [rsp + 0x20], eax
lea edx, [r8 + 0x10]
call qword [sym.imp.VBoxRT.dll_RTLogLoggerEx]
inc rbx
cmp rbx, r15
jl 0x18001eef0
xor eax, eax
jmp 0x18001eda3
mov eax, 0xfffffffe
jmp 0x18001edad