Function at 0x1004c420
Capabilities:
Get socket status

Disassembly:
mov rax, rsp
sub rsp, 0x6d8
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rdi
xor edi, edi
test rcx, rcx
mov qword [rax - 0x18], r14
mov qword [rax - 0x20], r15
mov ebp, r8d
mov ebx, edx
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x48], edi
mov r14d, edi
mov r15, rcx
je 0x1004c476
test edx, edx
mov r9d, edi
je 0x1004c476
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x1004c483
add r9d, 1
add rax, 0x10
cmp r9d, ebx
jb 0x1004c463
mov ecx, r8d
call fcn.1004c020
jmp 0x1004c77c
test r8d, r8d
jle 0x1004c4a8
lea rcx, [rsp + 0x50]
mov r14d, r8d
call fcn.1006dbf0
lea rdx, [rsp + 0x40]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
mov qword [rsp + 0x6f0], rsi
mov qword [rsp + 0x6d0], r12
mov qword [rsp + 0x6c8], r13
mov r13, rbx
mov r10d, edi
mov dword [rsp + 0x280], edi
mov r11d, edi
mov dword [rsp + 0x70], edi
mov r8d, edi
mov dword [rsp + 0x490], edi
mov r12, 0xffffffffffffffff
mov rsi, r15
nop
nop
mov rdx, qword [rsi]
mov word [rsi + 0xa], di
cmp rdx, 0xffffffffffffffff
je 0x1004c5fe
movzx r9d, word [rsi + 8]
test r9b, 7
je 0x1004c5fe
cmp rdx, r12
cmova r12, rdx
test r9b, 1
je 0x1004c56d
test r10d, r10d
mov ecx, edi
mov rax, rdi
je 0x1004c546
nop
nop
nop
cmp qword [rsp + rax*8 + 0x288], rdx
je 0x1004c546
add ecx, 1
add rax, 1
cmp ecx, r10d
jb 0x1004c530
cmp ecx, r10d
jne 0x1004c56d
cmp r10d, 0x40
jae 0x1004c56d
mov qword [rsp + rax*8 + 0x288], rdx
mov r10d, dword [rsp + 0x280]
add r10d, 1
mov dword [rsp + 0x280], r10d
test r9b, 4
je 0x1004c5b1
test r11d, r11d
mov ecx, edi
mov rax, rdi
je 0x1004c593
nop
cmp qword [rsp + rax*8 + 0x78], rdx
je 0x1004c593
add ecx, 1
add rax, 1
cmp ecx, r11d
jb 0x1004c580
cmp ecx, r11d
jne 0x1004c5b1
cmp r11d, 0x40
jae 0x1004c5b1
mov qword [rsp + rax*8 + 0x78], rdx
mov r11d, dword [rsp + 0x70]
add r11d, 1
mov dword [rsp + 0x70], r11d
test r9b, 2
je 0x1004c5fe
test r8d, r8d
mov ecx, edi
mov rax, rdi
je 0x1004c5d7
cmp qword [rsp + rax*8 + 0x498], rdx
je 0x1004c5d7
add ecx, 1
add rax, 1
cmp ecx, r8d
jb 0x1004c5c1
cmp ecx, r8d
jne 0x1004c5fe
cmp r8d, 0x40
jae 0x1004c5fe
mov qword [rsp + rax*8 + 0x498], rdx
mov r8d, dword [rsp + 0x490]
add r8d, 1
mov dword [rsp + 0x490], r8d
add rsi, 0x10
sub rbx, 1
jne 0x1004c4f0
test r10d, r10d
jne 0x1004c627
test r11d, r11d
jne 0x1004c627
test r8d, r8d
jne 0x1004c627
mov ecx, ebp
call fcn.1004c020
jmp 0x1004c764
lea rbx, [rsp + 0x30]
test ebp, ebp
movdqa xmmword [rsp + 0x6a0], xmm6
movaps xmm6, xmmword [rsp + 0x40]
cmovs rbx, rdi
test ebp, ebp
jle 0x1004c671
mov eax, 0x10624dd3
imul r14d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r14d
mov dword [rsp + 0x30], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x34], eax
jmp 0x1004c67d
test ebp, ebp
jne 0x1004c67d
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x34], edi
test r8d, r8d
lea r9, [rsp + 0x490]
lea r8, [rsp + 0x70]
cmove r9, rdi
test r11d, r11d
lea rdx, [rsp + 0x280]
cmove r8, rdi
test r10d, r10d
lea ecx, [r12 + 1]
cmove rdx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1004c752
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x1004c6dd
cmp dword [0x100b77c8], edi
jne 0x1004c756
cmp eax, 0x2714
jne 0x1004c756
test ebp, ebp
jg 0x1004c6fb
mov r10d, dword [rsp + 0x280]
mov r11d, dword [rsp + 0x70]
mov r8d, dword [rsp + 0x490]
jmp 0x1004c640
lea rcx, [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm6
call fcn.1006dbf0
lea rdx, [rsp + 0x50]
mov rcx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.1006dc40
mov r14d, ebp
sub r14d, eax
test r14d, r14d
jle 0x1004c7b0
mov r10d, dword [rsp + 0x280]
mov r11d, dword [rsp + 0x70]
mov r8d, dword [rsp + 0x490]
jmp 0x1004c640
test eax, eax
jns 0x1004c7ac
mov eax, 0xffffffff
movdqa xmm6, xmmword [rsp + 0x6a0]
mov r12, qword [rsp + 0x6d0]
mov rsi, qword [rsp + 0x6f0]
mov r13, qword [rsp + 0x6c8]
mov r15, qword [rsp + 0x6b8]
mov r14, qword [rsp + 0x6c0]
mov rdi, qword [rsp + 0x6f8]
mov rbp, qword [rsp + 0x6e8]
mov rbx, qword [rsp + 0x6e0]
add rsp, 0x6d8
ret
test eax, eax
jne 0x1004c7b4
xor eax, eax
jmp 0x1004c75b
lea rbx, [r15 + 0xa]
nop
nop
mov rcx, qword [rbx - 0xa]
mov word [rbx], 0
cmp rcx, 0xffffffffffffffff
je 0x1004c81c
lea rdx, [rsp + 0x280]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004c7e4
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x70]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004c7fa
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x490]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1004c813
or word [rbx], 2
cmp word [rbx], 0
je 0x1004c81c
add edi, 1
add rbx, 0x10
sub r13, 1
jne 0x1004c7c0
mov eax, edi
jmp 0x1004c75b