Function at 0x421010
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x698
cmp rdx, 0xffffffffffffffff
mov rdi, rdx
mov qword [rsp + 0x6e0], rcx
sete dl
cmp r8, 0xffffffffffffffff
mov r15, r8
sete al
mov esi, r9d
mov qword [rsp + 0x48], 0
test dl, al
je 0x421059
cmp rcx, 0xffffffffffffffff
je 0x4213d0
xor ebx, ebx
test esi, esi
jle 0x42106b
call fcn.00420f10
mov ebx, esi
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x6e0], 0xffffffffffffffff
mov dword [rsp + 0x480], 0
mov dword [rsp + 0x60], 0
je 0x4210b1
mov rax, qword [rsp + 0x6e0]
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x480], 1
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x488], rax
cmp rdi, 0xffffffffffffffff
je 0x4213b0
mov ecx, dword [rsp + 0x60]
lea rax, [rsp + 0x60]
test ecx, ecx
je 0x4213f3
cmp qword [rsp + 0x68], rdi
mov qword [rsp + 0x30], rax
je 0x421105
lea rdx, [rsp + 0x70]
xor eax, eax
jmp 0x4210eb
add rdx, 8
cmp qword [rdx - 8], rdi
je 0x421105
add eax, 1
cmp eax, ecx
jne 0x4210e1
cmp ecx, 0x3f
ja 0x421105
mov eax, ecx
add ecx, 1
mov qword [rsp + rax*8 + 0x68], rdi
mov dword [rsp + 0x60], ecx
mov ecx, dword [rsp + 0x480]
lea rbp, [rsp + 0x480]
test ecx, ecx
je 0x421146
xor eax, eax
cmp qword [rsp + 0x488], rdi
lea rdx, [rbp + 0x10]
jne 0x42113a
jmp 0x421160
add rdx, 8
cmp qword [rdx - 8], rdi
je 0x421160
add eax, 1
cmp eax, ecx
jne 0x421130
cmp ecx, 0x3f
ja 0x421160
mov eax, ecx
add ecx, 1
mov qword [rsp + rax*8 + 0x488], rdi
mov dword [rsp + 0x480], ecx
nop word [rax + rax]
cmp qword [rsp + 0x6e0], rdi
mov r8, rdi
cmovae r8, qword [rsp + 0x6e0]
cmp r15, 0xffffffffffffffff
mov dword [rsp + 0x270], 0
je 0x4211e7
mov ecx, dword [rsp + 0x480]
mov qword [rsp + 0x278], r15
mov dword [rsp + 0x270], 1
test ecx, ecx
je 0x4211cb
cmp qword [rsp + 0x488], r15
je 0x4211e0
lea rdx, [rbp + 0x10]
xor eax, eax
jmp 0x4211bf
add rdx, 8
cmp qword [rdx - 8], r15
je 0x4211e0
add eax, 1
cmp eax, ecx
jne 0x4211b5
cmp ecx, 0x3f
ja 0x4211e0
mov eax, ecx
add ecx, 1
mov qword [rsp + rax*8 + 0x488], r15
mov dword [rsp + 0x480], ecx
nop
cmp r8, r15
cmovb r8, r15
lea r12, [rsp + 0x50]
mov eax, 0
test esi, esi
mov r13, qword [sym.imp.WS2_32.dll_select]
mov r14, qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmovs r12, rax
lea eax, [r8 + 1]
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x270]
mov qword [rsp + 0x38], rax
nop word [rax + rax]
cmp esi, 0
jle 0x4212d0
mov eax, 0x10624dd3
imul ebx
mov eax, ebx
sar eax, 0x1f
sar edx, 6
sub edx, eax
mov eax, ebx
mov dword [rsp + 0x50], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x54], eax
mov qword [rsp + 0x20], r12
mov r9, rbp
mov r8, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
mov ecx, dword [rsp + 0x44]
call r13
cmp eax, 0xffffffff
jne 0x4212f0
call r14
test eax, eax
je 0x421294
cmp eax, 0x2714
jne 0x4213e9
mov eax, dword [0x0047fe50]
test eax, eax
jne 0x4213e9
test esi, esi
jle 0x421220
call fcn.00420f10
mov rdx, qword [rsp + 0x48]
mov rcx, rax
mov ebx, esi
call fcn.00420f50
sub ebx, eax
test ebx, ebx
jg 0x421220
xor ebx, ebx
mov eax, ebx
add rsp, 0x698
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
jne 0x421252
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x54], 0
jmp 0x421252
test eax, eax
js 0x4213e9
je 0x4212b6
xor ebx, ebx
cmp qword [rsp + 0x6e0], 0xffffffffffffffff
je 0x42133a
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x6e0]
xor ebx, ebx
call sub.WS2_32.dll___WSAFDIsSet
mov rcx, qword [rsp + 0x6e0]
test eax, eax
mov rdx, rbp
setne bl
call sub.WS2_32.dll___WSAFDIsSet
mov edx, ebx
or edx, 4
test eax, eax
cmovne ebx, edx
cmp rdi, 0xffffffffffffffff
je 0x42136c
mov rdx, qword [rsp + 0x30]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
mov edx, ebx
mov rcx, rdi
or edx, 8
test eax, eax
cmovne ebx, edx
mov rdx, rbp
call sub.WS2_32.dll___WSAFDIsSet
mov edx, ebx
or edx, 4
test eax, eax
cmovne ebx, edx
cmp r15, 0xffffffffffffffff
je 0x4212b8
mov rdx, qword [rsp + 0x38]
mov rcx, r15
call sub.WS2_32.dll___WSAFDIsSet
mov edx, ebx
mov rcx, r15
or edx, 2
test eax, eax
cmovne ebx, edx
mov rdx, rbp
call sub.WS2_32.dll___WSAFDIsSet
mov edx, ebx
or edx, 4
test eax, eax
cmovne ebx, edx
jmp 0x4212b8
lea rax, [rsp + 0x60]
mov r8, qword [rsp + 0x6e0]
lea rbp, [rsp + 0x480]
mov qword [rsp + 0x30], rax
jmp 0x421174
test r9d, r9d
je 0x4212b6
js 0x4213fd
mov ecx, r9d
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4212b6
mov ebx, 0xffffffff
jmp 0x4212b8
mov qword [rsp + 0x30], rax
jmp 0x4210f7
mov ecx, 0x2726
mov ebx, 0xffffffff
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x4212b8