Function at 0x1400b8440
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
push rbp
sub rsp, 0xa8
mov ebx, r8d
mov r14, qword [rsp + 0x110]
mov rdi, rdx
mov rsi, rcx
cmp ebx, 0x17
je 0x1400b846a
cmp ebx, 2
jne 0x1400b847e
cmp r9d, 1
je 0x1400b8733
cmp r9d, 5
je 0x1400b8733
xor edx, edx
lea rbx, [rsi + 0x10]
mov rcx, rbx
xor eax, eax
lock cmpxchg qword [rcx], rdx
mov rbp, rax
test rbp, rbp
je 0x1400b86f2
test byte [rdi + 8], 3
jne 0x1400b851e
mov rbx, qword [rdi]
cmp rbx, 0xffffffffffffffff
je 0x1400b86cf
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rbx
mov edx, 0x8004667e
mov dword [rsp + 0x74], 1
lea r8, [rsp + 0x74]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov esi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
call fcn.1400cc560
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
test esi, esi
jl 0x1400b85b2
mov dword [rsp + 0x50], 0
call fcn.1400cc560
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
or byte [rdi + 8], 2
mov rbx, qword [rdi]
cmp rbx, 0xffffffffffffffff
je 0x1400b8576
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdx, qword [rsp + 0x100]
mov rcx, rbx
mov r8d, dword [rsp + 0x108]
call qword [sym.imp.WS2_32.dll_connect]
mov esi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
call fcn.1400cc560
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
test esi, esi
je 0x1400b8644
jmp 0x1400b8594
call fcn.1400cc560
mov dword [rsp + 0x50], 0x2719
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
call fcn.1400cc560
cmp rax, qword [r14 + 0x40]
je 0x1400b86c0
call fcn.1400cc560
cmp rax, qword [r14 + 0x40]
je 0x1400b8667
mov rbx, qword [rbp + 0x28]
lea rdx, [rbx + 0x30]
mov eax, 1
lock xadd dword [rdx], eax
mov rcx, qword [rbx + 0x28]
xor edx, edx
xor r8d, r8d
mov r9, r14
mov dword [r14 + 0x30], 1
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1400b8634
lea rbp, [rbx + 0x60]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rbx + 0x98]
mov qword [r14 + 0x20], 0
test rax, rax
je 0x1400b860f
mov qword [rax + 0x20], r14
mov qword [rbx + 0x98], r14
jmp 0x1400b861d
mov qword [rbx + 0x98], r14
mov qword [rbx + 0x90], r14
add rbx, 0x58
mov eax, 1
mov rdx, rbx
xchg dword [rdx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov dword [rsp + 0x50], 0
call fcn.1400cc560
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
jmp 0x1400b85b2
cmp dword [r14 + 0x38], 0x2733
jne 0x1400b85b2
mov dword [rsp + 0x50], 0
call fcn.1400cc560
mov qword [rsp + 0x58], rax
mov rbx, rsp
mov rcx, rbp
mov edx, 3
mov r9, r14
mov r8, qword [rdi]
mov dword [rbx + 0x20], 0
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
call fcn.1400b7670
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
cmp dword [r14 + 0x38], 0x2734
je 0x1400b8675
jmp 0x1400b85a3
call fcn.1400cc560
mov dword [rsp + 0x50], 0x2719
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
jmp 0x1400b85b2
mov rbp, qword [rsi]
lea rdx, [rsp + 0x78]
lea r8, [0x140010050]
lea rax, vtable.type_info.0
mov qword [rsp + 0x78], rax
mov rcx, qword [rbp + 8]
mov qword [rsp + 0x80], 0
call fcn.14009da30
mov rbp, rax
mov rdx, rbx
mov rax, rbp
xchg qword [rdx], rax
jmp 0x1400b849a
xor edx, edx
lea r15, [rsi + 0x18]
mov rcx, r15
xor eax, eax
lock cmpxchg qword [rcx], rdx
mov rbp, rax
mov qword [rsp + 0xa0], rbp
test rbp, rbp
je 0x1400b8a99
cmp rbp, rsi
je 0x1400b847e
test rbp, rbp
je 0x1400b847e
vpxor xmm0, xmm0, xmm0
vmovups xmmword [rsp + 0x80], xmm0
vmovq qword [rsp + 0x90], xmm0
vmovd dword [rsp + 0x98], xmm0
mov r15, qword [rdi]
mov word [rsp + 0x80], bx
cmp r15, 0xffffffffffffffff
je 0x1400b87f4
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, select
mov r8d, 0x1c
cmp ebx, 2
mov rcx, r15
cmove r8d, eax
lea rdx, [rsp + 0x80]
call qword [sym.imp.WS2_32.dll_bind]
mov r15d, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
call fcn.1400cc560
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
test r15d, r15d
je 0x1400b89e3
jmp 0x1400b8812
call fcn.1400cc560
mov dword [rsp + 0x50], 0x2719
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
cmp dword [r14 + 0x38], 0
jne 0x1400b8942
mov rdx, qword [rsi + 8]
add rdx, 0x30
mov byte [r14 + 0x60], 1
mov eax, 1
lock xadd dword [rdx], eax
mov rbx, rsp
xor eax, eax
xor r9d, r9d
mov rcx, qword [rdi]
mov rdx, qword [rsp + 0x100]
mov r8d, dword [rsp + 0x108]
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], r14
call rbp
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
test ebx, ebx
jne 0x1400b8916
cmp ebp, 0x3e5
je 0x1400b8916
mov rbx, qword [rsi + 8]
mov dword [r14 + 0x30], 1
call fcn.1400cc560
mov rcx, qword [rbx + 0x28]
xor edx, edx
mov r8d, 2
mov r9, r14
mov qword [r14], rax
mov dword [r14 + 0x10], ebp
mov dword [r14 + 0x14], 0
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1400b8932
lea rbp, [rbx + 0x60]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rbx + 0x98]
mov qword [r14 + 0x20], 0
test rax, rax
je 0x1400b88e1
mov qword [rax + 0x20], r14
mov qword [rbx + 0x98], r14
jmp 0x1400b88ef
mov qword [rbx + 0x98], r14
mov qword [rbx + 0x90], r14
add rbx, 0x58
mov eax, 1
mov rdx, rbx
xchg dword [rdx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov ecx, 1
lea rdi, [r14 + 0x30]
xor eax, eax
mov rbx, qword [rsi + 8]
lock cmpxchg dword [rdi], ecx
cmp eax, 1
je 0x1400b8a06
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
call fcn.1400cc560
cmp rax, qword [r14 + 0x40]
je 0x1400b8a86
mov rbx, qword [rsi + 8]
lea rdx, [rbx + 0x30]
mov eax, 1
lock xadd dword [rdx], eax
mov rcx, qword [rbx + 0x28]
xor edx, edx
xor r8d, r8d
mov r9, r14
mov dword [r14 + 0x30], 1
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1400b89d3
lea rbp, [rbx + 0x60]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rbx + 0x98]
mov qword [r14 + 0x20], 0
test rax, rax
je 0x1400b89ae
mov qword [rax + 0x20], r14
mov qword [rbx + 0x98], r14
jmp 0x1400b89bc
mov qword [rbx + 0x98], r14
mov qword [rbx + 0x90], r14
add rbx, 0x58
mov eax, 1
mov rdx, rbx
xchg dword [rdx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov dword [rsp + 0x50], 0
call fcn.1400cc560
mov qword [rsp + 0x58], rax
vmovups xmm0, xmmword [rsp + 0x50]
vmovups xmmword [r14 + 0x38], xmm0
jmp 0x1400b8812
mov rcx, qword [rbx + 0x28]
xor edx, edx
mov r8d, 2
mov r9, r14
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1400b8932
lea rbp, [rbx + 0x60]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rbx + 0x98]
mov qword [r14 + 0x20], 0
test rax, rax
je 0x1400b8a51
mov qword [rax + 0x20], r14
mov qword [rbx + 0x98], r14
jmp 0x1400b8a5f
mov qword [rbx + 0x98], r14
mov qword [rbx + 0x90], r14
add rbx, 0x58
mov eax, 1
mov rdx, rbx
xchg dword [rdx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0xa8
pop rbp
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
cmp dword [r14 + 0x38], 0x2726
je 0x1400b881d
jmp 0x1400b8951
mov r11, rsp
lea r8, [rsp + 0x60]
mov rcx, qword [rdi]
mov edx, 0xc8000006
mov r9d, setsockopt
lea rax, [rsp + 0xa0]
xor r10d, r10d
lea rbp, [rsp + 0x70]
mov dword [rsp + 0x70], 0
mov qword [r11 + 0x20], rax
mov dword [r11 + 0x28], 8
mov qword [r11 + 0x30], rbp
mov qword [r11 + 0x38], r10
mov qword [r11 + 0x40], r10
vmovups xmm0, xmmword [0x140152da0]
vmovups xmmword [r8], xmm0
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1400b8b03
mov qword [rsp + 0xa0], rsi
mov rax, rsi
jmp 0x1400b8b0b
mov rax, qword [rsp + 0xa0]
mov rdx, r15
xchg qword [rdx], rax
mov rbp, qword [rsp + 0xa0]
jmp 0x1400b8757