Function at 0x140051c50
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x610]
sub rsp, 0x710
mov rax, qword [0x1401567f8]
xor rax, rsp
mov qword [rbp + 0x600], rax
mov rsi, r9
mov qword [rbp - 0x68], r9
mov r11d, r8d
mov dword [rsp + 0x34], r8d
mov ebx, edx
mov dword [rsp + 0x30], ebx
mov r14, rcx
mov qword [rsp + 0x40], rcx
test r9, r9
je 0x1400520b3
mov rax, qword [r9]
mov qword [rbp - 0x80], rax
test rax, rax
je 0x1400520b3
mov qword [rsp + 0x78], rax
xor r15d, r15d
mov qword [r9], r15
cmp ebx, 0x3f
jae 0x14005209e
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x48], xmm0
mov r13d, r15d
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x58], r15
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r15
lea r8, [rsp + 0x78]
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.1400516d0
mov r12d, r15d
mov rdi, qword [rsp + 0x50]
test ebx, ebx
mov rbx, qword [rsp + 0x68]
je 0x140051e78
mov word [r14 + 0xa], r15w
mov qword [rbp - 0x70], r14
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov qword [rbp - 0x78], rax
cmp rdi, r13
je 0x140051d43
mov qword [rdi], rax
mov rsi, r15
mov rax, qword [rsp + 0x40]
mov qword [rdi + 8], rax
add rdi, 0x10
mov qword [rsp + 0x50], rdi
jmp 0x140051d6b
lea r8, [rbp - 0x78]
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.140051870
mov r13, qword [rsp + 0x58]
mov qword [rsp + 0x38], r13
mov rdi, qword [rsp + 0x50]
mov r14, qword [rbp - 0x70]
mov rsi, qword [rbp - 0x78]
test rsi, rsi
je 0x140051d93
test r14, r14
je 0x140051d8a
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x140051d8a
xor r8d, r8d
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
lea rsi, [rdi - 0x10]
mov r14, qword [rsi]
mov qword [rsp + 0x78], r14
test r14, r14
je 0x140051eba
cmp rbx, qword [rsp + 0x70]
je 0x140051dbd
mov qword [rbx], r14
add rbx, 8
mov qword [rsp + 0x68], rbx
jmp 0x140051dd4
lea r8, [rsp + 0x78]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.1400516d0
mov rbx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x40]
movzx r9d, word [rax + 8]
movzx eax, r9w
mov ecx, 0x300
and ax, cx
neg ax
sbb ecx, ecx
and ecx, 9
mov r8d, ecx
or r8d, 0x12
test r9b, 0x10
cmove r8d, ecx
mov rdx, r14
mov r14, qword [rsp + 0x40]
mov rcx, qword [r14]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x140051e5d
mov eax, 4
mov word [r14 + 0xa], ax
mov rdx, qword [rsi]
test rdx, rdx
je 0x140051e4c
mov rax, qword [rsi + 8]
test rax, rax
je 0x140051e43
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x140051e43
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov rdi, rsi
mov qword [rsp + 0x50], rsi
sub rbx, 8
mov qword [rsp + 0x68], rbx
inc r12d
add r14, 0x10
mov qword [rsp + 0x40], r14
cmp r12d, dword [rsp + 0x30]
jb 0x140051d11
mov rsi, qword [rbp - 0x68]
mov rdx, qword [rsp + 0x60]
sub rbx, rdx
sar rbx, 3
mov r9d, 0xffffffff
cmp dword [rsp + 0x34], 0xffffffff
cmovne r9d, dword [rsp + 0x34]
mov dword [rsp + 0x20], r15d
xor r8d, r8d
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
jne 0x140051ed5
mov r15d, 0xffffffff
mov r12, qword [rsp + 0x48]
jmp 0x140051fd1
mov ecx, 0x2747
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov r15d, 0xffffffff
mov r12, qword [rsp + 0x48]
jmp 0x140051fd1
cmp eax, 0x102
je 0x140051eed
test eax, eax
jne 0x140051ef7
mov rax, qword [rbp - 0x80]
mov qword [rsi], rax
mov r15d, 1
mov r12, qword [rsp + 0x48]
jmp 0x140051fd1
lea r14d, [rax - 1]
mov r13d, r15d
mov rax, rdi
mov r12, qword [rsp + 0x48]
sub rax, r12
sar rax, 4
movsxd rsi, r14d
cmp rsi, rax
jae 0x140051fce
shl rsi, 4
add rsi, r12
mov r12, rax
mov edi, 1
nop dword [rax + rax]
mov rbx, qword [rsi + 8]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rax
mov dword [rbp - 0x38], eax
lea r8, [rbp - 0x60]
mov rdx, qword [rsi]
mov rcx, qword [rbx]
call qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
je 0x140051f62
mov word [rbx + 0xa], di
jmp 0x140051fb1
mov ecx, dword [rbp - 0x60]
test ecx, ecx
je 0x140051fb1
movzx eax, word [rbx + 0xa]
test cl, 0xd
je 0x140051f81
mov ecx, 0x300
or ax, cx
mov word [rbx + 0xa], ax
mov ecx, dword [rbp - 0x60]
test cl, 0x12
je 0x140051f8e
or ax, 0x10
mov word [rbx + 0xa], ax
mov rax, r15
cmp dword [rbp + rax*4 - 0x5c], 0
jne 0x140051fa3
inc rax
cmp rax, 0xa
jl 0x140051f91
jmp 0x140051fa7
or word [rbx + 0xa], di
cmp word [rbx + 0xa], 0
je 0x140051fb1
inc r13d
inc r14d
add rsi, 0x10
movsxd rax, r14d
cmp rax, r12
jb 0x140051f30
mov rdi, qword [rsp + 0x50]
mov r12, qword [rsp + 0x48]
mov r15d, r13d
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x14005201a
mov rax, qword [rsp + 0x70]
sub rax, rcx
sar rax, 3
lea rdx, [rax*8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140052014
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400522e5
call fcn.1400b7640
nop
test r12, r12
je 0x140052096
mov rbx, r12
cmp r12, rdi
je 0x14005205c
mov rdx, qword [rbx]
test rdx, rdx
je 0x140052053
mov rax, qword [rbx + 8]
test rax, rax
je 0x14005204a
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x14005204a
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [rbx]
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
add rbx, 0x10
cmp rbx, rdi
jne 0x140052027
mov rdx, qword [rsp + 0x38]
sub rdx, r12
and rdx, 0xfffffffffffffff0
mov rax, r12
cmp rdx, 0x1000
jb 0x14005208e
add rdx, 0x27
mov r12, qword [r12 - 8]
sub rax, r12
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400522df
mov rcx, r12
call fcn.1400b7640
mov eax, r15d
jmp 0x1400522b5
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, 0xffffffff
jmp 0x1400522b5
xor r15d, r15d
mov edi, r15d
mov r9d, r15d
mov dword [rbp - 0x30], r15d
mov r10d, r15d
mov dword [rbp + 0x1e0], r15d
mov r8d, r15d
mov dword [rbp + 0x3f0], r15d
mov r13d, 0x300
test edx, edx
je 0x1400521f2
mov rbx, r14
mov esi, dword [rsp + 0x30]
mov r12d, esi
nop dword [rax]
mov rdx, qword [rbx]
mov rax, rdx
cmp rdx, rdi
cmovbe rax, rdi
mov rdi, rax
movzx r11d, word [rbx + 8]
test r13w, r11w
je 0x140052140
mov ecx, r15d
test r9d, r9d
je 0x140052123
mov eax, ecx
cmp qword [rbp + rax*8 - 0x28], rdx
je 0x140052123
inc ecx
cmp ecx, r9d
jb 0x140052113
cmp ecx, r9d
jne 0x140052140
cmp r9d, 0x40
jae 0x140052140
mov eax, ecx
mov qword [rbp + rax*8 - 0x28], rdx
mov r9d, dword [rbp - 0x30]
inc r9d
mov dword [rbp - 0x30], r9d
test r11b, 0x10
je 0x140052189
mov ecx, r15d
test r10d, r10d
je 0x140052163
nop
mov eax, ecx
cmp qword [rbp + rax*8 + 0x1e8], rdx
je 0x140052163
inc ecx
cmp ecx, r10d
jb 0x140052150
cmp ecx, r10d
jne 0x140052189
cmp r10d, 0x40
jae 0x140052189
mov eax, ecx
mov qword [rbp + rax*8 + 0x1e8], rdx
mov r10d, dword [rbp + 0x1e0]
inc r10d
mov dword [rbp + 0x1e0], r10d
test r11b, 1
je 0x1400521d9
mov ecx, r15d
test r8d, r8d
je 0x1400521b3
nop word [rax + rax]
mov eax, ecx
cmp qword [rbp + rax*8 + 0x3f8], rdx
je 0x1400521b3
inc ecx
cmp ecx, r8d
jb 0x1400521a0
cmp ecx, r8d
jne 0x1400521d9
cmp r8d, 0x40
jae 0x1400521d9
mov eax, ecx
mov qword [rbp + rax*8 + 0x3f8], rdx
mov r8d, dword [rbp + 0x3f0]
inc r8d
mov dword [rbp + 0x3f0], r8d
add rbx, 0x10
sub r12, 1
jne 0x1400520f0
mov ebx, dword [rsp + 0x30]
mov r11d, dword [rsp + 0x34]
jmp 0x1400521f5
mov rsi, rbx
mov eax, 0x10624dd3
imul r11d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x38], edx
imul eax, edx, 0x3e8
mov ecx, r11d
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x3c], eax
lea rax, [rsp + 0x38]
cmp r11d, 0xffffffff
cmove rax, r15
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x3f0]
lea r8, [rbp + 0x1e0]
lea rdx, [rbp - 0x30]
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
js 0x1400522b3
test ebx, ebx
je 0x1400522b3
lea rbx, [r14 + 0xa]
nop dword [rax + rax]
mov word [rbx], r15w
lea rdx, [rbp - 0x30]
mov rcx, qword [rbx - 0xa]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140052279
or word [rbx], r13w
lea rdx, [rbp + 0x1e0]
mov rcx, qword [rbx - 0xa]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140052291
or word [rbx], 0x10
lea rdx, [rbp + 0x3f0]
mov rcx, qword [rbx - 0xa]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400522a9
or word [rbx], 1
add rbx, 0x10
sub rsi, 1
jne 0x140052260
mov eax, edi
mov rcx, qword [rbp + 0x600]
xor rcx, rsp
call fcn.1400b7620
mov rbx, qword [rsp + 0x758]
add rsp, 0x710
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400c9b5c
nop
call fcn.1400c9b5c
nop
int3