Function at 0x1400c59a0
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x6a8
mov rax, qword [0x140285110]
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x6f8], edx
mov rsi, qword [rax]
mov qword [rsp + 0x698], rsi
xor esi, esi
test r8d, r8d
mov esi, 0xffffffff
cmovs r8d, esi
test edx, edx
mov dword [rsp + 0x54], r8d
jne 0x1400c53f0
mov edx, 1
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_SleepEx]
test eax, eax
jne 0x1400c5948
xor eax, eax
mov r15, qword [0x140285110]
mov rbx, qword [rsp + 0x698]
xor rbx, qword [r15]
jne 0x1400c598f
add rsp, 0x6a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, dword [rsp + 0x6f8]
shl rcx, 3
call sub.msvcrt.dll_malloc
test rax, rax
mov qword [rsp + 0x38], rax
je 0x1400c595e
mov edx, dword [rsp + 0x6f8]
mov rdi, qword [rsp + 0x48]
mov r15d, esi
lea r14, [rsp + 0x490]
lea r13, [rsp + 0x280]
lea rsi, [rsp + 0x70]
xor ebp, ebp
sub edx, 1
mov qword [rsp + 0x58], rdi
add rdx, 1
mov qword [rsp + 0x40], rdx
movzx eax, word [rdi + 4]
movsxd rbx, dword [rdi]
mov r12d, ebp
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x280], 0
mov dword [rsp + 0x490], 1
test ah, 1
mov qword [rsp + 0x498], rbx
je 0x1400c5770
mov qword [rsp + 0x78], rbx
mov dword [rsp + 0x70], 1
mov r8d, 0x2d
mov r9d, 0x3f
mov ecx, 0x3b
mov r10d, 0x29
test al, 0x10
je 0x1400c54bf
mov qword [rsp + 0x288], rbx
mov dword [rsp + 0x280], 1
mov r8d, r9d
mov r10d, ecx
test ah, 4
cmove r8d, r10d
xor r11d, r11d
mov dword [rsp + 0x50], r8d
mov word [rdi + 6], r11w
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov rdx, qword [rsp + 0x38]
test rax, rax
mov r8d, dword [rsp + 0x50]
mov qword [rdx + rbp*8], rax
je 0x1400c5840
movsxd rcx, dword [rdi]
mov rdx, rax
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x1400c5790
lea rax, [rsp + 0x68]
xor ecx, ecx
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], 0
mov r9, r14
mov r8, r13
mov qword [rsp + 0x20], rax
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x1400c5700
movzx ebx, word [rdi + 6]
test bx, bx
je 0x1400c5548
cmp r15d, 0xffffffff
cmove r15d, r12d
add rbp, 1
add rdi, 8
cmp qword [rsp + 0x40], rbp
jne 0x1400c5445
cmp r15d, 0xffffffff
mov rdi, qword [rsp + 0x58]
je 0x1400c5965
mov r13, qword [rsp + 0x48]
mov dword [rsp + 0x50], r15d
mov r15, rdi
mov rsi, qword [rsp + 0x38]
mov r12, qword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
lea rbx, [r13 + rbp*8]
xor ebp, ebp
mov r13, qword [sym.imp.WS2_32.dll_WSACloseEvent]
jmp 0x1400c5695
movzx eax, word [r15 + 6]
test dl, 0x20
je 0x1400c55d6
movzx r9d, word [r15 + 4]
mov r8d, dword [rsp + 0x4a8]
and r9w, 0x100
or r9d, 2
or eax, r9d
test r8d, r8d
mov word [r15 + 6], ax
je 0x1400c55d6
or eax, 1
mov word [r15 + 6], ax
test dl, 8
je 0x1400c55fd
mov edi, dword [rsp + 0x4a0]
mov ecx, eax
or ch, 1
mov word [r15 + 6], cx
test edi, edi
je 0x1400c57f0
or ax, 0x101
mov word [r15 + 6], ax
test dl, 4
je 0x1400c5626
mov r10d, dword [rsp + 0x49c]
mov ecx, eax
or ch, 4
mov word [r15 + 6], cx
test r10d, r10d
je 0x1400c5800
or ax, 0x401
mov word [r15 + 6], ax
test dl, 1
je 0x1400c564f
mov r11d, dword [rsp + 0x494]
mov ecx, eax
or ch, 1
mov word [r15 + 6], cx
test r11d, r11d
je 0x1400c57d0
or ax, 0x101
mov word [r15 + 6], ax
and edx, 2
je 0x1400c5677
mov r9d, dword [rsp + 0x498]
mov edx, eax
or edx, 0x10
mov word [r15 + 6], dx
test r9d, r9d
je 0x1400c57e0
or eax, 0x11
mov word [r15 + 6], ax
test ax, ax
setne r8b
add r15, 8
add rsi, 8
movzx edi, r8b
add ebp, edi
cmp rbx, r15
je 0x1400c5810
movsxd rcx, dword [r15]
mov r8, r14
mov rdx, qword [rsi]
call r12
test eax, eax
jne 0x1400c57b0
movsxd rcx, dword [r15]
xor r8d, r8d
mov rdx, qword [rsi]
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
mov rcx, qword [rsi]
call r13
mov edx, dword [rsp + 0x490]
test dl, 0x10
je 0x1400c55a0
movzx r10d, word [r15 + 6]
mov r11d, dword [rsp + 0x4a4]
mov eax, r10d
or eax, 0x10
test r11d, r11d
mov word [r15 + 6], ax
je 0x1400c55a5
mov eax, r10d
or eax, 0x11
mov word [r15 + 6], ax
jmp 0x1400c55a5
mov rdx, rsi
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400c571f
movzx r9d, word [rdi + 4]
and r9w, 0x100
or word [rdi + 6], r9w
mov rdx, r13
mov rcx, rbx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1400c5739
movzx ecx, word [rdi + 4]
and ecx, 0x10
or word [rdi + 6], cx
mov rcx, rbx
mov rdx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
movzx ebx, word [rdi + 6]
je 0x1400c553b
movzx r8d, word [rdi + 4]
or ebx, 1
and r8w, 0x400
or ebx, r8d
mov word [rdi + 6], bx
jmp 0x1400c553b
mov r8d, 0x24
mov r9d, 0x36
mov ecx, 0x32
mov r10d, 0x20
jmp 0x1400c54a2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
jne 0x1400c5504
or word [rdi + 6], 4
jmp 0x1400c5504
mov ecx, 5
mov rdi, r14
xor eax, eax
rep stosq qword [rdi], rax
mov dword [rdi], 0
jmp 0x1400c56a9
mov eax, ecx
jmp 0x1400c564f
mov eax, edx
jmp 0x1400c5677
mov eax, ecx
jmp 0x1400c55fd
mov eax, ecx
jmp 0x1400c5626
mov rcx, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x50]
call fcn.14016b6d8
test ebp, ebp
jne 0x1400c5830
cmp r14d, 0xc0
je 0x1400c5948
mov eax, ebp
jmp 0x1400c53c0
test r12d, r12d
je 0x1400c5928
lea r13d, [r12 - 1]
lea rbp, [rdx - 8]
mov rsi, qword [sym.imp.WS2_32.dll_WSACloseEvent]
lea r12, [rdx + r13*8]
and r13d, 7
mov rcx, qword [r12]
sub r12, 8
call rsi
cmp rbp, r12
je 0x1400c5928
test r13, r13
je 0x1400c58e8
cmp r13, 1
je 0x1400c58d9
cmp r13, 2
je 0x1400c58cf
cmp r13, 3
je 0x1400c58c5
cmp r13, 4
je 0x1400c58bb
cmp r13, 5
je 0x1400c58b1
cmp r13, 6
je 0x1400c58a7
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
mov rcx, qword [r12]
sub r12, 8
call rsi
cmp rbp, r12
je 0x1400c5928
mov rcx, qword [r12]
sub r12, 0x40
call rsi
mov rcx, qword [r12 + 0x38]
call rsi
mov rcx, qword [r12 + 0x30]
call rsi
mov rcx, qword [r12 + 0x28]
call rsi
mov rcx, qword [r12 + 0x20]
call rsi
mov rcx, qword [r12 + 0x18]
call rsi
mov rcx, qword [r12 + 0x10]
call rsi
mov rcx, qword [r12 + 8]
call rsi
cmp rbp, r12
jne 0x1400c58e8
mov rcx, qword [rsp + 0x38]
call fcn.14016b6d8
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xc
mov eax, 0xffffffff
jmp 0x1400c53c0
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 4
mov eax, 0xffffffff
jmp 0x1400c53c0
mov eax, esi
jmp 0x1400c53c0
mov dword [rsp + 0x20], 1
mov r9d, dword [rsp + 0x54]
xor r8d, r8d
mov rdx, qword [rsp + 0x38]
mov ecx, dword [rsp + 0x6f8]
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov r15d, eax
jmp 0x1400c556a
call fcn.1400c4ec0
nop
nop
nop word cs:[rax + rax]
push rsi
push rbx
sub rsp, 0x28
cmp r8d, 0xffffffff
mov rbx, rcx
mov esi, edx
je 0x1400c59c0
add rsp, 0x28
pop rbx
pop rsi
jmp 0x1400c5360
mov r8d, 0x64
mov edx, esi
mov rcx, rbx
call 0x1400c5360
test eax, eax
je 0x1400c59c0
add rsp, 0x28
pop rbx
pop rsi
ret