Function at 0x180057f50
Capabilities:
Get socket status

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x670
xor edi, edi
mov r13d, r8d
mov esi, edx
mov rbp, rcx
mov dword [rax + 0x20], edi
mov dword [rax + 0x24], edi
mov r14d, edi
test rcx, rcx
je 0x180057f99
mov r9d, edi
test edx, edx
je 0x180057f99
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x180057fca
inc r9d
add rax, 0x10
cmp r9d, esi
jb 0x180057f87
test r8d, r8d
je 0x180058332
test r8d, r8d
jns 0x180058329
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
mov eax, edi
add rsp, 0x670
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x6a8], rbx
mov qword [rsp + 0x668], r12
mov qword [rsp + 0x660], r15
test r8d, r8d
jle 0x180057ff4
mov r14d, r8d
call fcn.1800636f0
mov rbx, rax
jmp 0x180057ffc
mov rbx, qword [rsp + 0x6b8]
mov r10d, edi
mov dword [rsp + 0x240], edi
mov r11d, edi
mov dword [rsp + 0x30], edi
mov r8d, edi
mov dword [rsp + 0x450], edi
or r12, 0xffffffffffffffff
mov r15, rsi
nop
mov rdx, qword [rbp]
mov word [rbp + 0xa], di
cmp rdx, 0xffffffffffffffff
je 0x18005812a
movzx r9d, word [rbp + 8]
test r9b, 7
je 0x18005812a
cmp rdx, r12
cmova r12, rdx
test r9b, 1
je 0x18005809a
mov ecx, edi
mov rax, rdi
test r10d, r10d
je 0x180058074
nop dword [rax + rax]
cmp qword [rsp + rax*8 + 0x248], rdx
je 0x180058074
inc ecx
inc rax
cmp ecx, r10d
jb 0x180058060
cmp ecx, r10d
jne 0x18005809a
cmp r10d, 0x40
jae 0x18005809a
mov qword [rsp + rax*8 + 0x248], rdx
mov r10d, dword [rsp + 0x240]
inc r10d
mov dword [rsp + 0x240], r10d
test r9b, 4
je 0x1800580de
mov ecx, edi
mov rax, rdi
test r11d, r11d
je 0x1800580c1
nop word [rax + rax]
cmp qword [rsp + rax*8 + 0x38], rdx
je 0x1800580c1
inc ecx
inc rax
cmp ecx, r11d
jb 0x1800580b0
cmp ecx, r11d
jne 0x1800580de
cmp r11d, 0x40
jae 0x1800580de
mov qword [rsp + rax*8 + 0x38], rdx
mov r11d, dword [rsp + 0x30]
inc r11d
mov dword [rsp + 0x30], r11d
test r9b, 2
je 0x18005812a
mov ecx, edi
mov rax, rdi
test r8d, r8d
je 0x180058104
nop
cmp qword [rsp + rax*8 + 0x458], rdx
je 0x180058104
inc ecx
inc rax
cmp ecx, r8d
jb 0x1800580f0
cmp ecx, r8d
jne 0x18005812a
cmp r8d, 0x40
jae 0x18005812a
mov qword [rsp + rax*8 + 0x458], rdx
mov r8d, dword [rsp + 0x450]
inc r8d
mov dword [rsp + 0x450], r8d
add rbp, 0x10
sub rsi, 1
jne 0x180058020
test r10d, r10d
jne 0x180058193
test r11d, r11d
jne 0x180058193
test r8d, r8d
jne 0x180058193
test r13d, r13d
je 0x18005816a
test r13d, r13d
jns 0x180058161
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or edi, 0xffffffff
jmp 0x18005816a
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
mov r12, qword [rsp + 0x668]
mov rbx, qword [rsp + 0x6a8]
mov r15, qword [rsp + 0x660]
add rsp, 0x670
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
lea rbp, [rsp + 0x6b8]
test r13d, r13d
cmovs rbp, rdi
test r13d, r13d
jle 0x1800581da
mov eax, 0x10624dd3
imul r14d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r14d
mov dword [rsp + 0x6b8], edx
imul edx, edx, 0x3e8
sub eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x6bc], eax
jmp 0x1800581ed
test r13d, r13d
jne 0x1800581ed
mov dword [rsp + 0x6b8], edi
mov dword [rsp + 0x6bc], 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, [r12 + 1]
cmove rdx, rdi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp eax, 0xffffffff
jne 0x18005829b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x180058247
cmp dword [0x1800c6d08], edi
jne 0x18005829b
cmp eax, 0x2714
jne 0x18005829b
test r13d, r13d
jg 0x180058266
mov r10d, dword [rsp + 0x240]
mov r11d, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x450]
jmp 0x1800581a2
call fcn.1800636f0
mov rdx, rbx
mov rcx, rax
call fcn.180063730
mov r14d, r13d
sub r14d, eax
test r14d, r14d
jle 0x1800582ab
mov r10d, dword [rsp + 0x240]
mov r11d, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x450]
jmp 0x1800581a2
test esi, esi
jns 0x1800582a7
or eax, 0xffffffff
jmp 0x18005816c
test esi, esi
jne 0x1800582b2
xor eax, eax
jmp 0x18005816c
mov rbx, qword [rsp + 0x6a0]
mov esi, edi
add rbx, 0xa
mov rcx, qword [rbx - 0xa]
mov word [rbx], di
cmp rcx, 0xffffffffffffffff
je 0x180058318
lea rdx, [rsp + 0x240]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800582e2
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1800582f8
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x450]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180058311
or word [rbx], 2
cmp word [rbx], di
je 0x180058318
inc esi
add rbx, 0x10
sub r15, 1
jne 0x1800582c0
mov eax, esi
jmp 0x18005816c
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
add rsp, 0x670
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret