Function at 0x14000bbac
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x38]
sub rsp, 0x110
mov r12d, r8d
mov r14, rdx
mov rdi, rcx
mov r15, qword [rbp + 0x70]
xor r13d, r13d
cmp r8d, 2
je 0x14000bbef
cmp r8d, 0x17
jne 0x14000bda8
lea eax, [r9 - 1]
test eax, 0xfffffffb
jne 0x14000bda8
xor eax, eax
lea ecx, [rax + 0x10]
lock cmpxchg qword [rdi + 0x18], r13
mov rbx, rax
mov qword [rsp + 0x60], rax
jne 0x14000bc97
mov dword [rsp + 0x50], 0x25a207b9
mov dword [rsp + 0x54], 0x4660ddf3
mov dword [rsp + 0x58], 0xe576e98e
mov dword [rsp + 0x5c], 0x3e06748c
mov dword [rbp + 0x50], r13d
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
lea rax, [rbp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, ecx
lea r8, [rsp + 0x50]
mov edx, 0xc8000006
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x14000bc84
mov rax, rdi
mov qword [rsp + 0x60], rax
jmp 0x14000bc89
mov rax, qword [rsp + 0x60]
xchg qword [rdi + 0x18], rax
mov rbx, qword [rsp + 0x60]
mov ecx, reloc.WS2_32.dll_recv
cmp rbx, rdi
cmove rbx, r13
test rbx, rbx
je 0x14000bda8
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x60], rax
mov dword [rbp - 0x58], eax
mov word [rbp - 0x70], r12w
lea rsi, [r15 + 0x38]
cmp qword [r14], 0xffffffffffffffff
jne 0x14000bcd5
mov edx, 0x2719
mov rcx, rsi
call fcn.1400238c8
jmp 0x14000bcfd
mov r8d, 0x1c
cmp r12d, 2
cmove r8d, ecx
lea rdx, [rbp - 0x70]
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
setne dl
mov rcx, rsi
call fcn.1400080a8
test byte [rsi + 0x10], 1
je 0x14000bd12
cmp qword [rsi + 0x10], 1
jne 0x14000bd19
cmp dword [rsi], r13d
setne al
jmp 0x14000bd15
mov al, r13b
test al, al
je 0x14000bd40
mov edx, 0x2726
lea rcx, [rbp - 0x38]
call fcn.140023954
lea rdx, [rbp - 0x38]
mov rcx, rsi
call fcn.140007234
test al, al
jne 0x14000bd40
mov rcx, qword [rdi + 8]
jmp 0x14000be0e
mov byte [r15 + 0x70], 1
mov rax, qword [rdi + 8]
lock inc dword [rax + 0x30]
mov rsi, qword [rbp + 0x78]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
xor r9d, r9d
mov r8d, dword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov rcx, qword [r14]
call rbx
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x14000bd9a
cmp eax, 0x3e5
je 0x14000bd9a
xor r9d, r9d
mov r8d, eax
mov rdx, rsi
mov rcx, qword [rdi + 8]
call fcn.1400096a8
jmp 0x14000be1a
mov rdx, rsi
mov rcx, qword [rdi + 8]
call fcn.140009614
jmp 0x14000be1a
xor eax, eax
lock cmpxchg qword [rdi + 0x10], r13
mov rsi, rax
jne 0x14000bdec
mov rax, qword [rdi]
mov r10, qword [rax]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x80], xmm0
xor edx, edx
lea rcx, [rbp - 0x80]
call fcn.14003391c
mov r9, qword [r10 + 0x28]
lea r8, [0x14003393c]
lea rdx, [rbp - 0x80]
mov rcx, r10
call fcn.140007e04
mov rsi, rax
xchg qword [rdi + 0x10], rax
lea rdi, [r15 + 0x38]
test byte [r14 + 8], 3
jne 0x14000be71
cmp qword [r14], 0xffffffffffffffff
jne 0x14000be3e
mov edx, 0x2719
mov rcx, rdi
call fcn.1400238c8
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r15
call fcn.140009588
or eax, 0xffffffff
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov dword [rsp + 0x68], 1
lea r8, [rsp + 0x68]
mov edx, 0x8004667e
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
mov edx, eax
shr edx, 0x1f
mov rcx, rdi
call fcn.1400080a8
test ebx, ebx
js 0x14000be0a
or byte [r14 + 8], 2
cmp qword [r14], 0xffffffffffffffff
jne 0x14000be86
mov edx, 0x2719
mov rcx, rdi
call fcn.1400238c8
jmp 0x14000beae
mov r8d, dword [rbp + 0x68]
mov rdx, qword [rbp + 0x60]
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
test eax, eax
setne dl
mov rcx, rdi
call fcn.1400080a8
test ebx, ebx
je 0x14000be0a
mov edx, 0x2734
lea rcx, [rbp - 0x20]
call fcn.140023954
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.140007234
test al, al
jne 0x14000beee
mov edx, 0x2733
lea rcx, [rbp - 8]
call fcn.140023954
lea rdx, [rbp - 8]
mov rcx, rdi
call fcn.140007234
test al, al
je 0x14000be0a
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], r13
movups xmmword [rdi], xmm0
movsd xmm0, qword [rbp - 0x40]
movsd qword [rdi + 0x10], xmm0
mov rbx, qword [r14]
lea rcx, [rsi + 0x30]
mov qword [rsp + 0x70], rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x78], 1
cmp byte [rsi + 0x1e8], r13b
je 0x14000bf38
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r15
call fcn.140009588
jmp 0x14000bf60
lea rcx, [rsi + 0x110]
mov r8, r15
mov rdx, rbx
call fcn.14001bf18
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
test al, al
je 0x14000bf60
lea rcx, [rsi + 0x58]
call fcn.14000a7d8
nop
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x14000be1d