Function at 0x402ec0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
lea edx, [ebp - 0x18]
push edi
mov edi, 0x403193
push esi
push ebx
sub esp, 0xfc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x88], edi
mov dword [ebp - 0xcc], eax
mov eax, 0x419bf0
mov dword [ebp - 0x94], eax
mov eax, 0x42786c
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0xac]
mov dword [esp], eax
mov dword [ebp - 0x84], esp
call fcn.0041e460
mov ecx, dword [ebp - 0xcc]
mov eax, dword [ecx + 0x44]
mov dword [ecx + 0x40], 1
mov eax, dword [eax + 8]
mov dword [ebp - 0xd0], eax
cmp byte [0x42c018], 0
jne 0x403124
mov edx, dword [ebp - 0xcc]
mov esi, 0xffffffff
mov eax, dword [edx + 0x44]
mov dword [ebp - 0xa8], esi
mov dword [esp], eax
call sub.cygX11_6.dll_XPending
test eax, eax
jne 0x4030e7
xor ebx, ebx
lea edx, [ebp - 0xb8]
mov eax, 7
lea esi, [esi]
mov byte [edx], 0
inc edx
dec eax
jns 0x402f70
mov ecx, dword [ebp - 0xd0]
mov eax, 1
mov edx, dword [ebp - 0xd0]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [ebp - 0xcc]
shr edx, 5
or dword [ebp + edx*4 - 0xb8], eax
mov eax, dword [ecx + 0x58]
cmp eax, dword [ecx + 0x5c]
jne 0x40313d
mov dword [esp + 0x10], ebx
xor eax, eax
xor edx, edx
mov dword [esp + 8], eax
lea eax, [ebp - 0xb8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0xc], edx
inc eax
mov dword [esp], eax
mov eax, 0xffffffff
mov dword [ebp - 0xa8], eax
call sub.cygwin1.dll_select
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0xc0]
mov dword [esp], eax
call sub.cygwin1.dll_gettimeofday
mov eax, dword [ebp - 0xcc]
mov edx, dword [ebp - 0xcc]
add eax, 0x58
mov dword [ebp - 0xd8], eax
mov ecx, dword [ebp - 0xd8]
mov eax, dword [edx + 0x58]
cmp eax, dword [ecx + 4]
je 0x403114
mov eax, dword [eax]
mov dword [ebp - 0xdc], eax
mov edx, dword [ebp - 0xdc]
lea eax, [ebp - 0xc0]
mov dword [esp + 4], eax
mov eax, 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0xa8], eax
call fcn.0040aa00
test al, al
je 0x403114
mov eax, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xd8]
mov ebx, dword [eax + 0x58]
mov dword [ebp - 0xe0], ecx
mov eax, dword [eax + 0x5c]
mov edx, dword [ebx]
mov esi, dword [eax - 4]
lea ecx, [eax - 4]
sub ecx, ebx
mov dword [eax - 4], edx
xor eax, eax
sar ecx, 2
mov dword [esp + 4], eax
mov eax, 2
mov byte [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ecx
mov dword [esp], ebx
mov dword [ebp - 0xa8], eax
call fcn.004268c0
mov ecx, dword [ebp - 0xe0]
mov eax, dword [ebp - 0xdc]
sub dword [ecx + 4], 4
mov ecx, 0xffffffff
mov dword [ebp - 0xa8], ecx
mov dword [esp], eax
call fcn.0040a9b0
mov edx, dword [ebp - 0xdc]
mov dword [esp], edx
call fcn.0040a9a0
mov ecx, dword [ebp - 0xdc]
cmp byte [ecx + 0xd], 0
je 0x402ff1
mov dword [esp], ecx
call fcn.0040a950
jmp 0x402ff1
mov edx, dword [ebp - 0xcc]
lea ecx, [ebp - 0x78]
mov dword [esp + 4], ecx
mov eax, dword [edx + 0x44]
mov dword [esp], eax
call sub.cygX11_6.dll_XNextEvent
mov ecx, dword [ebp - 0xcc]
lea edx, [ebp - 0x78]
mov eax, dword [ecx]
mov dword [esp + 4], edx
mov dword [esp], ecx
call dword [eax + 8]
mov eax, dword [ebp - 0xcc]
cmp dword [eax + 0x40], 1
je 0x402f2c
lea eax, [ebp - 0xac]
mov dword [esp], eax
call fcn.0041e500
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [eax]
mov ecx, 0xffffffff
xor ebx, ebx
mov dword [esp + 4], ebx
lea ebx, [ebp - 0xc8]
mov dword [ebp - 0xd4], eax
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xa8], ecx
mov dword [esp], eax
call sub.cygwin1.dll_gettimeofday
mov ecx, dword [ebp - 0xd4]
lea edx, [ebp - 0xc0]
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.0040aa50
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xc4], edx
jmp 0x402fa9