Function at 0x10040200f
Capabilities:
Get socket status

Disassembly:
push rbp
push rbx
mov eax, 0x100b8
call fcn.100403da0
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 + 0xfff8], rax
mov qword [rbp + 0x10008], 1
jmp 0x100402077
sub qword [rbp + 0x10008], 1
mov rax, qword [rbp + 0xfff8]
mov rdx, qword [rbp + 0x10008]
mov qword [rax + rdx*8], 0
cmp qword [rbp + 0x10008], 0
jne 0x100402059
lea rax, [rbp + 0xffd8]
mov qword [rbp + 0xfff0], rax
mov qword [rbp + 0x10000], 1
jmp 0x1004020ba
sub qword [rbp + 0x10000], 1
mov rax, qword [rbp + 0xfff0]
mov rdx, qword [rbp + 0x10000]
mov qword [rax + rdx*8], 0
cmp qword [rbp + 0x10000], 0
jne 0x10040209c
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 8]
mov qword [rbp + 0x10028], rax
jmp 0x10040217a
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x100402168
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x34]
test eax, eax
jne 0x100402168
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
mov r8d, eax
movsxd rax, r8d
mov rdx, qword [rbp + rax*8 + 0xffe0]
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r9d, 1
mov ecx, eax
shl r9, cl
mov rax, r9
or rdx, rax
movsxd rax, r8d
mov qword [rbp + rax*8 + 0xffe0], rdx
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
cmp dword [rbp + 0x1001c], eax
jg 0x100402168
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 0x1004020db
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x10020], rax
jmp 0x10040224c
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x10040223a
mov rax, qword [rbp + 0x10020]
add rax, 0x38
mov rcx, rax
call fcn.1004017e3
test rax, rax
je 0x10040223a
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
mov r8d, eax
movsxd rax, r8d
mov rdx, qword [rbp + rax*8 + 0xffd8]
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r9d, 1
mov ecx, eax
shl r9, cl
mov rax, r9
or rdx, rax
movsxd rax, r8d
mov qword [rbp + rax*8 + 0xffd8], rdx
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
cmp dword [rbp + 0x1001c], eax
jg 0x10040223a
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 0x10040219f
cmp qword [rbp + 0x10058], 0
jns 0x100402274
mov qword [rbp + 0x10010], 0
jmp 0x1004022f4
lea rax, [rbp + 0xffc0]
mov qword [rbp + 0x10010], rax
mov rcx, qword [rbp + 0x10058]
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rcx
imul rdx
mov rax, rdx
sar rax, 7
sar rcx, 0x3f
mov rdx, rcx
sub rax, rdx
mov qword [rbp + 0xffc0], rax
mov rcx, qword [rbp + 0x10058]
movabs rdx, 0x20c49ba5e353f7cf
mov rax, rcx
imul rdx
mov rax, rdx
sar rax, 7
mov rdx, rcx
sar rdx, 0x3f
sub rax, rdx
imul rdx, rax, 0x3e8
mov rax, rcx
sub rax, rdx
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.msys_2.0.dll_select
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jns 0x100402348
call sub.msys_2.0.dll___errno
mov eax, dword [rax]
cmp eax, 4
je 0x1004022f4
call sub.msys_2.0.dll___errno
mov eax, dword [rax]
cmp eax, 0xb
je 0x1004022f4
cmp dword [rbp + 0xffec], 0
jns 0x10040235d
call sub.msys_2.0.dll___errno
mov eax, dword [rax]
jmp 0x1004026d8
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x10020], rax
jmp 0x100402525
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x100402513
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
cdqe
mov rdx, qword [rbp + rax*8 + 0xffd8]
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov ecx, eax
shr rdx, cl
mov rax, rdx
and eax, 1
test rax, rax
je 0x100402513
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
mov r8d, eax
movsxd rax, r8d
mov rdx, qword [rbp + rax*8 + 0xffd8]
mov rax, qword [rbp + 0x10020]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r9d, 1
mov ecx, eax
shl r9, cl
mov rax, r9
not rax
and rdx, rax
movsxd rax, r8d
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.100401b02
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.msys_2.0.dll_write
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jne 0x100402480
lea r9, str.ret___0
lea r8, str.sel_iterate
mov edx, 0x165
lea rax, str.sel.c
mov rcx, rax
call sub.msys_2.0.dll___assert_func
cmp dword [rbp + 0xffec], 0
jns 0x1004024bd
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x100402535
mov rax, qword [rbp + 0x10020]
mov rbx, qword [rax + 0x20]
call sub.msys_2.0.dll___errno
mov edx, dword [rax]
mov rax, qword [rbp + 0x10020]
mov rcx, rax
call rbx
jmp 0x100402535
mov rax, qword [rbp - 0x50]
mov rdx, qword [rbp + 0x10020]
lea rcx, [rdx + 0x38]
mov rdx, rax
call fcn.1004019b8
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x18]
test rax, rax
je 0x100402535
mov rax, qword [rbp + 0x10020]
mov rbx, qword [rax + 0x18]
mov rax, qword [rbp + 0x10020]
add rax, 0x38
mov rcx, rax
call fcn.1004017e3
mov rdx, rax
mov rax, qword [rbp + 0x10020]
mov rcx, rax
call rbx
jmp 0x100402535
mov rax, qword [rbp + 0x10020]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10020], rax
cmp qword [rbp + 0x10020], 0
jne 0x100402374
jmp 0x100402536
nop
cmp qword [rbp + 0x10020], 0
jne 0x10040235d
mov rax, qword [rbp + 0x10050]
mov rax, qword [rax + 8]
mov qword [rbp + 0x10028], rax
jmp 0x1004026b4
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
test eax, eax
js 0x1004026a2
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x34]
test eax, eax
jne 0x1004026a2
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
cdqe
mov rdx, qword [rbp + rax*8 + 0xffe0]
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov ecx, eax
shr rdx, cl
mov rax, rdx
and eax, 1
test rax, rax
je 0x1004026a2
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
lea edx, [rax + 0x3f]
test eax, eax
cmovs eax, edx
sar eax, 6
mov r8d, eax
movsxd rax, r8d
mov rdx, qword [rbp + rax*8 + 0xffe0]
mov rax, qword [rbp + 0x10028]
mov eax, dword [rax + 0x30]
and eax, 0x3f
mov r9d, 1
mov ecx, eax
shl r9, cl
mov rax, r9
not rax
and rdx, rax
movsxd rax, r8d
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.msys_2.0.dll_read
mov dword [rbp + 0xffec], eax
cmp dword [rbp + 0xffec], 0
jns 0x100402668
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x1004026c4
mov rax, qword [rbp + 0x10028]
mov rbx, qword [rax + 0x20]
call sub.msys_2.0.dll___errno
mov edx, dword [rax]
mov rax, qword [rbp + 0x10028]
mov rcx, rax
call rbx
jmp 0x1004026c4
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x18]
test rax, rax
je 0x1004026c4
mov rax, qword [rbp + 0x10028]
mov r9, qword [rax + 0x18]
mov eax, dword [rbp + 0xffec]
movsxd rcx, eax
lea rdx, [rbp - 0x40]
mov rax, qword [rbp + 0x10028]
mov r8, rcx
mov rcx, rax
call r9
jmp 0x1004026c4
mov rax, qword [rbp + 0x10028]
mov rax, qword [rax + 0x10]
mov qword [rbp + 0x10028], rax
cmp qword [rbp + 0x10028], 0
jne 0x10040255b
jmp 0x1004026c5
nop
cmp qword [rbp + 0x10028], 0
jne 0x100402544
mov eax, 0
add rsp, 0x100b8
pop rbx
pop rbp
ret