Function at 0x55e127
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0x623fcc]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
mov dword [ebp - 0x324], esi
mov dword [ebp - 0x328], edx
mov dword [ebp - 0x330], edi
mov dword [ebp - 0x32c], edi
test edx, edx
je 0x55e175
mov ecx, dword [ebp + 0xc]
mov eax, edi
test ecx, ecx
je 0x55e175
cmp dword [edx + eax*8], 0xffffffff
jne 0x55e18b
inc eax
cmp eax, ecx
jb 0x55e16a
push esi
call fcn.0055e83a
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054f54f
leave
ret
test esi, esi
jle 0x55e1a0
call fcn.0055637b
mov dword [ebp - 0x330], eax
mov dword [ebp - 0x32c], edx
xor ecx, ecx
mov dword [ebp - 0x320], edi
test esi, esi
mov dword [ebp - 0x310], ecx
mov eax, esi
mov ebx, edi
cmovle eax, ecx
mov dword [ebp - 0x20c], ebx
or dword [ebp - 0x318], 0xffffffff
mov edx, edi
mov dword [ebp - 0x334], eax
mov esi, edi
mov dword [ebp - 0x108], edx
mov eax, dword [ebp - 0x328]
xor edx, edx
mov word [eax + esi*8 + 6], dx
mov eax, dword [eax + esi*8]
mov edx, dword [ebp - 0x108]
mov dword [ebp - 0x314], eax
cmp eax, 0xffffffff
je 0x55e30f
mov edx, dword [ebp - 0x328]
movzx edx, word [edx + esi*8 + 4]
mov dword [ebp - 0x31c], edx
test dl, 7
mov edx, dword [ebp - 0x108]
je 0x55e30f
mov esi, eax
cmp esi, dword [ebp - 0x318]
cmovbe eax, dword [ebp - 0x318]
mov dword [ebp - 0x318], eax
mov eax, dword [ebp - 0x31c]
test al, 1
je 0x55e27b
mov eax, edi
test ebx, ebx
je 0x55e24c
cmp dword [ebp + eax*4 - 0x208], esi
je 0x55e24c
inc eax
cmp eax, ebx
jb 0x55e23e
cmp eax, ebx
jne 0x55e275
cmp ebx, 0x40
jae 0x55e275
mov ebx, dword [ebp - 0x314]
mov esi, dword [ebp - 0x314]
mov dword [ebp + eax*4 - 0x208], ebx
mov ebx, dword [ebp - 0x20c]
inc ebx
mov dword [ebp - 0x20c], ebx
mov eax, dword [ebp - 0x31c]
test al, 4
je 0x55e2c2
mov eax, edi
test edx, edx
je 0x55e293
cmp dword [ebp + eax*4 - 0x104], esi
je 0x55e293
inc eax
cmp eax, edx
jb 0x55e285
cmp eax, edx
jne 0x55e2bc
cmp edx, 0x40
jae 0x55e2bc
mov edx, dword [ebp - 0x314]
mov esi, dword [ebp - 0x314]
mov dword [ebp + eax*4 - 0x104], edx
mov edx, dword [ebp - 0x108]
inc edx
mov dword [ebp - 0x108], edx
mov eax, dword [ebp - 0x31c]
test al, 2
je 0x55e309
mov eax, edi
test ecx, ecx
je 0x55e2da
cmp dword [ebp + eax*4 - 0x30c], esi
je 0x55e2da
inc eax
cmp eax, ecx
jb 0x55e2cc
cmp eax, ecx
jne 0x55e2fd
cmp ecx, 0x40
jae 0x55e2fd
mov ecx, dword [ebp - 0x314]
mov dword [ebp + eax*4 - 0x30c], ecx
mov ecx, dword [ebp - 0x310]
inc ecx
mov dword [ebp - 0x310], ecx
mov eax, dword [ebp - 0x318]
mov dword [ebp - 0x318], eax
mov esi, dword [ebp - 0x320]
inc esi
mov dword [ebp - 0x320], esi
cmp esi, dword [ebp + 0xc]
jb 0x55e1d4
mov esi, dword [ebp - 0x324]
test ebx, ebx
jne 0x55e335
test edx, edx
jne 0x55e335
test ecx, ecx
je 0x55e175
xor edx, edx
lea eax, [ebp - 0x33c]
test esi, esi
cmovs eax, edx
mov edx, dword [ebp - 0x318]
inc edx
mov dword [ebp - 0x320], eax
mov dword [ebp - 0x31c], edx
test esi, esi
jle 0x55e390
mov eax, dword [ebp - 0x334]
cdq
mov dword [ebp - 0x324], 0x3e8
idiv dword [ebp - 0x324]
mov dword [ebp - 0x33c], eax
imul eax, edx, 0x3e8
mov edx, dword [ebp - 0x31c]
mov dword [ebp - 0x338], eax
mov eax, dword [ebp - 0x320]
jmp 0x55e39e
jne 0x55e39e
mov dword [ebp - 0x33c], edi
mov dword [ebp - 0x338], edi
and dword [ebp - 0x324], edi
test ecx, ecx
push eax
lea eax, [ebp - 0x310]
cmove eax, dword [ebp - 0x324]
xor ecx, ecx
cmp dword [ebp - 0x108], ecx
push eax
lea eax, [ebp - 0x108]
cmove eax, ecx
test ebx, ebx
push eax
lea eax, [ebp - 0x20c]
cmove eax, ecx
push eax
push edx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x55e444
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x55e3f8
cmp dword [0x62cb18], edi
jne 0x55e448
cmp eax, 0x2714
jne 0x55e448
test esi, esi
jle 0x55e425
push dword [ebp - 0x32c]
push dword [ebp - 0x330]
call fcn.0055637b
push edx
push eax
call fcn.005562f4
mov ecx, esi
add esp, 0x10
sub ecx, eax
mov dword [ebp - 0x334], ecx
test ecx, ecx
jle 0x55e442
mov ebx, dword [ebp - 0x20c]
mov ecx, dword [ebp - 0x310]
mov eax, dword [ebp - 0x320]
mov edx, dword [ebp - 0x31c]
jmp 0x55e355
mov eax, edi
test eax, eax
jns 0x55e450
or eax, 0xffffffff
jmp 0x55e17c
jne 0x55e459
xor eax, eax
jmp 0x55e17c
mov esi, dword [ebp - 0x328]
mov eax, dword [ebp + 0xc]
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x55e4ca
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x55e487
or word [esi], 1
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x55e49e
or word [esi], 4
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
movzx ecx, word [esi]
test eax, eax
je 0x55e4bf
or ecx, 2
mov word [esi], cx
movzx eax, cx
jmp 0x55e4c1
mov eax, ecx
test ax, ax
mov eax, dword [ebp + 0xc]
je 0x55e4ca
inc edi
add esi, 8
sub eax, 1
mov dword [ebp + 0xc], eax
jne 0x55e465
mov eax, edi
jmp 0x55e17c