Function at 0x14008df30
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 - 7]
sub rsp, 0xc0
mov rax, qword [0x1402a7978]
xor rax, rsp
mov qword [rbp - 9], rax
mov r12d, r8d
mov r14, rdx
mov rdi, rcx
mov rax, qword [rbp + 0x67]
mov qword [rbp - 0x69], rax
mov r15, qword [rbp + 0x77]
mov r13, qword [rbp + 0x7f]
xor esi, esi
cmp r8d, 2
je 0x14008df85
cmp r8d, 0x17
jne 0x14008e157
lea eax, [r9 - 1]
test eax, 0xfffffffb
jne 0x14008e157
xor eax, eax
lea edx, [rax + 0x10]
lock cmpxchg qword [rcx + 0x18], rsi
mov rbx, rax
mov qword [rbp - 0x49], rax
jne 0x14008e01e
mov dword [rbp - 0x41], 0x25a207b9
mov dword [rbp - 0x3d], 0x4660ddf3
mov dword [rbp - 0x39], 0xe576e98e
mov dword [rbp - 0x35], 0x3e06748c
mov dword [rbp - 0x31], esi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea rax, [rbp - 0x31]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [rbp - 0x49]
mov qword [rsp + 0x20], rax
mov r9d, edx
lea r8, [rbp - 0x41]
mov edx, 0xc8000006
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x14008e00d
mov rax, rdi
mov qword [rbp - 0x49], rax
jmp 0x14008e011
mov rax, qword [rbp - 0x49]
xchg qword [rdi + 0x18], rax
mov rbx, qword [rbp - 0x49]
mov edx, select
cmp rbx, rdi
cmove rbx, rsi
test rbx, rbx
je 0x14008e157
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x29], xmm0
mov qword [rbp - 0x19], rax
mov dword [rbp - 0x11], eax
mov word [rbp - 0x29], r12w
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
jne 0x14008e05c
mov edx, 0x2719
lea rcx, [r15 + 0x38]
call fcn.140062430
jmp 0x14008e082
mov r8d, 0x1c
cmp r12d, 2
cmove r8d, edx
lea rdx, [rbp - 0x29]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
setne dl
lea rcx, [r15 + 0x38]
call fcn.14005dde0
cmp dword [r15 + 0x38], esi
je 0x14008e0f5
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x140308a4c], eax
jle 0x14008e0d1
lea rcx, [0x140308a4c]
call fcn.1401568cc
cmp dword [0x140308a4c], 0xffffffff
jne 0x14008e0d1
lea rcx, [0x1401ae860]
call fcn.140156e18
lea rcx, [0x140308a4c]
call fcn.140156860
mov rcx, qword [r15 + 0x40]
mov rax, qword [0x1402a9350]
cmp qword [rcx + 8], rax
jne 0x14008e0ec
cmp dword [r15 + 0x38], 0x2726
je 0x14008e0f5
mov rcx, qword [rdi + 8]
jmp 0x14008e19c
mov byte [r15 + 0x68], 1
mov rax, qword [rdi + 8]
lock inc dword [rax + 0x30]
mov qword [rsp + 0x30], r13
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, dword [rbp + 0x6f]
mov rdx, qword [rbp - 0x69]
mov rcx, qword [r14]
call rbx
mov ebx, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x14008e149
cmp eax, 0x3e5
je 0x14008e149
xor r9d, r9d
mov r8d, eax
mov rdx, r13
mov rcx, qword [rdi + 8]
call fcn.14005dcf0
jmp 0x14008e1a8
mov rdx, r13
mov rcx, qword [rdi + 8]
call fcn.14005dc60
jmp 0x14008e1a8
xor eax, eax
lock cmpxchg qword [rdi + 0x10], rsi
mov rsi, rax
jne 0x14008e176
mov rcx, qword [rdi]
mov rcx, qword [rcx]
call fcn.14008f870
mov rsi, rax
xchg qword [rdi + 0x10], rax
test byte [r14 + 8], 3
jne 0x14008e203
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
jne 0x14008e1d4
mov edx, 0x2719
lea rcx, [r15 + 0x38]
call fcn.140062430
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r15
call fcn.14008b970
mov eax, 0xffffffff
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140156510
mov rbx, qword [rsp + 0x118]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rbp - 0x2d], 1
lea r8, [rbp - 0x2d]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
mov edx, eax
shr edx, 0x1f
lea rcx, [r15 + 0x38]
call fcn.14005dde0
test ebx, ebx
js 0x14008e198
or byte [r14 + 8], 2
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
jne 0x14008e21c
mov edx, 0x2719
lea rcx, [r15 + 0x38]
call fcn.140062430
jmp 0x14008e242
mov r8d, dword [rbp + 0x6f]
mov rdx, qword [rbp - 0x69]
call qword [sym.imp.WS2_32.dll_connect]
mov ebx, eax
test eax, eax
setne dl
lea rcx, [r15 + 0x38]
call fcn.14005dde0
test ebx, ebx
je 0x14008e198
mov ebx, 4
mov rax, qword gs:[0x58]
add rbx, qword [rax]
mov edx, dword [0x140308a4c]
cmp edx, dword [rbx]
jle 0x14008e292
lea rcx, [0x140308a4c]
call fcn.1401568cc
mov edx, dword [0x140308a4c]
cmp edx, 0xffffffff
jne 0x14008e292
lea rcx, [0x1401ae860]
call fcn.140156e18
lea rcx, [0x140308a4c]
call fcn.140156860
mov edx, dword [0x140308a4c]
mov rcx, qword [r15 + 0x40]
mov rax, qword [0x1402a9350]
cmp qword [rcx + 8], rax
jne 0x14008e2ad
cmp dword [r15 + 0x38], 0x2734
je 0x14008e301
cmp edx, dword [rbx]
jle 0x14008e2de
lea rcx, [0x140308a4c]
call fcn.1401568cc
cmp dword [0x140308a4c], 0xffffffff
jne 0x14008e2de
lea rcx, [0x1401ae860]
call fcn.140156e18
lea rcx, [0x140308a4c]
call fcn.140156860
mov rcx, qword [r15 + 0x40]
mov rax, qword [0x1402a9350]
cmp qword [rcx + 8], rax
jne 0x14008e198
cmp dword [r15 + 0x38], 0x2733
jne 0x14008e198
xor eax, eax
mov dword [rbp - 0x59], eax
lea rax, [0x1402a9358]
mov qword [rbp - 0x51], rax
movups xmm0, xmmword [rbp - 0x59]
movups xmmword [r15 + 0x38], xmm0
mov rbx, qword [r14]
lea rcx, [rsi + 0x30]
mov qword [rbp - 0x69], rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rbp - 0x61], 1
cmp byte [rsi + 0x1e8], 0
je 0x14008e34a
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
mov rdx, r15
call fcn.14008b970
jmp 0x14008e372
lea rcx, [rsi + 0x110]
mov r8, r15
mov rdx, rbx
call fcn.14008e880
mov rcx, qword [rsi + 0x28]
lock inc dword [rcx + 0x30]
test al, al
je 0x14008e372
lea rcx, [rsi + 0x58]
call fcn.14005e040
nop
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 3
jmp 0x14008e1ad