Function at 0x140082940
Capabilities:
Connect socket
Get socket status

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4b8
lea rbp, [rsp + 0x80]
vmovups xmmword [rbp + 0x420], xmm6
mov qword [rbp + 0x418], 0xfffffffffffffffe
mov rdi, rdx
mov r13, rcx
mov rsi, qword [rbp + 0x4a8]
mov dword [rsi], 0
lea rax, [0x140223e70]
mov qword [rsi + 8], rax
vxorps xmm0, xmm0, xmm0
vmovups xmmword [rcx], xmm0
mov rax, qword [r8 + 8]
test rax, rax
je 0x1400829a7
lock inc dword [rax + 8]
mov rax, qword [r8 + 8]
jmp 0x1400829a9
xor eax, eax
mov rbx, qword [r8]
mov qword [r13], rbx
mov qword [r13 + 8], rax
mov qword [rbp + 0x400], r8
mov r15, qword [r8 + 0x10]
mov qword [r13 + 0x10], r15
mov rax, qword [r9]
mov rcx, rbx
or rcx, rax
mov qword [rbp + 0x410], r9
jne 0x140082abf
mov rdi, qword [r13 + 8]
test rdi, rdi
je 0x140082a0d
lock dec dword [rdi + 8]
jne 0x140082a0d
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov r9, qword [rbp + 0x410]
lock dec dword [rdi + 0xc]
jne 0x140082a0d
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
mov r9, qword [rbp + 0x410]
cmp dword [rsi], 0
jne 0x140082a23
mov dword [rsi], 3
lea rax, [0x140294978]
mov qword [rsi + 8], rax
vmovups xmm0, xmmword [r9]
vmovups xmmword [r13], xmm0
vxorps xmm0, xmm0, xmm0
vmovups xmmword [r9], xmm0
mov rax, qword [r9 + 0x10]
mov qword [r13 + 0x10], rax
mov rax, qword [rbp + 0x400]
mov rsi, qword [rax + 8]
test rsi, rsi
je 0x140082a7a
lock dec dword [rsi + 8]
jne 0x140082a7a
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
mov r9, qword [rbp + 0x410]
lock dec dword [rsi + 0xc]
jne 0x140082a7a
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
mov r9, qword [rbp + 0x410]
mov rsi, qword [r9 + 8]
test rsi, rsi
je 0x140082aa0
lock dec dword [rsi + 8]
jne 0x140082aa0
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
lock dec dword [rsi + 0xc]
jne 0x140082aa0
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, r13
vmovups xmm6, xmmword [rbp + 0x420]
add rsp, 0x4b8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [rdi + 0x48]
mov qword [rbp + 0x3f8], rcx
movabs r14, 0xaaaaaaaaaaaaaaab
vxorps xmm6, xmm6, xmm6
mov qword [rbp + 0x408], r13
jmp 0x140082b0e
mov qword [r13 + 0x10], 0
xor r15d, r15d
mov rbx, qword [r13]
mov rax, qword [r9]
mov rcx, rbx
or rcx, rax
je 0x1400829d9
cmp rbx, rax
jne 0x140082b1d
cmp r15, qword [r9 + 0x10]
je 0x1400829d9
mov rax, qword [r13 + 8]
test rax, rax
je 0x140082b80
lock inc dword [rax + 8]
mov r12, qword [r13 + 8]
mov r15, qword [r13 + 0x10]
test r12, r12
je 0x140082b70
lock dec dword [r12 + 8]
jne 0x140082b70
mov rax, qword [r12]
mov rcx, r12
call qword [rax]
mov r9, qword [rbp + 0x410]
lock dec dword [r12 + 0xc]
jne 0x140082b70
mov rax, qword [r12]
mov rcx, r12
call qword [rax + reloc.WS2_32.dll_htonl]
mov r9, qword [rbp + 0x410]
nop dword [rax + rax]
mov rbx, qword [r13]
jmp 0x140082b88
mov qword [r13 + 8], 0
mov qword [r13 + 0x10], r15
mov rax, qword [r9]
mov rcx, rbx
or rcx, rax
je 0x140082df0
cmp rbx, rax
jne 0x140082baa
cmp r15, qword [r9 + 0x10]
je 0x140082df0
mov rcx, qword [rdi + 0x60]
lea r13, [rbp + 0x1c8]
mov rdx, r13
mov r8, rdi
mov r9, rsi
call fcn.14007d7f0
mov rax, qword [rbx]
lea rcx, [r15 + r15*2]
shl rcx, 5
vmovups xmm0, xmmword [rax + rcx]
vmovups xmm1, xmmword [rax + rcx + 0xc]
vmovups xmmword [rbp + 0x3dc], xmm1
vmovups xmmword [rbp + 0x3d0], xmm0
mov r12, qword [rdi]
cmp r12, 0xffffffffffffffff
mov rax, qword [sym.imp.WS2_32.dll_WSASetLastError]
je 0x140082d62
movzx r13d, word [rbp + 0x3d0]
xor ecx, ecx
call rax
cmp r13w, 2
mov r8d, 0x1c
mov eax, select
cmove r8d, eax
mov rcx, r12
lea rdx, [rbp + 0x3d0]
call qword [sym.imp.WS2_32.dll_connect]
mov r13d, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsi], eax
lea rcx, str.P__
mov qword [rsi + 8], rcx
test r13d, r13d
je 0x140082e98
mov ecx, eax
add ecx, 0xffffd8cd
cmp ecx, 1
mov r13, qword [rbp + 0x408]
mov r9, qword [rbp + 0x410]
ja 0x140082d55
mov qword [rbp + 0x1d0], r12
mov dword [rbp + 0x1c8], 1
mov qword [rbp - 0x38], r12
mov dword [rbp - 0x40], 1
xor ecx, ecx
mov rax, qword [sym.imp.WS2_32.dll_WSASetLastError]
call rax
lea ecx, [r12 + 1]
mov qword [rsp + 0x20], 0
xor edx, edx
lea r8, [rbp + 0x1c8]
lea r9, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_select]
mov r13d, eax
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov dword [rsi], eax
lea r14, str.P__
mov qword [rsi + 8], r14
test r13d, r13d
js 0x140082d3d
mov dword [rsi], 0
lea rax, [0x140223e70]
mov qword [rsi + 8], rax
mov dword [rbp - 0x40], 0
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov dword [rbp + 0x1c8], 4
lea rax, [rbp + 0x1c8]
mov qword [rsp + 0x20], rax
mov rcx, r12
mov edx, 0xffff
mov r8d, 0x1007
lea r9, [rbp - 0x40]
call qword [sym.imp.WS2_32.dll_getsockopt]
mov r12d, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsi], eax
mov qword [rsi + 8], r14
cmp r12d, 0xffffffff
je 0x140082d3d
mov eax, dword [rbp - 0x40]
mov dword [rsi], eax
mov qword [rsi + 8], r14
mov r13, qword [rbp + 0x408]
mov r9, qword [rbp + 0x410]
movabs r14, 0xaaaaaaaaaaaaaaab
test eax, eax
jne 0x140082df0
jmp 0x140082a3f
mov rcx, qword [rdi + 0x60]
cmp word [rbp + 0x3d0], 2
mov r12d, 0x17
mov eax, 2
cmove r12d, eax
add rcx, 0x28
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 6
mov dword [rsp + 0x20], 1
mov rdx, r13
mov r8, rdi
mov r9d, r12d
call fcn.14007a7c0
cmp dword [rbp + 0x1c8], 0
jne 0x140082dcf
mov dword [rdi + 0x38], r12d
mov byte [rdi + 0x3c], 0
mov rax, qword [rbp + 0x3f8]
vmovups xmmword [rax], xmm6
mov dword [rax + 0x10], 0
mov qword [rdi + 0x40], 2
cmp dword [rsi], 0
mov r13, qword [rbp + 0x408]
mov r9, qword [rbp + 0x410]
je 0x140082e60
nop word cs:[rax + rax]
inc r15
mov qword [r13 + 0x10], r15
mov rax, qword [rbx + 8]
sub rax, qword [rbx]
sar rax, 5
imul rax, r14
cmp r15, rax
jne 0x140082afb
mov r12, qword [r13 + 8]
vmovups xmmword [r13], xmm6
test r12, r12
je 0x140082af0
lock dec dword [r12 + 8]
jne 0x140082af0
mov rax, qword [r12]
mov rcx, r12
call qword [rax]
mov r9, qword [rbp + 0x410]
lock dec dword [r12 + 0xc]
jne 0x140082af0
mov rax, qword [r12]
mov rcx, r12
call qword [rax + reloc.WS2_32.dll_htonl]
mov r9, qword [rbp + 0x410]
jmp 0x140082af0
mov r12, qword [rdi]
cmp r12, 0xffffffffffffffff
mov rax, qword [sym.imp.WS2_32.dll_WSASetLastError]
jne 0x140082bfd
mov dword [rsi], 0x2719
lea rax, str.P__
mov qword [rsi + 8], rax
mov r13, qword [rbp + 0x408]
mov r9, qword [rbp + 0x410]
jmp 0x140082df0
mov dword [rsi], 0
lea rax, [0x140223e70]
mov qword [rsi + 8], rax
mov r13, qword [rbp + 0x408]
mov r9, qword [rbp + 0x410]
jmp 0x140082a3f