Function at 0x180047054
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
lea r15, [rcx + 0x30]
mov rbx, rcx
mov rcx, r15
mov qword [rsp + 0x30], r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [rbx + 0x198], 0
jne 0x1800473b8
mov eax, 3
lea rsi, [rbx + 0x148]
mov rcx, rsi
mov qword [rsp + 0xa8], rax
mov r8d, eax
lea r14d, [rax - 2]
mov rax, qword [rcx]
lea rcx, [rcx + 0x18]
and dword [rax], 0
or qword [rcx - 8], 0xffffffffffffffff
sub r8, r14
jne 0x1800470ad
mov r8, qword [rsi]
xor ecx, ecx
mov rdi, qword [rbx + 0x58]
mov edx, dword [r8]
test edx, edx
je 0x1800470df
cmp qword [r8 + rcx*8 + 8], rdi
je 0x1800470f9
add ecx, r14d
cmp ecx, edx
jb 0x1800470d1
inc edx
mov rcx, rsi
call fcn.180046610
mov rcx, qword [rsi]
mov eax, dword [rcx]
mov qword [rcx + rax*8 + 8], rdi
mov rax, qword [rsi]
add dword [rax], r14d
mov rdi, qword [rbx + 0x190]
xor ebp, ebp
jmp 0x180047119
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x18004719a
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x180047104
mov r12, rsi
lea r15, [rbx + 0x158]
mov rsi, qword [rsp + 0xa0]
lea r14, [rbx + 0x78]
lea r13, [rbx + 0x68]
mov eax, 1
test dil, dil
jne 0x180047148
cmp qword [r14], 0
je 0x18004714b
mov dil, al
mov r8, rsi
mov rdx, r13
mov rcx, r12
call fcn.180048e7c
cmp qword [r15], rbp
mov eax, 1
cmova rbp, qword [r15]
add r13, 0x38
add r12, 0x18
add r14, 0x38
add r15, 0x18
sub qword [rsp + 0xa8], rax
jne 0x18004713d
lea rsi, [rbx + 0x148]
test dil, dil
jne 0x1800471a2
cmp qword [rbx + 0x120], 0
jne 0x1800471a2
xor dil, dil
jmp 0x1800471a5
mov dil, r14b
jmp 0x18004711e
mov dil, al
mov r12, qword [rsp + 0xa0]
lea r15, [rbx + 0x110]
mov r8, r12
lea rcx, [rbx + 0x160]
mov rdx, r15
call fcn.180048e7c
mov rax, qword [rbx + 0x170]
lea r14, [rbx + 0x178]
cmp rax, rbp
mov r8, r12
mov rdx, r15
mov rcx, r14
cmova rbp, rax
call fcn.180048e7c
mov r13, qword [rbx + 0x188]
mov eax, dword [rsp + 0x98]
cmp r13, rbp
cmovbe r13, rbp
xor ebp, ebp
test eax, eax
jne 0x18004720d
test dil, dil
je 0x1800473b3
mov qword [rsp + 0x90], rbp
test eax, eax
je 0x180047230
lea r8, [rsp + 0x90]
mov edx, eax
mov rcx, rbx
call fcn.1800358f8
mov rdi, rax
jmp 0x180047238
lea rdi, [rsp + 0x90]
lea r15, [rbx + 0x30]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, qword [rsi]
mov r9, qword [r14]
mov r8, qword [rbx + 0x160]
test rdx, rdx
jne 0x180047296
test r8, r8
jne 0x180047296
test r9, r9
jne 0x180047296
test rdi, rdi
je 0x1800472b2
lea ecx, [r9 + 1]
mov eax, 0x10624dd3
imul dword [rdi + 4]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, dword [rdi], 0x3e8
add edx, eax
cmove edx, ecx
mov ecx, edx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edi, ebp
jmp 0x180047326
test rdi, rdi
je 0x1800472b2
cmp dword [rdi], ebp
jne 0x1800472b2
mov eax, dword [rdi + 4]
dec eax
cmp eax, 0x3e6
ja 0x1800472b2
mov dword [rdi + 4], 0x3e8
lea ecx, [r13 + 1]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
test eax, eax
jns 0x1800472d4
call fcn.1800030bc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x180047326
test edi, edi
jle 0x180047326
mov rdx, qword [rsi]
mov rcx, qword [rbx + 0x58]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180047326
lea rcx, [rbx + 0x58]
call fcn.180046f20
test al, al
jne 0x180047324
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rbx + 0x28]
mov eax, 1
mov bpl, al
mov byte [rbx + 0x198], al
lock add dword [rcx + 0x30], eax
lea rdx, [rbx + 0x1a8]
call fcn.180040380
dec edi
jmp 0x180047334
dec edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebp, 1
test edi, edi
jle 0x18004738e
lea rdi, [rbx + 0x110]
mov r8, r12
mov rdx, rdi
mov rcx, r14
call fcn.18003fcbc
mov r8, r12
lea rcx, [rbx + 0x160]
mov rdx, rdi
call fcn.18003fcbc
mov edi, 2
lea rsi, [rbx + 0xd8]
lea r15d, [rdi - 1]
mov r8, r12
mov rdx, rsi
mov rcx, r14
call fcn.18003fcbc
sub rsi, 0x38
sub r14, 0x18
sub edi, r15d
jns 0x18004736f
lea r15, [rbx + 0x30]
mov rbx, qword [rbx + 0x190]
jmp 0x1800473a7
mov rax, qword [rbx]
mov rdx, r12
mov rcx, rbx
call qword [rax + 0x20]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x180047397
test bpl, bpl
je 0x1800473c1
jmp 0x1800473b8
mov r15, qword [rsp + 0x30]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret