Function at 0x140052d30
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 0x140052d65
mov r8d, edi
test edx, edx
je 0x140052d65
mov rax, rcx
cmp qword [rax], 0xffffffffffffffff
jne 0x140052d93
inc r8d
add rax, 0x10
cmp r8d, edx
jb 0x140052d53
test rsi, rsi
je 0x1400530b2
test rsi, rsi
jns 0x140053099
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 0x140052eea
movzx r9d, word [rbx + 8]
test r9b, 7
je 0x140052eea
cmp rax, rbp
cmova rbp, rax
test r9b, 1
je 0x140052e5a
mov edx, edi
mov rcx, rdi
test r10d, r10d
je 0x140052e34
nop word [rax + rax]
cmp qword [rsp + rcx*8 + 0x248], rax
je 0x140052e34
inc edx
inc rcx
cmp edx, r10d
jb 0x140052e20
cmp edx, r10d
jne 0x140052e5a
cmp r10d, 0x40
jae 0x140052e5a
mov qword [rsp + rcx*8 + 0x248], rax
mov r10d, dword [rsp + 0x240]
inc r10d
mov dword [rsp + 0x240], r10d
test r9b, 4
je 0x140052e9e
mov edx, edi
mov rcx, rdi
test r11d, r11d
je 0x140052e81
nop word [rax + rax]
cmp qword [rsp + rcx*8 + 0x38], rax
je 0x140052e81
inc edx
inc rcx
cmp edx, r11d
jb 0x140052e70
cmp edx, r11d
jne 0x140052e9e
cmp r11d, 0x40
jae 0x140052e9e
mov qword [rsp + rcx*8 + 0x38], rax
mov r11d, dword [rsp + 0x30]
inc r11d
mov dword [rsp + 0x30], r11d
test r9b, 2
je 0x140052eea
mov edx, edi
mov rcx, rdi
test r8d, r8d
je 0x140052ec4
nop
cmp qword [rsp + rcx*8 + 0x458], rax
je 0x140052ec4
inc edx
inc rcx
cmp edx, r8d
jb 0x140052eb0
cmp edx, r8d
jne 0x140052eea
cmp r8d, 0x40
jae 0x140052eea
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 0x140052de0
mov r13, qword [rsp + 0x660]
test r10d, r10d
jne 0x140052f53
test r11d, r11d
jne 0x140052f53
test r8d, r8d
jne 0x140052f53
test rsi, rsi
jne 0x140052f1b
mov eax, edi
jmp 0x140052ffb
test rsi, rsi
jns 0x140052f33
mov ecx, 0x2726
call qword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x140052ffb
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 0x140052ffb
lea rbx, [rsp + 0x690]
test rsi, rsi
jns 0x140052f65
mov rbx, rdi
jmp 0x140052fc3
test rsi, rsi
jle 0x140052fb5
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 0x140052fc3
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 0x140053026
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 0x14005300a
mov esi, edi
lea rbx, [r14 + 0xa]
mov rcx, qword [rbx - 0xa]
mov word [rbx], di
cmp rcx, 0xffffffffffffffff
je 0x140053088
lea rdx, [rsp + 0x240]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140053052
or word [rbx], 1
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x30]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140053068
or word [rbx], 4
mov rcx, qword [rbx - 0xa]
lea rdx, [rsp + 0x450]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140053081
or word [rbx], 2
cmp word [rbx], di
je 0x140053088
inc esi
add rbx, 0x10
sub r12, 1
jne 0x140053030
mov eax, esi
jmp 0x14005300a
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