Function at 0x4019a0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
test byte [ebp + 0xc], 2
mov dword [ebp - 0x2c], 0
jne 0x4019c2
xor eax, eax
test byte [ebp + 0xc], 1
je 0x401c99
mov eax, dword [ebp + 8]
cmp dword [eax], 0xffffffff
je 0x401ca1
test byte [ebp + 0xc], 2
jne 0x401bea
xor esi, esi
test byte [ebp + 0xc], 4
je 0x4019f1
mov dword [ebp - 0x1c], 0
lea esi, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x34], 0
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x46018]
mov eax, dword [ebx]
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 4]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebx + 8]
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0x28], eax
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x2c], eax
lea eax, [ebx + 0x28]
mov edx, dword [ebp + 8]
mov dword [esp + 0xc], eax
lea eax, [ebx + 0x20]
mov dword [esp + 8], eax
lea eax, [ebx + 0x18]
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
mov eax, dword [edx]
inc eax
mov dword [esp], eax
call sub.cygwin1.dll_select
test eax, eax
jle 0x401b10
mov ecx, dword [ebp + 8]
xor edi, edi
mov edx, dword [ecx]
cmp edx, 0
jl 0x401b10
mov esi, ecx
jmp 0x401a73
inc edi
add esi, 0x14
cmp edx, edi
jl 0x401b10
mov dword [ebp - 0x38], 0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x401a67
test al, 1
je 0x401aa0
mov eax, edi
mov ecx, edi
shr eax, 5
mov eax, dword [ebx + eax*4 + 0x18]
and ecx, 0x1f
sar eax, cl
test al, 1
je 0x401aa0
mov dword [ebp - 0x38], 1
mov edx, dword [esi + 0x10]
test dl, 2
je 0x401ac0
mov eax, edi
mov ecx, edi
shr eax, 5
mov eax, dword [ebx + eax*4 + 0x20]
and ecx, 0x1f
sar eax, cl
test al, 1
je 0x401ac0
or dword [ebp - 0x38], 2
test dl, 4
je 0x401ae0
mov eax, edi
mov ecx, edi
shr eax, 5
mov eax, dword [ebx + eax*4 + 0x28]
and ecx, 0x1f
sar eax, cl
test al, 1
je 0x401ae0
or dword [ebp - 0x38], 4
lea esi, [esi]
mov eax, dword [ebp - 0x34]
add esi, 0x14
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x38]
mov dword [edx + eax*8 + 0x32010], edi
inc edi
mov dword [edx + eax*8 + 0x32014], ecx
mov edx, dword [edx]
inc eax
mov dword [ebp - 0x34], eax
cmp edx, edi
jge 0x401a73
lea esi, [esi]
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x34]
cmp dword [ebp - 0x30], edx
jmp 0x401b8c
and edx, edi
test dl, 2
je 0x401b50
mov eax, dword [esi + 4]
cmp dword [esi + 8], eax
je 0x401b50
mov dword [esp + 0xc], edi
mov ecx, dword [ebp - 0x3c]
mov eax, dword [esi + 0x10]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [esi + 8]
lea esi, [esi]
mov eax, dword [esi]
and eax, edi
test al, 4
je 0x401b80
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
je 0x401b80
cmp eax, dword [esi + 4]
je 0x401b80
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x3c]
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], ecx
call dword [esi + 0xc]
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x30], eax
jge 0x401cb0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 8]
mov ecx, dword [eax + ecx*8 + 0x32010]
lea eax, [ecx + ecx*4]
lea ebx, [edx + eax*4]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x30]
lea esi, [ebx + 0x10]
mov edi, dword [edx + ecx*8 + 0x32014]
mov edx, dword [ebx + 0x10]
mov eax, edx
and eax, edi
test al, 1
je 0x401b20
mov dword [esp + 0xc], edi
mov edx, dword [ebp + 8]
mov eax, dword [esi + 0x10]
mov dword [esp], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call dword [esi + 4]
mov edx, dword [ebx + 0x10]
jmp 0x401b20
test byte [ebp + 0xc], 4
jne 0x4019d8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x46010]
xor ecx, ecx
test edx, edx
je 0x401c31
lea esi, [esi]
lea edi, [edi]
test ecx, ecx
je 0x401d10
mov eax, dword [ecx + 8]
cmp dword [edx + 8], eax
jl 0x401d10
je 0x401cf5
mov edx, dword [edx + 0x1c]
test edx, edx
jne 0x401c10
test ecx, ecx
mov ebx, ecx
je 0x4019d8
lea edx, [ebp - 0x14]
lea eax, [ebp - 0x18]
lea esi, [ebp - 0x20]
call fcn.00401790
mov ecx, dword [ebx + 8]
mov edi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub ecx, edi
mov dword [ebp - 0x20], ecx
mov eax, dword [ebx + 0xc]
cmp eax, edx
jl 0x401dba
sub eax, edx
imul eax, eax, 0x3e8
mov dword [ebp - 0x1c], eax
mov ebx, dword [esi]
test ebx, ebx
js 0x401dd5
mov ecx, dword [esi + 4]
test ecx, ecx
jns 0x4019f1
mov dword [esi + 4], 0
jmp 0x4019f1
mov eax, dword [ebp - 0x40]
add dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [ebp + 0xc], 2
jne 0x401d96
nop
lea esi, [esi]
test byte [ebp + 0xc], 2
je 0x401c96
mov dword [ebp - 0x40], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov ebx, dword [edx + 0x46010]
mov edx, dword [edx + 0xc]
add eax, 0xffffffff
mov dword [ebp - 0x48], eax
adc edx, 0xffffffff
mov dword [ebp - 0x44], edx
nop
lea esi, [esi]
test ebx, ebx
je 0x401c90
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
cmp edx, dword [ebp - 0x44]
jl 0x401d25
jle 0x401d20
mov ebx, dword [ebx + 0x1c]
jmp 0x401ce0
mov eax, dword [ecx + 0xc]
cmp dword [edx + 0xc], eax
jge 0x401c2a
jmp 0x401d10
mov ecx, edx
mov edx, dword [edx + 0x1c]
jmp 0x401c2d
cmp eax, dword [ebp - 0x48]
ja 0x401cf0
lea eax, [ebp - 0x28]
lea edx, [ebp - 0x24]
call fcn.00401790
mov eax, dword [ebp - 0x28]
cmp dword [ebx + 8], eax
jl 0x401d50
jne 0x401cf0
mov eax, dword [ebp - 0x24]
cmp dword [ebx + 0xc], eax
jg 0x401cf0
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [ebx + 0x10]
inc dword [ebp - 0x40]
cmp eax, 0xffffffff
je 0x401da5
lea ecx, [ebx + 0xc]
cdq
mov dword [esp + 4], ecx
lea ecx, [ebx + 8]
mov dword [esp], ecx
call fcn.004017e0
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx + 0x46010]
jmp 0x401ce0
test byte [ebp + 0xc], 4
jne 0x401cb0
jmp 0x4019ce
mov dword [esp + 4], esi
mov edx, dword [ebp + 8]
mov dword [esp + 8], edi
mov dword [esp], edx
call fcn.00401910
jmp 0x401d88
sub eax, edx
imul eax, eax, 0x3e8
add eax, 0xf4240
mov dword [ebp - 0x1c], eax
lea eax, [ecx - 1]
mov dword [ebp - 0x20], eax
jmp 0x401c6d
mov dword [esi], 0
jmp 0x401c77