Function at 0x488680
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x6068
call fcn.00499f40
sub esp, eax
mov eax, dword [esp + eax]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
movzx edi, byte [eax + 0xc4]
mov ebx, eax
mov eax, edi
test al, al
jne 0x4888e0
mov eax, dword [ebx + 0xdc]
mov esi, edx
mov dword [esp + 0x54], 0
mov dword [esp + 0x2058], 0
mov dword [esp + 0x405c], 0
mov dword [esp + 0x3c], 0xffffffff
test ah, 0x20
jne 0x488950
test al, 4
jne 0x488900
movzx edi, byte [ebx + 0xc4]
mov eax, edi
test al, al
je 0x488970
mov dword [esp + 4], str.Could_not_obtain_daemon_fdsets
mov dword [esp], ebx
mov edi, 1
call fcn.0048aef0
mov dword [esp + 0x2c], 1
mov eax, dword [ebx + 0xbc]
cmp eax, 0xffffffff
je 0x488757
lea edx, [esp + 0x3c]
lea ebp, [esp + 0x54]
mov dword [esp + 0xc], 0x800
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ebp
call fcn.0048ca50
test eax, eax
je 0x4889b0
xor esi, 1
mov edx, dword [ebx + 0xb4]
mov ecx, esi
and ecx, 1
or ecx, edi
cmp edx, 0xffffffff
je 0x4887b2
cmp dword [ebx + 0xbc], 0xffffffff
je 0x4887b2
mov eax, dword [ebx + 0xd0]
cmp dword [ebx + 0xcc], eax
je 0x48878c
cmp byte [ebx + 0xc6], 0
je 0x4887b2
mov esi, dword [esp + 0x54]
test esi, esi
je 0x4887b2
xor eax, eax
cmp dword [esp + 0x58], edx
jne 0x4887ab
jmp 0x488ad3
cmp dword [esp + eax*4 + 0x58], edx
je 0x488ad3
add eax, 1
cmp eax, esi
jne 0x4887a1
test cl, cl
je 0x488a60
lea esi, [esp + 0x4c]
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov ecx, dword [esp + 0x54]
test ecx, ecx
jne 0x488864
mov edx, dword [esp + 0x2058]
test edx, edx
jne 0x488864
mov eax, dword [esp + 0x405c]
test eax, eax
jne 0x488864
test esi, esi
je 0x48881c
imul ecx, dword [esi], 0x3e8
mov esi, dword [esi + 4]
mov edx, 0x10624dd3
mov eax, esi
sar esi, 0x1f
imul edx
sar edx, 6
sub edx, esi
add edx, ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
movzx eax, byte [ebx + 0xc4]
test al, al
jne 0x4888e0
lea ecx, [esp + 0x2058]
lea ebp, [esp + 0x54]
lea edx, [esp + 0x405c]
mov dword [esp], edx
mov eax, ebx
mov edx, ebp
call fcn.00486270
cmp eax, 1
jne 0x4888e0
mov eax, dword [esp + 0x2c]
add esp, 0x606c
pop ebx
pop esi
xor eax, 1
pop edi
pop ebp
ret
lea ecx, [esp + 0x2058]
lea edx, [esp + 0x405c]
lea ebp, [esp + 0x54]
mov dword [esp + 0x10], esi
mov dword [esp], 0
mov dword [esp + 8], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x28], edx
mov dword [esp + 4], ebp
call dword [sym.imp.WS2_32.dll_select]
movzx esi, byte [ebx + 0xc4]
sub esp, 0x14
mov ecx, esi
test cl, cl
jne 0x4888e0
test eax, eax
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
jns 0x48883d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x488852
mov dword [esp], eax
call fcn.0048be10
mov dword [esp + 4], str.select_failed:__s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.0048aef0
xor eax, eax
add esp, 0x606c
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [ebx + 0xdc], 4
je 0x488b30
lea esi, [esi]
mov eax, dword [ebx + 0xb4]
cmp eax, 0xffffffff
je 0x488940
movzx edx, byte [ebx + 0xc5]
test dl, dl
jne 0x488940
lea edx, [esp + 0x3c]
lea ebp, [esp + 0x54]
mov dword [esp + 0xc], 0x800
mov dword [esp], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ebp
call fcn.0048ca50
test eax, eax
je 0x488b40
nop
mov dword [esp + 0x2c], 0
jmp 0x488724
mov eax, ebx
call fcn.00484c70
cmp eax, 1
je 0x4888f0
mov eax, dword [ebx + 0xdc]
jmp 0x4886ee
lea eax, [esp + 0x3c]
lea edx, [esp + 0x405c]
lea ebp, [esp + 0x54]
lea ecx, [esp + 0x2058]
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, ebx
mov edx, ebp
call fcn.00484f30
test eax, eax
je 0x488707
jmp 0x488940
mov edx, dword [ebx + 0xb4]
cmp edx, 0xffffffff
je 0x488b60
movzx eax, byte [ebx + 0xc5]
test al, al
jne 0x488b20
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x4889f4
xor eax, eax
cmp dword [esp + 0x58], edx
jne 0x4889ed
jmp 0x488b70
cmp dword [ebp + eax*4 + 4], edx
je 0x488b70
add eax, 1
cmp ecx, eax
jne 0x4889e3
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], 0x800
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov eax, dword [ebx + 0xbc]
mov dword [esp], eax
call fcn.0048ca50
test eax, eax
jne 0x488757
mov dword [esp + 4], str.Could_not_add_control_inter_thread_communication_channel_FD_to_fdset
mov dword [esp], ebx
call fcn.0048aef0
mov edx, dword [ebx + 0xb4]
cmp edx, 0xffffffff
je 0x488bd9
cmp dword [ebx + 0xbc], 0xffffffff
mov ecx, 1
mov dword [esp + 0x2c], 1
jne 0x488775
jmp 0x4887ba
xor esi, esi
test byte [ebx + 0xdc], 4
jne 0x4887ce
lea eax, [esp + 0x40]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym.xmrig_notls.exe_MHD_get_timeout
cmp eax, 1
jne 0x4887ce
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov dword [esp + 8], 0x3e8
mov dword [esp + 0xc], 0
mov dword [esp], edi
mov dword [esp + 4], esi
call fcn.0049a360
imul eax, eax, 0x3e8
cmp esi, 0x1f3
mov dword [esp + 0x50], eax
jbe 0x488bb0
mov dword [esp + 0x4c], 0x7fffffff
lea esi, [esp + 0x4c]
jmp 0x4887ce
lea edi, [esi - 1]
cmp edi, eax
jbe 0x488b0f
sub esi, eax
lea edx, [eax*4]
lea ebp, [esp + 0x54]
lea eax, [esi*4 - 4]
mov byte [esp + 0x24], cl
mov dword [esp + 8], eax
lea eax, [ebp + edx + 8]
mov dword [esp + 4], eax
lea eax, [ebp + edx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
movzx ecx, byte [esp + 0x24]
mov dword [esp + 0x54], edi
jmp 0x4887b2
xor esi, 1
mov ecx, esi
and ecx, 1
or ecx, edi
jmp 0x48876c
xor esi, esi
jmp 0x4886f6
mov dword [esp + 4], str.Could_not_add_listen_socket_to_fdset
mov dword [esp], ebx
mov dword [esp + 0x24], eax
call fcn.0048aef0
mov eax, dword [esp + 0x24]
jmp 0x4888e2
xor esi, 1
mov ecx, esi
and ecx, 1
or ecx, edi
jmp 0x4887b2
lea edx, [ecx - 1]
cmp eax, edx
mov dword [esp + 0x24], edx
jae 0x488ba3
sub ecx, eax
lea edx, [eax*4]
lea eax, [ecx*4 - 4]
mov dword [esp + 8], eax
lea eax, [ebp + edx + 8]
mov dword [esp + 4], eax
lea eax, [ebp + edx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [esp + 0x24]
mov dword [esp + 0x54], eax
jmp 0x4889f4
mov dword [esp + 4], esi
mov dword [esp + 8], 0x3e8
lea esi, [esp + 0x4c]
mov dword [esp + 0xc], 0
mov dword [esp], edi
call fcn.0049a250
mov dword [esp + 0x4c], eax
jmp 0x4887ce
mov dword [esp + 0x2c], 1
jmp 0x4887ba