Function at 0x10040210b
Capabilities:
Get socket status

Disassembly:
push rbp
push rbx
mov eax, 0x100b8
call fcn.100403e20
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x10050], rcx
mov qword [rbp + 0x10058], rdx
mov dword [rbp + 0x1001c], 0
lea rax, [rbp + 0xffe0]
mov qword [rbp + 0x10000], rax
mov qword [rbp + 0x10008], 0
jmp 0x100402172
mov rax, qword [rbp + 0x10000]
lea rdx, [rax + 1]
mov qword [rbp + 0x10000], rdx
mov byte [rax], 0
add qword [rbp + 0x10008], 1
cmp qword [rbp + 0x10008], 7
jbe 0x100402155
lea rax, [rbp + 0xffd8]
mov qword [rbp + 0xfff0], rax
mov qword [rbp + 0xfff8], 0
jmp 0x1004021b4
mov rax, qword [rbp + 0xfff0]
lea rdx, [rax + 1]
mov qword [rbp + 0xfff0], rdx
mov byte [rax], 0
add qword [rbp + 0xfff8], 1
cmp qword [rbp + 0xfff8], 7
jbe 0x100402197
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 8]
mov qword [rbp + 0x10028], rax
jmp 0x100402269
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x100402257
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x34]
test eax, eax
jne 0x100402257
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov r8, qword [rbp + rax*8 + 0xffe0]
mov rdx, qword [rbp + 0x10028]
mov edx, dword [rdx + 0x30]
and edx, 0x3f
mov r9d, 1
mov ecx, edx
shl r9, cl
mov rdx, r9
or rdx, r8
mov qword [rbp + rax*8 + 0xffe0], rdx
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
add eax, 1
cmp eax, dword [rbp + 0x1001c]
jle 0x100402257
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
add eax, 1
mov dword [rbp + 0x1001c], eax
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10028], rax
cmp qword [rbp + 0x10028], 0
jne 0x1004021d5
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x10020], rax
jmp 0x10040232c
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x10040231a
mov rax, qword [rbp + 0x10020]
add rax, 0x38
mov rcx, rax
call fcn.1004018e3
test rax, rax
je 0x10040231a
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov r8, qword [rbp + rax*8 + 0xffd8]
mov rdx, qword [rbp + 0x10020]
mov edx, dword [rdx + 0x30]
and edx, 0x3f
mov r9d, 1
mov ecx, edx
shl r9, cl
mov rdx, r9
or rdx, r8
mov qword [rbp + rax*8 + 0xffd8], rdx
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
add eax, 1
cmp eax, dword [rbp + 0x1001c]
jle 0x10040231a
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
add eax, 1
mov dword [rbp + 0x1001c], eax
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10020], rax
cmp qword [rbp + 0x10020], 0
jne 0x10040228e
cmp qword [rbp + 0x10058], 0
jns 0x100402354
mov qword [rbp + 0x10010], 0
jmp 0x1004023d4
lea rax, [rbp + 0xffc0]
mov qword [rbp + 0x10010], rax
mov rcx, qword [rbp + 0x10058]
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rcx
imul rdx
sar rdx, 7
mov rax, rcx
sar rax, 0x3f
sub rdx, rax
mov rax, rdx
mov qword [rbp + 0xffc0], rax
mov rcx, qword [rbp + 0x10058]
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rcx
imul rdx
sar rdx, 7
mov rax, rcx
sar rax, 0x3f
sub rdx, rax
mov rax, rdx
imul rax, rax, 0x3e8
sub rcx, rax
mov rax, rcx
imul rax, rax, 0x3e8
mov qword [rbp + 0xffc8], rax
lea r8, [rbp + 0xffd8]
lea rdx, [rbp + 0xffe0]
mov eax, dword [rbp + 0x1001c]
mov rcx, qword [rbp + 0x10010]
mov qword [rsp + 0x20], rcx
mov r9d, 0
mov ecx, eax
call sub.cygwin1.dll_select
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jns 0x100402428
call sub.cygwin1.dll___errno
mov eax, dword [rax]
cmp eax, 4
je 0x1004023d4
call sub.cygwin1.dll___errno
mov eax, dword [rax]
cmp eax, 0xb
je 0x1004023d4
cmp dword [rbp + 0xffec], 0
jns 0x10040243d
call sub.cygwin1.dll___errno
mov eax, dword [rax]
jmp 0x100402791
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x10020], rax
jmp 0x1004025f4
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x1004025e2
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov rdx, qword [rbp + rax*8 + 0xffd8]
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r8d, 1
mov ecx, eax
shl r8, cl
mov rax, r8
and rax, rdx
test rax, rax
je 0x1004025e2
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov r8, qword [rbp + rax*8 + 0xffd8]
mov rdx, qword [rbp + 0x10020]
mov edx, dword [rdx + 0x30]
and edx, 0x3f
mov r9d, 1
mov ecx, edx
shl r9, cl
mov rdx, r9
not rdx
and rdx, r8
mov qword [rbp + rax*8 + 0xffd8], rdx
mov rax, qword [rbp + 0x10020]
lea rcx, [rax + 0x38]
lea rdx, [rbp - 0x50]
lea rax, [rbp - 0x48]
mov r8, rdx
mov rdx, rax
call fcn.100401bfe
mov rcx, qword [rbp - 0x50]
mov rdx, qword [rbp - 0x48]
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
mov r8, rcx
mov ecx, eax
call sub.cygwin1.dll_write
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jne 0x10040254e
lea r9, str.ret___0
lea r8, str.sel_iterate
mov edx, 0x165
lea rcx, str.sel.c
call sub.cygwin1.dll___assert_func
cmp dword [rbp + 0xffec], 0
jns 0x10040258b
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x100402604
mov rax, qword [rbp + 0x10020]
mov rbx, qword [rax + 0x20]
call sub.cygwin1.dll___errno
mov edx, dword [rax]
mov rax, qword [rbp + 0x10020]
mov rcx, rax
call rbx
jmp 0x100402604
mov rax, qword [rbp - 0x50]
mov rdx, qword [rbp + 0x10020]
lea rcx, [rdx + 0x38]
mov rdx, rax
call fcn.100401abb
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x18]
test rax, rax
je 0x100402604
mov rax, qword [rbp + 0x10020]
mov rbx, qword [rax + 0x18]
mov rax, qword [rbp + 0x10020]
add rax, 0x38
mov rcx, rax
call fcn.1004018e3
mov rdx, rax
mov rax, qword [rbp + 0x10020]
mov rcx, rax
call rbx
nop
jmp 0x100402604
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10020], rax
cmp qword [rbp + 0x10020], 0
jne 0x100402454
jmp 0x100402605
nop
cmp qword [rbp + 0x10020], 0
jne 0x10040243d
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 8]
mov qword [rbp + 0x10028], rax
jmp 0x10040276d
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x10040275b
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x34]
test eax, eax
jne 0x10040275b
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov rdx, qword [rbp + rax*8 + 0xffe0]
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r8d, 1
mov ecx, eax
shl r8, cl
mov rax, r8
and rax, rdx
test rax, rax
je 0x10040275b
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
cdqe
shr rax, 6
mov r8, qword [rbp + rax*8 + 0xffe0]
mov rdx, qword [rbp + 0x10028]
mov edx, dword [rdx + 0x30]
and edx, 0x3f
mov r9d, 1
mov ecx, edx
shl r9, cl
mov rdx, r9
not rdx
and rdx, r8
mov qword [rbp + rax*8 + 0xffe0], rdx
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
lea rdx, [rbp - 0x40]
mov r8d, 0x10000
mov ecx, eax
call sub.cygwin1.dll_read
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jns 0x100402728
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x10040277d
mov rax, qword [rbp + 0x10028]
mov rbx, qword [rax + 0x20]
call sub.cygwin1.dll___errno
mov edx, dword [rax]
mov rax, qword [rbp + 0x10028]
mov rcx, rax
call rbx
jmp 0x10040277d
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x18]
test rax, rax
je 0x10040277d
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x18]
mov edx, dword [rbp + 0xffec]
movsxd r8, edx
lea rdx, [rbp - 0x40]
mov rcx, qword [rbp + 0x10028]
call rax
jmp 0x10040277d
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10028], rax
cmp qword [rbp + 0x10028], 0
jne 0x10040262a
jmp 0x10040277e
nop
cmp qword [rbp + 0x10028], 0
jne 0x100402613
mov eax, 0
add rsp, 0x100b8
pop rbx
pop rbp
ret