Function at 0x1005c3d0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x100dcc00]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x328], ebx
test ebx, ebx
je 0x1005c40b
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x1005c40b
nop word [eax + eax]
cmp dword [ebx + eax*8], 0xffffffff
jne 0x1005c44a
inc eax
cmp eax, ecx
jb 0x1005c400
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
je 0x1005c77d
test edx, edx
jg 0x1005c767
jl 0x1005c42d
test ecx, ecx
jae 0x1005c75c
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
push esi
xor edx, edx
lea ecx, [ebx + 4]
push edi
xor edi, edi
mov dword [ebp - 0x310], edx
xor esi, esi
mov dword [ebp - 0x108], edi
or eax, 0xffffffff
mov dword [ebp - 0x20c], esi
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x31c], edx
mov dword [ebp - 0x318], ecx
nop dword [eax]
xor ebx, ebx
mov dword [ebp - 0x320], eax
mov word [ecx + 2], bx
mov ecx, dword [ecx - 4]
cmp ecx, 0xffffffff
je 0x1005c59f
jae 0x1005c5df
mov eax, dword [ebp - 0x318]
movzx eax, word [eax]
movzx ebx, ax
mov dword [ebp - 0x330], ebx
mov ebx, dword [ebp - 0x320]
mov dword [ebp - 0x324], eax
test eax, 0x710
je 0x1005c599
cmp ecx, ebx
mov eax, ecx
cmovbe eax, ebx
test dword [ebp - 0x324], 0x300
mov dword [ebp - 0x314], eax
je 0x1005c511
xor eax, eax
test edi, edi
je 0x1005c4f4
cmp dword [ebp + eax*4 - 0x104], ecx
je 0x1005c4f4
inc eax
cmp eax, edi
jb 0x1005c4e6
cmp eax, edi
jne 0x1005c511
cmp edi, 0x40
jae 0x1005c511
mov dword [ebp + eax*4 - 0x104], ecx
mov edi, dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x108], edi
mov ebx, dword [ebp - 0x330]
test bl, 0x10
je 0x1005c54d
xor eax, eax
test esi, esi
je 0x1005c530
cmp dword [ebp + eax*4 - 0x208], ecx
je 0x1005c530
inc eax
cmp eax, esi
jb 0x1005c522
cmp eax, esi
jne 0x1005c54d
cmp esi, 0x40
jae 0x1005c54d
mov dword [ebp + eax*4 - 0x208], ecx
mov esi, dword [ebp - 0x20c]
inc esi
mov dword [ebp - 0x20c], esi
test ebx, 0x600
je 0x1005c599
xor eax, eax
test edx, edx
je 0x1005c56e
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x30c], ecx
je 0x1005c56e
inc eax
cmp eax, edx
jb 0x1005c560
cmp eax, edx
jne 0x1005c58b
cmp edx, 0x40
jae 0x1005c58b
mov dword [ebp + eax*4 - 0x30c], ecx
mov edx, dword [ebp - 0x310]
inc edx
mov dword [ebp - 0x310], edx
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x314], eax
jmp 0x1005c59f
mov eax, dword [ebp - 0x314]
mov ecx, dword [ebp - 0x318]
inc dword [ebp - 0x31c]
add ecx, 8
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x318], ecx
cmp dword [ebp - 0x31c], ebx
jb 0x1005c480
test edi, edi
jne 0x1005c5fe
test esi, esi
jne 0x1005c5fe
test edx, edx
jne 0x1005c5fe
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.1005c8b0
add esp, 8
jmp 0x1005c656
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
push dword [ebp + 0x14]
lea eax, [ebp - 0x334]
push dword [ebp + 0x10]
push eax
call fcn.1007df10
add esp, 0xc
lea esi, [ebp - 0x310]
lea ecx, [ebp - 0x20c]
push eax
xor eax, eax
cmp dword [ebp - 0x310], eax
cmove esi, eax
cmp dword [ebp - 0x20c], eax
push esi
cmove ecx, eax
xor edi, edi
cmp dword [ebp - 0x108], edi
lea eax, [ebp - 0x108]
push ecx
cmove eax, edi
push eax
mov eax, dword [ebp - 0x314]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jg 0x1005c684
cmp esi, 0xffffffff
jne 0x1005c671
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x2714
cmove esi, ecx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x328]
xor edi, edi
add esi, 6
nop
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x1005c73d
lea ecx, [ebp - 0x108]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1005c6dc
movzx ecx, word [esi - 2]
test ecx, 0x100
je 0x1005c6c6
mov eax, 0x100
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x300
je 0x1005c6dc
or eax, 0x300
mov word [esi], ax
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1005c6f9
test byte [esi - 2], 0x10
je 0x1005c6f9
or word [esi], 0x10
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1005c736
movzx ecx, word [esi - 2]
test ecx, 0x200
je 0x1005c720
mov eax, 0x200
or word [esi], ax
movzx eax, word [esi]
movzx eax, ax
test ecx, 0x400
je 0x1005c736
or eax, 0x400
mov word [esi], ax
cmp word [esi], 0
je 0x1005c73d
inc edi
add esi, 8
sub ebx, 1
jne 0x1005c690
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x1005c776
jg 0x1005c767
cmp ecx, 0xffffffff
jb 0x1005c776
mov ecx, 0xfffffffe
mov dword [ebp - 0x328], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop ebx
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret