Function at 0x14004f630
Capabilities:
Get socket status

Disassembly:
push rbp
push rsi
push r12
push r15
lea rbp, [rsp - 0xbf98]
mov eax, 0xc098
call fcn.140072e30
sub rsp, rax
mov rax, qword [0x1400bf018]
xor rax, rsp
mov qword [rbp + 0xbf80], rax
movzx eax, byte [rcx + 0x178]
xor esi, esi
mov dword [rsp + 0x30], edx
mov r12d, edx
mov qword [rsp + 0x38], rsi
mov r15, rcx
test al, al
je 0x14004f680
xor eax, eax
jmp 0x14004fb1d
test dword [r15 + 0x194], 0x2000
mov ecx, esi
mov qword [rsp + 0xc0d8], r13
mov r13d, esi
mov dword [rsp + 0x50], ecx
mov dword [rbp + 0x7f70], esi
mov dword [rbp + 0x3f60], esi
mov qword [rsp + 0x40], 0xffffffffffffffff
je 0x14004f6d5
mov rcx, r15
call fcn.14004e920
mov ecx, dword [rsp + 0x50]
cmp eax, 1
jne 0x14004f6d5
test byte [r15 + 0x194], 4
cmove r12d, esi
mov dword [rsp + 0x30], r12d
mov eax, dword [r15 + 0x194]
and eax, 4
mov qword [rsp + 0xc0c8], rbx
test al, al
jne 0x14004fabd
movzx eax, byte [r15 + 0x178]
mov r12d, 1
test al, al
jne 0x14004fa21
mov qword [rsp + 0xc0d0], rdi
mov rdi, qword [r15 + 0x158]
cmp rdi, 0xffffffffffffffff
je 0x14004f779
movzx eax, byte [r15 + 0x179]
test al, al
jne 0x14004f779
mov ecx, dword [rsp + 0x50]
cmp ecx, 0x800
jb 0x14004f74d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov ecx, dword [rsp + 0x50]
test eax, eax
jne 0x14004f74d
mov r12d, esi
jmp 0x14004f77d
mov edx, esi
test ecx, ecx
je 0x14004f762
mov eax, edx
cmp rdi, qword [rsp + rax*8 + 0x58]
je 0x14004f762
inc edx
cmp edx, ecx
jb 0x14004f753
cmp edx, ecx
jne 0x14004f782
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rdi
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
jmp 0x14004f782
mov ecx, dword [rsp + 0x50]
mov rdi, qword [rsp + 0x40]
mov rdx, qword [r15 + 0x18]
mov qword [rsp + 0xc090], r14
test rdx, rdx
je 0x14004fa0c
nop word [rax + rax]
mov r8d, dword [rdx + 0x12c]
mov r14, qword [rdx + 8]
test r8d, r8d
je 0x14004f8f1
sub r8d, 1
je 0x14004f84b
cmp r8d, 1
jne 0x14004f959
mov rbx, qword [rdx + 0x118]
cmp rbx, 0xffffffffffffffff
je 0x14004f956
cmp dword [rbp + 0x3f60], 0x800
jb 0x14004f801
lea rdx, [rbp + 0x3f60]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov ecx, dword [rsp + 0x50]
test eax, eax
je 0x14004f956
mov edx, esi
cmp dword [rbp + 0x3f60], esi
jbe 0x14004f826
nop dword [rax + rax]
mov eax, edx
cmp rbx, qword [rbp + rax*8 + 0x3f68]
je 0x14004f826
inc edx
cmp edx, dword [rbp + 0x3f60]
jb 0x14004f810
mov eax, dword [rbp + 0x3f60]
cmp edx, eax
jne 0x14004f946
mov qword [rbp + rax*8 + 0x3f68], rbx
inc dword [rbp + 0x3f60]
mov ecx, dword [rsp + 0x50]
jmp 0x14004f946
mov rbx, qword [rdx + 0x118]
cmp rbx, 0xffffffffffffffff
je 0x14004f8e2
cmp dword [rbp + 0x7f70], 0x800
jb 0x14004f880
lea rdx, [rbp + 0x7f70]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov ecx, dword [rsp + 0x50]
test eax, eax
je 0x14004f8e2
mov edx, esi
cmp dword [rbp + 0x7f70], esi
jbe 0x14004f8a6
nop word [rax + rax]
mov eax, edx
cmp rbx, qword [rbp + rax*8 + 0x7f78]
je 0x14004f8a6
inc edx
cmp edx, dword [rbp + 0x7f70]
jb 0x14004f890
mov eax, dword [rbp + 0x7f70]
cmp edx, eax
jne 0x14004f8c2
mov qword [rbp + rax*8 + 0x7f78], rbx
inc dword [rbp + 0x7f70]
mov ecx, dword [rsp + 0x50]
cmp rbx, rdi
ja 0x14004f8cd
cmp rdi, 0xffffffffffffffff
jne 0x14004f8d0
mov rdi, rbx
mov edx, 1
mov eax, esi
test edx, edx
cmovne eax, r12d
mov r12d, eax
jmp 0x14004f959
mov edx, esi
mov eax, esi
test edx, edx
cmovne eax, r12d
mov r12d, eax
jmp 0x14004f959
mov rbx, qword [rdx + 0x118]
cmp rbx, 0xffffffffffffffff
je 0x14004f956
cmp ecx, 0x800
jb 0x14004f91c
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov ecx, dword [rsp + 0x50]
test eax, eax
je 0x14004f956
mov edx, esi
test ecx, ecx
je 0x14004f931
mov eax, edx
cmp rbx, qword [rsp + rax*8 + 0x58]
je 0x14004f931
inc edx
cmp edx, ecx
jb 0x14004f922
cmp edx, ecx
jne 0x14004f946
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rbx
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
cmp rbx, rdi
ja 0x14004f951
cmp rdi, 0xffffffffffffffff
jne 0x14004f959
mov rdi, rbx
jmp 0x14004f959
mov r12d, esi
mov rdx, r14
test r14, r14
jne 0x14004f7a0
mov rdx, qword [r15 + 0x18]
test rdx, rdx
je 0x14004fa0c
nop dword [rax]
nop word [rax + rax]
mov rbx, qword [rdx + 0x118]
mov r14, qword [rdx + 8]
cmp rbx, 0xffffffffffffffff
je 0x14004f9fc
cmp dword [rbp + 0x3f60], 0x800
jb 0x14004f9b1
lea rdx, [rbp + 0x3f60]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14004f9fc
mov ecx, esi
cmp dword [rbp + 0x3f60], esi
jbe 0x14004f9d6
nop dword [rax + rax]
mov eax, ecx
cmp rbx, qword [rbp + rax*8 + 0x3f68]
je 0x14004f9d6
inc ecx
cmp ecx, dword [rbp + 0x3f60]
jb 0x14004f9c0
mov eax, dword [rbp + 0x3f60]
cmp ecx, eax
jne 0x14004f9ee
mov qword [rbp + rax*8 + 0x3f68], rbx
inc dword [rbp + 0x3f60]
cmp rbx, rdi
ja 0x14004f9f9
cmp rdi, 0xffffffffffffffff
jne 0x14004f9fc
mov rdi, rbx
mov rdx, r14
test r14, r14
jne 0x14004f980
mov ecx, dword [rsp + 0x50]
mov r14, qword [rsp + 0xc090]
mov rdi, qword [rsp + 0xc0d0]
test r12d, r12d
jne 0x14004fa3a
lea rdx, str.Could_not_obtain_daemon_fdsets
mov rcx, r15
call fcn.140058130
mov ecx, dword [rsp + 0x50]
mov r13d, 1
mov r12d, dword [rsp + 0x30]
mov rbx, qword [r15 + 0x168]
cmp rbx, 0xffffffffffffffff
je 0x14004fc34
cmp ecx, 0x800
jb 0x14004fc06
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x14004fc02
mov rdx, qword [r15 + 0x158]
cmp rdx, 0xffffffffffffffff
je 0x14004fbfc
movzx eax, byte [r15 + 0x179]
test al, al
jne 0x14004fbfc
mov ecx, dword [rsp + 0x50]
mov r8d, esi
test ecx, ecx
je 0x14004fba5
mov eax, r8d
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x14004fb71
inc r8d
cmp r8d, ecx
jb 0x14004faa2
jmp 0x14004fba5
mov rbx, qword [r15 + 0x158]
cmp rbx, 0xffffffffffffffff
je 0x14004fa3f
movzx eax, byte [r15 + 0x179]
mov ecx, dword [rsp + 0x50]
test al, al
jne 0x14004fa3f
cmp ecx, 0x800
jb 0x14004fb3e
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x14004fb3a
lea rdx, str.Could_not_add_listen_socket_to_fdset
mov rcx, r15
call fcn.140058130
xor eax, eax
mov rbx, qword [rsp + 0xc0c8]
mov r13, qword [rsp + 0xc0d8]
mov rcx, qword [rbp + 0xbf80]
xor rcx, rsp
call fcn.140059450
add rsp, 0xc098
pop r15
pop r12
pop rsi
pop rbp
ret
mov ecx, dword [rsp + 0x50]
mov edx, esi
test ecx, ecx
je 0x14004fb53
mov eax, edx
cmp rbx, qword [rsp + rax*8 + 0x58]
je 0x14004fb53
inc edx
cmp edx, ecx
jb 0x14004fb44
cmp edx, ecx
jne 0x14004fa3f
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rbx
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
jmp 0x14004fa3f
lea eax, [rcx - 1]
cmp r8d, eax
jae 0x14004fb9f
nop dword [rax]
mov ecx, r8d
lea edx, [r8 + 1]
mov rax, qword [rsp + rdx*8 + 0x58]
mov r8d, edx
mov qword [rsp + rcx*8 + 0x58], rax
mov ecx, dword [rsp + 0x50]
lea eax, [rcx - 1]
cmp edx, eax
jb 0x14004fb80
dec ecx
mov dword [rsp + 0x50], ecx
mov rbx, qword [r15 + 0x168]
cmp rbx, 0xffffffffffffffff
je 0x14004fbe7
cmp ecx, 0x800
jb 0x14004fbd0
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14004fbe7
mov ecx, dword [rsp + 0x50]
mov edx, esi
test ecx, ecx
je 0x14004fc1f
mov eax, edx
cmp rbx, qword [rsp + rax*8 + 0x58]
je 0x14004fc1f
inc edx
cmp edx, ecx
jb 0x14004fbd6
jmp 0x14004fc1f
lea rdx, str.Could_not_add_control_inter_thread_communication_channel_FD_to_fdset
mov rcx, r15
call fcn.140058130
mov r13d, 1
mov ecx, dword [rsp + 0x50]
jmp 0x14004fc34
mov ecx, dword [rsp + 0x50]
mov edx, esi
test ecx, ecx
je 0x14004fc1f
nop dword [rax]
mov eax, edx
cmp rbx, qword [rsp + rax*8 + 0x58]
je 0x14004fc1f
inc edx
cmp edx, ecx
jb 0x14004fc10
cmp edx, ecx
jne 0x14004fc34
mov eax, ecx
mov qword [rsp + rax*8 + 0x58], rbx
mov ecx, dword [rsp + 0x50]
inc ecx
mov dword [rsp + 0x50], ecx
mov rdx, qword [r15 + 0x158]
cmp rdx, 0xffffffffffffffff
je 0x14004fcb5
cmp qword [r15 + 0x168], 0xffffffffffffffff
je 0x14004fcb5
mov eax, dword [r15 + 0x184]
cmp dword [r15 + 0x180], eax
je 0x14004fc64
cmp byte [r15 + 0x17a], sil
je 0x14004fcb5
mov r8d, esi
test ecx, ecx
je 0x14004fcb5
nop dword [rax + rax]
mov eax, r8d
cmp qword [rsp + rax*8 + 0x58], rdx
je 0x14004fc84
inc r8d
cmp r8d, ecx
jb 0x14004fc70
jmp 0x14004fcb5
lea eax, [rcx - 1]
cmp r8d, eax
jae 0x14004fcaf
nop dword [rax]
mov ecx, r8d
lea edx, [r8 + 1]
mov rax, qword [rsp + rdx*8 + 0x58]
mov r8d, edx
mov qword [rsp + rcx*8 + 0x58], rax
mov ecx, dword [rsp + 0x50]
lea eax, [rcx - 1]
cmp edx, eax
jb 0x14004fc90
dec ecx
mov dword [rsp + 0x50], ecx
cmp r13d, 1
mov eax, esi
mov rbx, rsi
cmovne eax, r12d
test eax, eax
jne 0x14004fcd2
mov qword [rsp + 0x38], rsi
lea rbx, [rsp + 0x38]
jmp 0x14004fd41
mov eax, dword [r15 + 0x194]
and eax, 4
test al, al
jne 0x14004fd41
lea rdx, [rsp + 0x48]
mov rcx, r15
call fcn.14004f390
cmp eax, 1
jne 0x14004fd3d
mov rcx, qword [rsp + 0x48]
lea rbx, [rsp + 0x38]
mov r8, rcx
movabs rax, 0x624dd2f1a9fbe77
mul rcx
sub r8, rdx
shr r8, 1
add r8, rdx
shr r8, 9
imul eax, r8d, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x3c], eax
mov eax, 0x7fffffff
cmp r8, rax
cmova r8d, eax
mov dword [rsp + 0x38], r8d
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jne 0x14004fd82
cmp dword [rbp + 0x7f70], esi
jne 0x14004fd82
cmp dword [rbp + 0x3f60], esi
jne 0x14004fd82
test rbx, rbx
jne 0x14004fd5e
mov eax, esi
jmp 0x14004fda2
mov eax, 0x10624dd3
imul dword [rbx + 4]
imul eax, dword [rbx], 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, esi
jmp 0x14004fda2
lea r9, [rbp + 0x3f60]
mov qword [rsp + 0x20], rbx
lea r8, [rbp + 0x7f70]
xor ecx, ecx
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_select]
movzx ecx, byte [r15 + 0x178]
test cl, cl
jne 0x14004fb0b
test eax, eax
jns 0x14004fde1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x14004fe05
mov ecx, eax
call fcn.140057770
mov r8, rax
lea rdx, str.select_failed:__s_n
mov rcx, r15
call fcn.140058130
jmp 0x14004fb0b
lea r9, [rbp + 0x3f60]
mov rcx, r15
lea r8, [rbp + 0x7f70]
lea rdx, [rsp + 0x50]
call fcn.14004f4c0
cmp eax, 1
jne 0x14004fb0b
test r13d, r13d
sete sil
mov eax, esi
jmp 0x14004fb0d