Function at 0x180008200
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xd0
mov rax, qword [0x18009e010]
xor rax, rsp
mov qword [rbp - 1], rax
mov ebx, r8d
mov r15, rdx
mov rsi, rcx
mov r12, qword [rbp + 0x6f]
mov rdi, qword [rbp + 0x7f]
xor r13d, r13d
cmp r8d, 2
je 0x18000824d
cmp ebx, 0x17
jne 0x1800083ef
lea eax, [r9 - 1]
test eax, 0xfffffffb
jne 0x1800083ef
xor eax, eax
lea edx, [rax + 0x10]
lock cmpxchg qword [rcx + 0x18], r13
mov r14, rax
mov qword [rbp - 0x61], rax
jne 0x1800082e4
mov dword [rbp - 0x31], 0x25a207b9
mov dword [rbp - 0x2d], 0x4660ddf3
mov dword [rbp - 0x29], 0xe576e98e
mov dword [rbp - 0x25], 0x3e06748c
mov dword [rbp - 0x49], r13d
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
lea rax, [rbp - 0x49]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [rbp - 0x61]
mov qword [rsp + 0x20], rax
mov r9d, edx
lea r8, [rbp - 0x31]
mov edx, 0xc8000006
mov rcx, qword [r15]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rcx, qword [rbp - 0x61]
test eax, eax
cmovne rcx, rsi
mov qword [rbp - 0x61], rcx
xchg qword [rsi + 0x18], rcx
mov r14, qword [rbp - 0x61]
mov edx, select
cmp r14, rsi
cmove r14, r13
test r14, r14
je 0x1800083ef
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x21], xmm0
mov qword [rbp - 0x11], rax
mov dword [rbp - 9], eax
mov word [rbp - 0x21], bx
mov rcx, qword [r15]
cmp rcx, 0xffffffffffffffff
jne 0x180008323
mov dword [rbp - 0x71], 0x2719
call fcn.180003050
mov qword [rbp - 0x69], rax
jmp 0x180008359
mov r8d, 0x1c
cmp ebx, 2
cmove r8d, edx
lea rdx, [rbp - 0x21]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x180008344
mov dword [rdi + 0x38], r13d
jmp 0x180008361
call fcn.180003050
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x71], eax
mov qword [rbp - 0x69], rbx
movups xmm0, xmmword [rbp - 0x71]
movups xmmword [rdi + 0x38], xmm0
cmp dword [rdi + 0x38], r13d
je 0x18000838c
call fcn.180003050
mov rdx, qword [rdi + 0x40]
mov rax, qword [rax + 8]
cmp qword [rdx + 8], rax
jne 0x180008383
cmp dword [rdi + 0x38], 0x2726
je 0x18000838c
mov rcx, qword [rsi + 8]
jmp 0x18000845f
mov byte [rdi + 0x60], 1
mov rax, qword [rsi + 8]
lock inc dword [rax + 0x30]
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
xor r9d, r9d
mov r8d, dword [rbp + 0x77]
mov rdx, r12
mov rcx, qword [r15]
call r14
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x1800083e1
cmp eax, 0x3e5
je 0x1800083e1
xor r9d, r9d
mov r8d, eax
mov rdx, rdi
mov rcx, qword [rsi + 8]
call fcn.180005f60
jmp 0x180008467
mov rdx, rdi
mov rcx, qword [rsi + 8]
call fcn.180005ec0
jmp 0x180008467
xor eax, eax
lock cmpxchg qword [rsi + 0x10], r13
mov r14, rax
jne 0x180008433
mov rax, qword [rsi]
mov r10, qword [rax]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x59], xmm0
xor edx, edx
lea rcx, [rbp - 0x59]
call fcn.18000eba0
mov r9, qword [r10 + 0x28]
lea r8, [0x18000ebd0]
lea rdx, [rbp - 0x59]
mov rcx, r10
call fcn.1800051d0
mov r14, rax
xchg qword [rsi + 0x10], rax
test byte [r15 + 8], 3
jne 0x1800084b1
mov rcx, qword [r15]
cmp rcx, 0xffffffffffffffff
jne 0x18000848e
call fcn.180003050
mov dword [rbp - 0x59], 0x2719
mov qword [rbp - 0x51], rax
movups xmm0, xmmword [rbp - 0x59]
movups xmmword [rdi + 0x38], xmm0
mov rcx, qword [r14 + 0x28]
mov rdx, rdi
call fcn.180005640
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.180049ee0
mov rbx, qword [rsp + 0x128]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rbp - 0x45], 1
lea r8, [rbp - 0x45]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x1800084cc
mov dword [rdi + 0x38], r13d
or byte [r15 + 8], 2
mov rcx, qword [r15]
cmp rcx, 0xffffffffffffffff
jne 0x1800084e6
call fcn.180003050
mov dword [rbp - 0x71], 0x2719
mov qword [rbp - 0x69], rax
jmp 0x180008515
call fcn.180003050
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x59], eax
mov qword [rbp - 0x51], rbx
jmp 0x180008453
mov r8d, dword [rbp + 0x77]
mov rdx, r12
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x180008500
mov dword [rdi + 0x38], r13d
jmp 0x18000845b
call fcn.180003050
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp - 0x71], eax
mov qword [rbp - 0x69], rbx
movups xmm0, xmmword [rbp - 0x71]
movups xmmword [rdi + 0x38], xmm0
call fcn.180003050
mov rcx, qword [rdi + 0x40]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x180008539
cmp dword [rdi + 0x38], 0x2734
je 0x18000855d
call fcn.180003050
mov rcx, qword [rdi + 0x40]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x18000845b
cmp dword [rdi + 0x38], 0x2733
jne 0x18000845b
mov dword [rbp - 0x71], r13d
lea rax, [0x18009ed88]
mov qword [rbp - 0x69], rax
movups xmm0, xmmword [rbp - 0x71]
movups xmmword [rdi + 0x38], xmm0
mov rsi, qword [r15]
lea rbx, [r14 + 0x30]
mov qword [rbp - 0x41], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rbp - 0x39], 1
cmp byte [r14 + 0x1a8], 0
je 0x1800085b1
mov rdx, rdi
mov rcx, qword [r14 + 0x28]
call fcn.180005640
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180008467
lea rcx, [r14 + 0x110]
mov r8, rdi
mov rdx, rsi
call fcn.18000a070
mov rcx, qword [r14 + 0x28]
lock inc dword [rcx + 0x30]
test al, al
je 0x1800085d9
lea rcx, [r14 + 0x58]
call fcn.180006f30
nop
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180008467