Function at 0x6cb133c0
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x14c
mov eax, dword [esp + 0x160]
mov edi, dword [esp + 0x164]
mov esi, dword [esp + 0x168]
test eax, eax
js 0x6cb13658
mov eax, dword [esp + 0x160]
mov edx, 0x10624dd3
mov ecx, esi
mov dword [esp + 0x3c], 1
mov dword [esp + 0x40], eax
mov eax, esi
mul edx
shr edx, 6
imul eax, edx, 0x3e8
mov ebx, edx
lea edx, [esp + 0x34]
mov dword [esp + 0x2c], ebx
sub ecx, eax
imul eax, ecx, 0x3e8
test esi, esi
mov dword [esp + 0x28], eax
mov eax, 0
cmovne eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x160]
lea ebp, [eax + 1]
test esi, esi
je 0x6cb13450
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], eax
cmp edi, 1
je 0x6cb13480
cmp edi, 2
je 0x6cb13568
test edi, edi
je 0x6cb13530
mov ebp, 0xffffffff
add esp, 0x14c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
mov ebx, eax
test ebx, ebx
jns 0x6cb13610
mov ecx, dword [sym.imp.msvcrt.dll__errno]
mov dword [esp + 0x24], ecx
call ecx
mov eax, dword [eax]
cmp eax, 4
je 0x6cb135d0
mov ecx, dword [esp + 0x24]
mov ebp, ebx
cmp eax, 0xb
je 0x6cb13588
cmp dword [0x6cb2203c], 1
jle 0x6cb13466
call ecx
mov ebp, 0xffffffff
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp], 2
mov ebx, eax
call dword [0x6cb1802c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.socket_check_fd
mov dword [esp + 4], str._s:_select_failed:__s_n
mov dword [esp], eax
call sym._fprintf
add esp, 0x14c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
mov ebx, eax
jmp 0x6cb134ae
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], eax
jmp 0x6cb13498
cmp dword [0x6cb2203c], 1
jle 0x6cb1346b
mov dword [esp], 2
call dword [0x6cb1802c]
mov dword [esp + 8], str.socket_check_fd
mov dword [esp + 4], str._s:_EAGAIN_n
mov dword [esp], eax
call sym._fprintf
add esp, 0x14c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [0x6cb2203c], 1
jle 0x6cb1343c
mov dword [esp], 2
call dword [0x6cb1802c]
mov dword [esp + 8], str.socket_check_fd
mov dword [esp + 4], str._s:_EINTR_n
mov dword [esp], eax
call sym._fprintf
jmp 0x6cb13432
mov ebp, ebx
jne 0x6cb1346b
cmp dword [0x6cb2203c], 1
mov ebp, 0xffffff76
jle 0x6cb1346b
mov dword [esp], 2
call dword [0x6cb1802c]
mov dword [esp + 8], str.socket_check_fd
mov dword [esp + 4], str._s:_timeout_n
mov dword [esp], eax
call sym._fprintf
jmp 0x6cb1346b
cmp dword [0x6cb2203c], 1
jle 0x6cb13466
mov dword [esp], 2
mov ebp, 0xffffffff
call dword [0x6cb1802c]
mov ebx, dword [esp + 0x160]
mov dword [esp + 4], str.ERROR:_invalid_fd_in_check_fd__d_n
mov dword [esp], eax
mov dword [esp + 8], ebx
call sym._fprintf
jmp 0x6cb1346b