Function at 0x14001a980
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov ebp, r8d
mov rdi, rdx
mov r12, rcx
mov rsi, qword [rsp + 0x100]
mov r14, qword [rsp + 0xf8]
mov r15, qword [rsp + 0xf0]
cmp r8d, 0x17
je 0x14001a9c3
cmp ebp, 2
jne 0x14001aad5
and r9d, 0xfffffffb
cmp r9d, 1
jne 0x14001aad5
xor ecx, ecx
xor eax, eax
lock cmpxchg qword [r12 + 0x18], rcx
mov rbx, rax
mov qword [rsp + 0x50], rax
jne 0x14001aa54
movups xmm0, xmmword [section..rdata]
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x5c], 0
mov rcx, qword [rdi]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 8
lea r8, [rsp + 0x60]
mov edx, 0xc8000006
mov r9d, select
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x14001aa45
mov qword [rsp + 0x50], r12
mov rax, r12
jmp 0x14001aa4a
mov rax, qword [rsp + 0x50]
xchg qword [r12 + 0x18], rax
mov rbx, qword [rsp + 0x50]
cmp rbx, r12
je 0x14001aad5
test rbx, rbx
je 0x14001aad5
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x6c], xmm0
mov word [rsp + 0x60], bp
lea r13, [rsi + 0x38]
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x14001adce
cmp ebp, 2
mov eax, select
mov r8d, 0x1c
cmove r8d, eax
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14001ae18
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov rax, qword [0x14015f250]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
jne 0x14001aedc
test ebp, ebp
setne al
jmp 0x14001aeef
xor ecx, ecx
xor eax, eax
lock cmpxchg qword [r12 + 0x10], rcx
jne 0x14001aafe
mov rax, qword [r12]
mov rcx, qword [rax]
call fcn.14001d080
mov rbx, rax
xchg qword [r12 + 0x10], rax
test byte [rdi + 8], 3
jne 0x14001ab4a
jmp 0x14001ab07
mov rbx, rax
test byte [rdi + 8], 3
jne 0x14001ab4a
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x14001ad4d
mov dword [rsp + 0x60], 1
lea r8, [rsp + 0x60]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x14001ada6
lea rax, [rsi + 0x38]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
or byte [rdi + 8], 2
lea r12, [rsi + 0x38]
mov rcx, qword [rdi]
movabs r13, 0x595588bd12bf6fe8
cmp rcx, 0xffffffffffffffff
je 0x14001ab8f
mov rdx, r15
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x14001abcc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov rax, qword [0x14015f250]
shr rax, 1
cmp rax, r13
jne 0x14001abe2
test ebp, ebp
setne al
jmp 0x14001abf5
mov rax, qword [0x14015f250]
shr rax, 1
cmp rax, r13
je 0x14001abbd
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2719
call qword [rax + 0x30]
mov ecx, 2
test al, al
je 0x14001abc2
mov ecx, 3
mov qword [r12], 0x2719
jmp 0x14001ac06
xorps xmm0, xmm0
movups xmmword [r12], xmm0
mov qword [r12 + 0x10], 0
jmp 0x14001ae60
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, ebp
call qword [rax + 0x30]
movzx ecx, al
or rcx, 2
mov dword [rsi + 0x38], ebp
mov dword [rsi + 0x3c], 0
lea r14, [0x14015f248]
mov qword [rsi + 0x40], r14
mov qword [rsi + 0x48], rcx
mov rax, qword [0x14015f250]
shr rax, 1
cmp rax, r13
jne 0x14001ac2f
lea r15, [rsi + 0x48]
mov eax, 1
jmp 0x14001ac53
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2734
call qword [rax + 0x30]
lea r15, [rsi + 0x48]
mov rax, qword [rsi + 0x48]
cmp rax, 1
je 0x14001ac95
cmp dword [r12], 0x2734
jne 0x14001ac95
lea rcx, [0x14015f248]
mov rdx, rcx
test rax, rax
je 0x14001ac70
mov rdx, qword [rsi + 0x40]
mov rax, qword [0x14015f250]
xor r8d, r8d
cmp rdx, rcx
sete r8b
xor ecx, ecx
cmp qword [rdx + 8], rax
sete cl
test rax, rax
cmove ecx, r8d
test cl, cl
jne 0x14001ad0c
mov rax, qword [0x14015f250]
shr rax, 1
cmp rax, r13
je 0x14001acba
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2733
call qword [rax + 0x30]
mov rcx, qword [r15]
cmp rcx, 1
je 0x14001ae60
cmp dword [r12], 0x2733
jne 0x14001ae60
mov rax, r14
test rcx, rcx
je 0x14001ace1
mov rax, qword [rsi + 0x40]
mov rcx, qword [0x14015f250]
xor edx, edx
cmp rax, r14
sete dl
xor r8d, r8d
cmp qword [rax + 8], rcx
sete r8b
test rcx, rcx
cmove r8d, edx
cmp r8b, 1
jne 0x14001ae60
xorps xmm0, xmm0
movups xmmword [r12], xmm0
mov qword [r12 + 0x10], 0
mov r8, qword [rdi]
add rdi, 0x20
mov qword [rsp + 0x20], rsi
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x28], 0
mov ebp, 3
mov rcx, rbx
mov edx, 3
mov r9, rdi
call fcn.14001c8a0
jmp 0x14001b0ed
mov rax, qword [0x14015f250]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
je 0x14001ad85
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2719
call qword [rax + 0x30]
mov ecx, 2
test al, al
je 0x14001ad8a
mov ecx, 3
mov qword [rsi + 0x38], 0x2719
lea rax, [0x14015f248]
mov qword [rsi + 0x40], rax
mov qword [rsi + 0x48], rcx
jmp 0x14001ae60
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov rax, qword [0x14015f250]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
jne 0x14001ae2d
test edi, edi
setne al
jmp 0x14001ae40
mov rax, qword [0x14015f250]
shr rax, 1
movabs rcx, 0x595588bd12bf6fe8
cmp rax, rcx
je 0x14001ae06
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2719
call qword [rax + 0x30]
mov ecx, 2
test al, al
je 0x14001ae0b
mov ecx, 3
mov qword [r13], 0x2719
jmp 0x14001af00
xorps xmm0, xmm0
movups xmmword [r13], xmm0
mov qword [r13 + 0x10], 0
jmp 0x14001af14
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, edi
call qword [rax + 0x30]
movzx eax, al
or rax, 2
mov dword [rsi + 0x38], edi
mov dword [rsi + 0x3c], 0
lea rcx, [0x14015f248]
mov qword [rsi + 0x40], rcx
mov qword [rsi + 0x48], rax
mov rbx, qword [rbx + 0x28]
lock inc dword [rbx + 0x30]
mov dword [rsi + 0x30], 1
mov rcx, qword [rbx + 0x28]
xor edx, edx
xor r8d, r8d
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov ebp, 0xffffffff
test eax, eax
jne 0x14001b0ed
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [rsi + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [rbx + 0x98], rsi
mov eax, 1
xchg dword [rbx + 0x58], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14001b0ed
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, ebp
call qword [rax + 0x30]
movzx ecx, al
or rcx, 2
mov dword [rsi + 0x38], ebp
mov dword [rsi + 0x3c], 0
lea rbp, [0x14015f248]
mov qword [rsi + 0x40], rbp
mov qword [rsi + 0x48], rcx
test cl, 1
jne 0x14001af91
mov r13, qword [rsp + 0x108]
mov byte [rsi + 0x70], 1
mov rax, qword [r12 + 8]
lock inc dword [rax + 0x30]
mov rcx, qword [rdi]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rdx, r15
mov r8d, r14d
xor r9d, r9d
call rbx
mov esi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rbx, qword [r12 + 8]
test esi, esi
jne 0x14001b074
cmp eax, 0x3e5
je 0x14001b074
mov dword [r13 + 0x30], 1
lea rcx, [0x14015f248]
mov qword [r13], rcx
mov dword [r13 + 0x10], eax
mov dword [r13 + 0x14], 0
jmp 0x14001b086
mov rcx, qword [0x14015f250]
shr rcx, 1
mov eax, 1
movabs rdx, 0x595588bd12bf6fe8
cmp rcx, rdx
je 0x14001afcf
mov rax, qword [0x14015f248]
lea rcx, [0x14015f248]
mov edx, 0x2726
call qword [rax + 0x30]
mov rax, qword [rsi + 0x48]
cmp rax, 1
je 0x14001b010
cmp dword [r13], 0x2726
jne 0x14001b010
mov rcx, rbp
test rax, rax
je 0x14001afe5
mov rcx, qword [rsi + 0x40]
mov rax, qword [0x14015f250]
xor edx, edx
cmp rcx, rbp
setne dl
xor r8d, r8d
cmp qword [rcx + 8], rax
setne r8b
test rax, rax
cmove r8d, edx
cmp r8b, 1
jne 0x14001af14
mov rbx, qword [r12 + 8]
lock inc dword [rbx + 0x30]
mov dword [rsi + 0x30], 1
mov rcx, qword [rbx + 0x28]
xor edx, edx
xor r8d, r8d
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14001b0e8
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [rsi + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], rsi
mov qword [rbx + 0x98], rsi
jmp 0x14001b0d7
mov ecx, 1
xor eax, eax
lock cmpxchg dword [r13 + 0x30], ecx
cmp eax, 1
jne 0x14001b0e8
mov rcx, qword [rbx + 0x28]
mov r8d, 2
xor edx, edx
mov r9, r13
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x14001b0e8
lea rdi, [rbx + 0x60]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rax, [rbx + 0x90]
mov qword [r13 + 0x20], 0
mov rcx, qword [rbx + 0x98]
lea rdx, [rcx + 0x20]
test rcx, rcx
cmove rdx, rax
mov qword [rdx], r13
mov qword [rbx + 0x98], r13
mov eax, 1
xchg dword [rbx + 0x58], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebp, 0xffffffff
mov eax, ebp
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret