Function at 0x140017c31
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push rbx
sub rsp, 0x6a0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x640], rcx
mov dword [rbp + 0x648], edx
mov qword [rbp + 0x608], 0
mov dword [rbp - 0x48], 0
mov dword [rbp - 0x44], 0x186a0
mov dword [rbp + 0x3e0], 0
mov dword [rbp + 0x1d0], 0
mov dword [rbp - 0x40], 0
mov qword [rbp + 0x610], 0
jmp 0x140017efd
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x140017ef5
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 3
je 0x140017ef5
mov dword [rbp + 0x604], 0
jmp 0x140017d26
mov eax, dword [rbp + 0x604]
mov rdx, qword [rbp + rax*8 + 0x3e8]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x610]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
cmp rdx, rax
je 0x140017d34
add dword [rbp + 0x604], 1
mov eax, dword [rbp + 0x3e0]
cmp dword [rbp + 0x604], eax
jb 0x140017ced
mov eax, dword [rbp + 0x3e0]
cmp dword [rbp + 0x604], eax
jne 0x140017d8a
mov eax, dword [rbp + 0x3e0]
cmp eax, 0x3f
ja 0x140017d8a
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
movsxd rdx, eax
mov eax, dword [rbp + 0x604]
mov qword [rbp + rax*8 + 0x3e8], rdx
mov eax, dword [rbp + 0x3e0]
add eax, 1
mov dword [rbp + 0x3e0], eax
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x58]
test eax, eax
jne 0x140017e59
mov dword [rbp + 0x600], 0
jmp 0x140017df5
mov eax, dword [rbp + 0x600]
mov rdx, qword [rbp + rax*8 + 0x1d8]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x610]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
cmp rdx, rax
je 0x140017e03
add dword [rbp + 0x600], 1
mov eax, dword [rbp + 0x1d0]
cmp dword [rbp + 0x600], eax
jb 0x140017dbc
mov eax, dword [rbp + 0x1d0]
cmp dword [rbp + 0x600], eax
jne 0x140017e59
mov eax, dword [rbp + 0x1d0]
cmp eax, 0x3f
ja 0x140017e59
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
movsxd rdx, eax
mov eax, dword [rbp + 0x600]
mov qword [rbp + rax*8 + 0x1d8], rdx
mov eax, dword [rbp + 0x1d0]
add eax, 1
mov dword [rbp + 0x1d0], eax
mov dword [rbp + 0x5fc], 0
jmp 0x140017e9b
mov eax, dword [rbp + 0x5fc]
mov rdx, qword [rbp + rax*8 - 0x38]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rcx, qword [rbp + 0x610]
shl rcx, 3
add rax, rcx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
cmp rdx, rax
je 0x140017ea6
add dword [rbp + 0x5fc], 1
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x5fc], eax
jb 0x140017e65
mov eax, dword [rbp - 0x40]
cmp dword [rbp + 0x5fc], eax
jne 0x140017eed
mov eax, dword [rbp - 0x40]
cmp eax, 0x3f
ja 0x140017eed
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
movsxd rdx, eax
mov eax, dword [rbp + 0x5fc]
mov qword [rbp + rax*8 - 0x38], rdx
mov eax, dword [rbp - 0x40]
add eax, 1
mov dword [rbp - 0x40], eax
add qword [rbp + 0x608], 1
add qword [rbp + 0x610], 1
mov rax, qword [rbp + 0x640]
mov rax, qword [rax + 8]
cmp qword [rbp + 0x610], rax
jb 0x140017c94
cmp qword [rbp + 0x608], 0
jne 0x140017f2f
mov ecx, 0x64
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
jmp 0x140017f69
mov rax, qword [rbp + 0x640]
mov eax, dword [rax + 0x1c]
lea ecx, [rax + 1]
lea r9, [rbp - 0x40]
lea r8, [rbp + 0x1d0]
lea rax, [rbp + 0x3e0]
lea rdx, [rbp - 0x48]
mov qword [rsp + 0x20], rdx
mov rdx, rax
mov rax, qword [sym.imp.WS2_32.dll_select]
call rax
mov dword [rbp + 0x61c], eax
cmp dword [rbp + 0x61c], 0xffffffff
jne 0x140017f81
lea rax, str.select_group:_couldnt_select__
mov rcx, rax
call dbg.nbdie
mov qword [rbp + 0x610], 0
jmp 0x140018224
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x14001821c
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 3
jne 0x14001821c
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 8]
mov qword [rsp + 0x28], 0
lea rdx, [rbp - 0x4c]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
call rax
mov dword [rbp + 0x5f8], eax
cmp dword [rbp + 0x5f8], 0
je 0x140018061
mov eax, dword [rbp - 0x4c]
test eax, eax
je 0x14001821c
mov rdx, qword [rbp + 0x610]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call dbg.handle_incoming_data
jmp 0x14001821c
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov dword [rbp + 0x5f4], eax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0x6d
jne 0x140018147
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x38]
test rax, rax
je 0x14001812d
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x38]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov r8, rcx
mov rcx, rax
call r9
mov ecx, eax
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x14001821c
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
jmp 0x14001821c
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x140018207
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x30]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rsi, qword [rax + 0x60]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
call dbg.getlastsocketerror
mov ecx, eax
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov r9, rsi
mov r8d, ecx
mov rcx, rax
call rbx
mov ecx, eax
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x14001821c
mov edx, dword [rbp + 0x5f4]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call dbg.select_group_remove_and_close_socket
add qword [rbp + 0x610], 1
mov rax, qword [rbp + 0x640]
mov rax, qword [rax + 8]
cmp qword [rbp + 0x610], rax
jb 0x140017f91
cmp dword [rbp + 0x61c], 0
jne 0x1400182dc
cmp dword [rbp + 0x648], 0
js 0x140018670
mov rax, qword [rbp + 0x640]
mov eax, dword [rax + 0x18]
mov ebx, dword [rbp + 0x648]
mov edx, 0
div ebx
mov ecx, eax
mov rax, qword [rbp + 0x640]
mov eax, dword [rax + 0x18]
add eax, 0x64
mov esi, dword [rbp + 0x648]
mov edx, 0
div esi
cmp ecx, eax
je 0x1400182c0
mov rax, qword [rbp + 0x640]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x1400182c0
mov rax, qword [rbp + 0x640]
mov r8, qword [rax + 0x20]
mov rax, qword [rbp + 0x640]
mov rdx, qword [rax + 0x28]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call r8
mov rax, qword [rbp + 0x640]
mov eax, dword [rax + 0x18]
lea edx, [rax + 0x64]
mov rax, qword [rbp + 0x640]
mov dword [rax + 0x18], edx
jmp 0x140018670
mov qword [rbp + 0x610], 0
jmp 0x140018658
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x140018395
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
lea rdx, [rbp + 0x3e0]
mov rcx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x140018395
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, 2
jne 0x14001837f
mov rdx, qword [rbp + 0x610]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call dbg.handle_incoming_connection
jmp 0x140018395
mov rdx, qword [rbp + 0x610]
mov rax, qword [rbp + 0x640]
mov rcx, rax
call dbg.handle_incoming_data
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x1400184d7
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
lea rdx, [rbp + 0x1d0]
mov rcx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x1400184d7
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
test rax, rax
je 0x1400184b5
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov r9, qword [rax + 0x18]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rcx, qword [rax + 0x60]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov edx, dword [rax]
mov rax, qword [rbp + 0x640]
mov r8, rcx
mov rcx, rax
call r9
mov ecx, eax
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov edx, dword [rax]
mov rax, qword [rbp + 0x640]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov dword [rax + 0x58], 1
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x140018650
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
cdqe
lea rdx, [rbp - 0x40]
mov rcx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x140018650
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x14001861e
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rbx, qword [rax + 0x30]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov rsi, qword [rax + 0x60]
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov eax, dword [rax]
mov ecx, eax
call dbg.getlastsocketerror
mov ecx, eax
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov edx, dword [rax]
mov rax, qword [rbp + 0x640]
mov r9, rsi
mov r8d, ecx
mov rcx, rax
call rbx
mov ecx, eax
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov edx, dword [rax]
mov rax, qword [rbp + 0x640]
mov r8d, ecx
mov rcx, rax
call dbg.select_handle_response
jmp 0x140018650
mov rax, qword [rbp + 0x640]
mov rax, qword [rax]
mov rdx, qword [rbp + 0x610]
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
mov edx, dword [rax]
mov rax, qword [rbp + 0x640]
mov r8d, 2
mov rcx, rax
call dbg.select_handle_response
add qword [rbp + 0x610], 1
mov rax, qword [rbp + 0x640]
mov rax, qword [rax + 8]
cmp qword [rbp + 0x610], rax
jb 0x1400182ec
nop
add rsp, 0x6a0
pop rbx
pop rsi
pop rbp
ret