Function at 0x46ce00
Capabilities:
Get socket status

Disassembly:
push r13
push r12
mov eax, 0xc098
push rbp
push rdi
push rsi
push rbx
call fcn.0047f1f0
sub rsp, rax
movzx eax, byte [rcx + 0x170]
mov rbx, rcx
mov edi, edx
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 0
test al, al
jne 0x46cfd0
mov eax, dword [rcx + 0x18c]
mov dword [rsp + 0x60], 0
mov dword [rsp + 0x4070], 0
mov dword [rsp + 0x8080], 0
mov qword [rsp + 0x50], 0xffffffffffffffff
test ah, 0x20
jne 0x46d191
test al, 4
je 0x46cff1
mov rcx, qword [rbx + 0x150]
cmp rcx, 0xffffffffffffffff
je 0x46ce93
movzx eax, byte [rbx + 0x171]
test al, al
je 0x46d224
xor esi, esi
mov rcx, qword [rbx + 0x160]
cmp rcx, 0xffffffffffffffff
jne 0x46d025
mov r8, qword [rbx + 0x150]
cmp r8, 0xffffffffffffffff
je 0x46cf05
cmp qword [rbx + 0x160], 0xffffffffffffffff
je 0x46cf05
mov eax, dword [rbx + 0x17c]
cmp dword [rbx + 0x178], eax
je 0x46ced4
cmp byte [rbx + 0x172], 0
je 0x46cf05
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x46cf05
xor ecx, ecx
cmp qword [rsp + 0x68], r8
lea rdx, [rsp + 0x70]
jne 0x46cefe
jmp 0x46d267
add rdx, 8
cmp qword [rdx - 8], r8
je 0x46d270
add ecx, 1
cmp ecx, eax
jne 0x46cef0
cmp esi, 1
je 0x46d0f0
test edi, edi
je 0x46d260
test byte [rbx + 0x18c], 4
je 0x46d1b2
xor eax, eax
mov r8d, dword [rsp + 0x60]
test r8d, r8d
jne 0x46d120
mov ecx, dword [rsp + 0x4070]
test ecx, ecx
jne 0x46d120
mov edx, dword [rsp + 0x8080]
test edx, edx
jne 0x46d120
test rax, rax
je 0x46cf7b
mov ecx, dword [rax + 4]
mov edx, 0x10624dd3
imul r8d, dword [rax], 0x3e8
mov eax, ecx
sar ecx, 0x1f
imul edx
sar edx, 6
sub edx, ecx
lea ecx, [r8 + rdx]
call qword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, byte [rbx + 0x170]
test al, al
jne 0x46cfd0
lea r12, [rsp + 0x8080]
lea rdi, [rsp + 0x4070]
lea rbp, [rsp + 0x60]
jmp 0x46d162
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x46d17c
mov ecx, eax
call fcn.00470690
lea rdx, str.select_failed:__s_n
mov r8, rax
mov rcx, rbx
call fcn.0046f900
nop word [rax + rax]
xor eax, eax
add rsp, 0xc098
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
test byte [rbx + 0x18c], 4
jne 0x46ce77
xor edi, edi
movzx eax, byte [rbx + 0x170]
test al, al
je 0x46d2b0
lea rdx, str.Could_not_obtain_daemon_fdsets
mov rcx, rbx
mov esi, 1
call fcn.0046f900
mov rcx, qword [rbx + 0x160]
cmp rcx, 0xffffffffffffffff
je 0x46cea6
lea r12, [rsp + 0x50]
lea rbp, [rsp + 0x60]
mov r9d, 0x800
mov r8, r12
mov rdx, rbp
call fcn.004712c0
test eax, eax
jne 0x46cea6
mov r8, qword [rbx + 0x150]
cmp r8, 0xffffffffffffffff
je 0x46cf05
movzx eax, byte [rbx + 0x171]
test al, al
jne 0x46ceb3
mov ecx, dword [rsp + 0x60]
test ecx, ecx
je 0x46d097
xor eax, eax
cmp r8, qword [rsp + 0x68]
lea rdx, [rbp + 0x10]
jne 0x46d090
jmp 0x46d2f1
add rdx, 8
cmp r8, qword [rdx - 8]
je 0x46d2f3
add eax, 1
cmp eax, ecx
jne 0x46d082
mov rcx, qword [rbx + 0x160]
mov r9d, 0x800
mov r8, r12
mov rdx, rbp
call fcn.004712c0
test eax, eax
jne 0x46cea6
lea rdx, str.Could_not_add_control_inter_thread_communication_channel_FD_to_fdset
mov rcx, rbx
call fcn.0046f900
mov r8, qword [rbx + 0x150]
cmp r8, 0xffffffffffffffff
je 0x46d0f0
cmp qword [rbx + 0x160], 0xffffffffffffffff
mov esi, 1
jne 0x46cebd
nop word cs:[rax + rax]
mov esi, 1
mov r8d, dword [rsp + 0x60]
mov dword [rsp + 0x44], 0
lea rax, [rsp + 0x40]
mov dword [rsp + 0x40], 0
test r8d, r8d
je 0x46cf33
nop dword [rax + rax]
lea r12, [rsp + 0x8080]
lea rdi, [rsp + 0x4070]
lea rbp, [rsp + 0x60]
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov r9, r12
mov r8, rdi
call qword [sym.imp.WS2_32.dll_select]
movzx edx, byte [rbx + 0x170]
test dl, dl
jne 0x46cfd0
test eax, eax
js 0x46cfa0
mov r9, r12
mov r8, rdi
mov rdx, rbp
mov rcx, rbx
call fcn.0046b7b0
cmp eax, 1
jne 0x46cfd0
mov eax, esi
xor eax, 1
add rsp, 0xc098
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
call fcn.00469980
cmp eax, 1
je 0x46cfe2
mov eax, dword [rbx + 0x18c]
test al, 4
jne 0x46ce77
jmp 0x46cff1
lea rdx, [rsp + 0x58]
mov rcx, rbx
call sym.xmrig.exe_MHD_get_timeout
cmp eax, 1
jne 0x46cf23
mov rcx, qword [rsp + 0x58]
movabs r8, 0x20c49ba5e353f7cf
mov rdx, rcx
mov rdi, rcx
shr rdx, 3
mov rax, rdx
mul r8
shr rdx, 4
imul rax, rdx, 0x3e8
sub rdi, rax
imul eax, edi, 0x3e8
mov dword [rsp + 0x44], eax
movabs rax, 0x1f3ffffffff
cmp rcx, rax
jbe 0x46d327
mov dword [rsp + 0x40], 0x7fffffff
lea rax, [rsp + 0x40]
jmp 0x46cf25
lea rbp, [rsp + 0x60]
lea r8, [rsp + 0x50]
mov r9d, 0x800
mov rdx, rbp
call fcn.004712c0
test eax, eax
jne 0x46ce93
lea rdx, str.Could_not_add_listen_socket_to_fdset
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call fcn.0046f900
mov eax, dword [rsp + 0x3c]
jmp 0x46cfd2
xor esi, esi
jmp 0x46d0f5
xor ecx, ecx
nop dword [rax]
lea r12d, [rax - 1]
cmp r12d, ecx
jbe 0x46d29d
lea rbp, [rsp + 0x60]
lea edx, [rcx + 1]
sub eax, 2
sub eax, ecx
lea rdx, [rbp + rdx*8 + 8]
lea rcx, [rbp + rcx*8 + 8]
lea r8, [rax*8 + 8]
call sub.msvcrt.dll_memmove
mov dword [rsp + 0x60], r12d
jmp 0x46cf05
lea rax, [rsp + 0x50]
lea rbp, [rsp + 0x60]
lea r9, [rsp + 0x8080]
lea r8, [rsp + 0x4070]
mov dword [rsp + 0x28], 0x800
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov rdx, rbp
call fcn.0046a300
test eax, eax
je 0x46d000
xor esi, esi
jmp 0x46ce95
xor eax, eax
lea r13d, [rcx - 1]
cmp eax, r13d
jae 0x46d31d
lea r8d, [rcx - 2]
lea edx, [rax + 1]
lea rcx, [rbp + rax*8 + 8]
sub r8d, eax
lea rdx, [rbp + rdx*8 + 8]
lea r8, [r8*8 + 8]
call sub.msvcrt.dll_memmove
mov dword [rsp + 0x60], r13d
jmp 0x46d097
mov dword [rsp + 0x40], edx
lea rax, [rsp + 0x40]
jmp 0x46cf25