Function at 0x421420
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x688
test rcx, rcx
mov edi, r8d
mov qword [rsp + 0x30], 0
je 0x421470
test edx, edx
je 0x421470
cmp qword [rcx], 0xffffffffffffffff
lea ebp, [rdx - 1]
jne 0x421490
lea r8d, [rdx - 1]
xor eax, eax
mov rbp, r8
shl r8, 4
jmp 0x42146b
add rax, 0x10
cmp qword [rcx + rax], 0xffffffffffffffff
jne 0x421490
cmp rax, r8
jne 0x421460
test edi, edi
jne 0x421700
xor eax, eax
add rsp, 0x688
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor esi, esi
test edi, edi
jle 0x4214ac
mov qword [rsp + 0x38], rcx
mov esi, edi
call fcn.00420f10
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x30], rax
mov edx, ebp
lea rbx, [rcx + 0xa]
lea rbp, [rsp + 0x50]
shl rdx, 4
lea r14, [rsp + 0x260]
lea r15, [rsp + 0x470]
lea rax, [rcx + rdx + 0x1a]
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x260], 0
mov dword [rsp + 0x470], 0
xor r11d, r11d
mov rdx, rbx
mov qword [rsp + 0x38], rax
xor r8d, r8d
xor r9d, r9d
mov r10, rax
mov rax, qword [rdx - 0xa]
xor ecx, ecx
mov word [rdx], cx
cmp rax, 0xffffffffffffffff
je 0x4216c5
movzx r12d, word [rdx - 2]
test r12b, 7
je 0x4216c5
test r12b, 1
je 0x421560
test r11d, r11d
je 0x421744
cmp rax, qword [rsp + 0x58]
je 0x421560
lea r13, [rbp + 0x10]
xor ecx, ecx
jmp 0x42154c
add r13, 8
cmp rax, qword [r13 - 8]
je 0x421560
add ecx, 1
cmp ecx, r11d
jne 0x421542
cmp r11d, 0x3f
jbe 0x421744
nop
test r12b, 4
mov ecx, r8d
je 0x4215b0
test r8d, r8d
je 0x421730
cmp rax, qword [rsp + 0x268]
je 0x4215b0
lea r13, [r14 + 0x10]
xor ecx, ecx
jmp 0x421592
add r13, 8
cmp rax, qword [r13 - 8]
je 0x4216f0
add ecx, 1
cmp ecx, r8d
jne 0x421584
cmp r8d, 0x3f
mov ecx, r8d
jbe 0x421730
nop word [rax + rax]
and r12d, 2
je 0x4215f0
test r9d, r9d
je 0x421715
cmp rax, qword [rsp + 0x478]
je 0x4215f0
lea r12, [r15 + 0x10]
xor r8d, r8d
jmp 0x4215dd
add r12, 8
cmp rax, qword [r12 - 8]
je 0x4215f0
add r8d, 1
cmp r8d, r9d
jne 0x4215d2
cmp r9d, 0x3f
jbe 0x421715
mov eax, r9d
add rdx, 0x10
mov r8d, ecx
mov r9d, eax
cmp rdx, r10
jne 0x421502
lea r12, [rsp + 0x40]
mov r13, qword [sym.imp.WS2_32.dll_select]
mov dword [rsp + 0x470], eax
test edi, edi
mov eax, 0
mov dword [rsp + 0x50], r11d
mov dword [rsp + 0x260], ecx
cmovs r12, rax
cmp edi, 0
jle 0x4216d0
mov eax, 0x10624dd3
imul esi
mov eax, esi
sar eax, 0x1f
sar edx, 6
sub edx, eax
mov eax, esi
mov dword [rsp + 0x40], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x44], eax
xor ecx, ecx
mov qword [rsp + 0x20], r12
mov r9, r15
mov r8, r14
mov rdx, rbp
call r13
cmp eax, 0xffffffff
jne 0x421755
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x421699
cmp eax, 0x2714
jne 0x4216bb
mov edx, dword [0x0047fe50]
test edx, edx
jne 0x4216bb
test edi, edi
jle 0x421630
call fcn.00420f10
mov rdx, qword [rsp + 0x30]
mov rcx, rax
mov esi, edi
call fcn.00420f50
sub esi, eax
test esi, esi
jg 0x421630
mov eax, 0xffffffff
jmp 0x42147a
mov ecx, r8d
jmp 0x4215f0
jne 0x421662
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 0
jmp 0x421662
mov ecx, r8d
jmp 0x4215b0
js 0x4217d9
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x42147a
mov r8d, r9d
mov qword [rsp + r8*8 + 0x478], rax
lea eax, [r9 + 1]
jmp 0x4215f3
mov ecx, r8d
mov qword [rsp + rcx*8 + 0x268], rax
lea ecx, [r8 + 1]
jmp 0x4215b0
mov ecx, r11d
add r11d, 1
mov qword [rsp + rcx*8 + 0x58], rax
jmp 0x421560
test eax, eax
js 0x4216bb
mov esi, 0
je 0x421478
mov rdi, qword [rsp + 0x38]
jmp 0x42177f
cmp word [rbx], 0
jne 0x4217c6
add rbx, 0x10
cmp rdi, rbx
je 0x4217d2
mov rcx, qword [rbx - 0xa]
xor eax, eax
mov word [rbx], ax
cmp rcx, 0xffffffffffffffff
je 0x421776
mov rdx, rbp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x42179e
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
mov rdx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4217b2
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
mov rdx, r15
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x421770
or word [rbx], 2
add rbx, 0x10
add esi, 1
cmp rdi, rbx
jne 0x42177f
mov eax, esi
jmp 0x42147a
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, 0xffffffff
jmp 0x42147a