Function at 0x1400570d0
Capabilities:
Get socket status

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x678
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x250], 0
mov dword [rsp + 0x460], 0
test edx, edx
je 0x140057004
mov edx, edx
mov rbx, rcx
mov rax, rcx
xor r10d, r10d
shl rdx, 4
lea rsi, [rcx + rdx]
nop dword [rax + rax]
mov rdx, qword [rax]
xor edi, edi
mov word [rax + 0xa], di
cmp rdx, 0xffffffffffffffff
je 0x140056d7e
movzx r11d, word [rax + 8]
test r11w, 0x710
je 0x140056d7e
test r11w, 0x300
jne 0x140056f90
test r11b, 0x10
jne 0x140056f30
test r11w, 0x600
jne 0x140056ed0
add rax, 0x10
cmp rax, rsi
jne 0x140056d40
test r10d, r10d
je 0x140056ff0
lea rcx, [rsp + 0x38]
mov rdx, r8
call fcn.14005c5a0
mov r11d, dword [rsp + 0x460]
xor r9d, r9d
test r11d, r11d
je 0x140056db5
lea r9, [rsp + 0x460]
mov r10d, dword [rsp + 0x250]
xor r8d, r8d
test r10d, r10d
je 0x140056dcd
lea r8, [rsp + 0x250]
mov ecx, dword [rsp + 0x40]
xor edx, edx
test ecx, ecx
jne 0x140056fe0
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
jle 0x140057030
xor edi, edi
lea r13, [rsp + 0x40]
lea r12, [rsp + 0x250]
lea rbp, [rsp + 0x460]
nop dword [rax]
mov rcx, qword [rbx]
xor eax, eax
mov word [rbx + 0xa], ax
cmp rcx, 0xffffffffffffffff
je 0x140056e91
mov rdx, r13
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140056e45
movzx eax, word [rbx + 8]
test ah, 1
je 0x140056e3a
or word [rbx + 0xa], 0x100
test ah, 3
je 0x140056e45
or word [rbx + 0xa], 0x300
mov rcx, qword [rbx]
mov rdx, r12
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140056e5f
test byte [rbx + 8], 0x10
je 0x140056e5f
or word [rbx + 0xa], 0x10
mov rcx, qword [rbx]
mov rdx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140056ec0
movzx edx, word [rbx + 8]
movzx eax, word [rbx + 0xa]
mov ecx, edx
and cx, 0x400
and dh, 2
je 0x140056eb0
or ah, 2
mov word [rbx + 0xa], ax
test cx, cx
jne 0x140056eb5
add edi, 1
add rbx, 0x10
cmp rbx, rsi
jne 0x140056e10
mov eax, edi
add rsp, 0x678
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test cx, cx
je 0x140056ec0
or ah, 4
mov word [rbx + 0xa], ax
jmp 0x140056e8e
cmp word [rbx + 0xa], 0
je 0x140056e91
jmp 0x140056e8e
mov r11d, dword [rsp + 0x460]
test r11d, r11d
je 0x14005705d
lea r9, [rsp + 0x468]
xor ecx, ecx
jmp 0x140056efc
add ecx, 1
add r9, 8
cmp ecx, r11d
je 0x140056f01
cmp rdx, qword [r9]
jne 0x140056ef0
cmp r11d, 0x40
je 0x140056d7e
cmp r11d, ecx
jne 0x140056d7e
add r11d, 1
mov qword [rsp + rcx*8 + 0x468], rdx
mov dword [rsp + 0x460], r11d
jmp 0x140056d7e
mov edi, dword [rsp + 0x250]
test edi, edi
je 0x140057051
lea r9, [rsp + 0x258]
xor ecx, ecx
jmp 0x140056f5b
add ecx, 1
add r9, 8
cmp ecx, edi
je 0x140056f60
cmp rdx, qword [r9]
jne 0x140056f50
cmp edi, 0x40
je 0x140056d72
cmp edi, ecx
jne 0x140056d72
add edi, 1
mov qword [rsp + rcx*8 + 0x258], rdx
mov dword [rsp + 0x250], edi
jmp 0x140056d72
test r10d, r10d
je 0x14005706a
lea r9, [rsp + 0x48]
xor ecx, ecx
jmp 0x140056fb4
add ecx, 1
add r9, 8
cmp ecx, r10d
je 0x140056fb9
cmp rdx, qword [r9]
jne 0x140056fa8
cmp r10d, ecx
jne 0x140056d68
cmp r10d, 0x40
je 0x140056d68
add r10d, 1
mov qword [rsp + rcx*8 + 0x48], rdx
mov dword [rsp + 0x40], r10d
jmp 0x140056d68
lea rdx, [rsp + 0x40]
jmp 0x140056ddb
mov eax, dword [rsp + 0x250]
or eax, dword [rsp + 0x460]
jne 0x140056d90
test r8, r8
je 0x140057020
js 0x140057077
mov eax, 0xfffffffe
cmp r8, rax
cmovle rax, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
jmp 0x140056e9e
cmp eax, 0xffffffff
jne 0x140056e9e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edi, edi
cmp eax, 0x2714
setne dil
neg edi
jmp 0x140056e9e
xor ecx, ecx
mov edi, 1
jmp 0x140056f74
xor ecx, ecx
mov r11d, 1
jmp 0x140056f18
xor ecx, ecx
mov r10d, 1
jmp 0x140056fd0
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x140057039
sub rsp, 0x28
test rcx, rcx
je 0x140057110
test edx, edx
je 0x140057110
mov r9d, edx
mov rax, rcx
shl r9, 4
add r9, rcx
jmp 0x1400570f9
add rax, 0x10
cmp rax, r9
je 0x140057110
cmp qword [rax], 0xffffffffffffffff
je 0x1400570f0
add rsp, 0x28
jmp 0x140056cf0
test r8, r8
je 0x14005712c
js 0x140057133
mov eax, 0xfffffffe
cmp r8, rax
cmovle rax, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
add rsp, 0x28
ret
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, 0xffffffff
jmp 0x14005712e