Function at 0x1800a4170
Capabilities:
Get socket status

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x670
xor edi, edi
mov rsi, r8
mov r14, rcx
test rcx, rcx
je 0x1800a41a5
mov r8d, edi
test edx, edx
je 0x1800a41a5
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x1800a41d3
inc r8d
add rax, 0x10
cmp r8d, edx
jb 0x1800a4193
test rsi, rsi
je 0x1800a44f2
test rsi, rsi
jns 0x1800a44d9
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
mov eax, edi
add rsp, 0x670
pop r14
pop rdi
pop rsi
ret
mov qword [rsp + 0x698], rbx
mov qword [rsp + 0x6a0], rbp
mov qword [rsp + 0x668], r12
mov qword [rsp + 0x660], r13
mov r10d, edi
mov dword [rsp + 0x240], edi
mov r13d, edx
mov r11d, edi
mov dword [rsp + 0x30], edi
mov r8d, edi
mov dword [rsp + 0x450], edi
or rbp, 0xffffffffffffffff
mov rbx, rcx
mov r12d, edx
nop dword [rax + rax]
mov rax, qword [rbx]
mov word [rbx + 0xa], di
cmp rax, 0xffffffffffffffff
je 0x1800a432a
movzx r9d, word [rbx + 8]
test r9b, 7
je 0x1800a432a
cmp rax, rbp
cmova rbp, rax
test r9b, 1
je 0x1800a429a
mov edx, edi
mov rcx, rdi
test r10d, r10d
je 0x1800a4274
nop word [rax + rax]
cmp qword [rsp + rcx*8 + 0x248], rax
je 0x1800a4274
inc edx
inc rcx
cmp edx, r10d
jb 0x1800a4260
cmp edx, r10d
jne 0x1800a429a
cmp r10d, 0x40
jae 0x1800a429a
mov qword [rsp + rcx*8 + 0x248], rax
mov r10d, dword [rsp + 0x240]
inc r10d
mov dword [rsp + 0x240], r10d
test r9b, 4
je 0x1800a42de
mov edx, edi
mov rcx, rdi
test r11d, r11d
je 0x1800a42c1
nop word [rax + rax]
cmp qword [rsp + rcx*8 + 0x38], rax
je 0x1800a42c1
inc edx
inc rcx
cmp edx, r11d
jb 0x1800a42b0
cmp edx, r11d
jne 0x1800a42de
cmp r11d, 0x40
jae 0x1800a42de
mov qword [rsp + rcx*8 + 0x38], rax
mov r11d, dword [rsp + 0x30]
inc r11d
mov dword [rsp + 0x30], r11d
test r9b, 2
je 0x1800a432a
mov edx, edi
mov rcx, rdi
test r8d, r8d
je 0x1800a4304
nop
cmp qword [rsp + rcx*8 + 0x458], rax
je 0x1800a4304
inc edx
inc rcx
cmp edx, r8d
jb 0x1800a42f0
cmp edx, r8d
jne 0x1800a432a
cmp r8d, 0x40
jae 0x1800a432a
mov qword [rsp + rcx*8 + 0x458], rax
mov r8d, dword [rsp + 0x450]
inc r8d
mov dword [rsp + 0x450], r8d
add rbx, 0x10
sub r13, 1
jne 0x1800a4220
mov r13, qword [rsp + 0x660]
test r10d, r10d
jne 0x1800a4393
test r11d, r11d
jne 0x1800a4393
test r8d, r8d
jne 0x1800a4393
test rsi, rsi
jne 0x1800a435b
mov eax, edi
jmp 0x1800a443b
test rsi, rsi
jns 0x1800a4373
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x1800a443b
mov ecx, 0xffffffff
mov eax, 0xfffffffe
cmp rsi, rcx
cmovge rsi, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
jmp 0x1800a443b
lea rbx, [rsp + 0x690]
test rsi, rsi
jns 0x1800a43a5
mov rbx, rdi
jmp 0x1800a4403
test rsi, rsi
jle 0x1800a43f5
movabs rax, 0x20c49ba5e353f7cf
imul rsi
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, rdx
imul rax, rax, 0x3e8
sub rsi, rax
mov eax, 0x7fffffff
imul rsi, rsi, 0x3e8
cmp rdx, rax
cmovg rdx, rax
mov dword [rsp + 0x690], edx
mov dword [rsp + 0x694], esi
jmp 0x1800a4403
mov dword [rsp + 0x690], edi
mov dword [rsp + 0x694], edi
test r8d, r8d
lea r9, [rsp + 0x450]
lea r8, [rsp + 0x30]
cmove r9, rdi
test r11d, r11d
lea rdx, [rsp + 0x240]
cmove r8, rdi
test r10d, r10d
lea ecx, [rbp + 1]
cmove rdx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_select]
mov rbp, qword [rsp + 0x6a0]
test eax, eax
jns 0x1800a4466
or eax, 0xffffffff
mov rbx, qword [rsp + 0x698]
mov r12, qword [rsp + 0x668]
add rsp, 0x670
pop r14
pop rdi
pop rsi
ret
test eax, eax
je 0x1800a444a
mov esi, edi
lea rbx, [r14 + 0xa]
mov rcx, qword [rbx - 0xa]
mov word [rbx], di
cmp rcx, 0xffffffffffffffff
je 0x1800a44c8
lea rdx, [rsp + 0x240]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800a4492
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800a44a8
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x450]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800a44c1
or word [rbx], 2
cmp word [rbx], di
je 0x1800a44c8
inc esi
add rbx, 0x10
sub r12, 1
jne 0x1800a4470
mov eax, esi
jmp 0x1800a444a
mov ecx, 0xffffffff
mov eax, 0xfffffffe
cmp rsi, rcx
cmovge rsi, rax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
add rsp, 0x670
pop r14
pop rdi
pop rsi
ret