Function at 0x4bd940
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x36c
mov eax, dword [esp + 0x380]
mov dword [esp + 0x4c], 0
test eax, eax
jle 0x4bdc74
xor ebx, ebx
mov ebp, dword [esp + 0x384]
xor ecx, ecx
or esi, 0xffffffff
xor eax, eax
mov dword [esp + 0x30], 0xffffffff
lea edi, [esp + 0x4c]
mov edx, dword [ebp + ebx*4]
test ecx, ecx
je 0x4bd9be
xor eax, eax
cmp dword [esp + 0x50], edx
jne 0x4bd996
jmp 0x4bd9a0
cmp dword [edi + eax*4 + 4], edx
je 0x4bd9a0
inc eax
cmp eax, ecx
jne 0x4bd990
cmp eax, 0x3f
jbe 0x4bd9be
cmp esi, edx
jge 0x4bd9a6
mov esi, edx
inc ebx
cmp ebx, dword [esp + 0x380]
je 0x4bd9c9
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov edx, dword [ebp + ebx*4]
test ecx, ecx
jne 0x4bd985
inc ecx
mov dword [esp + eax*4 + 0x50], edx
mov dword [esp + 0x4c], ecx
jmp 0x4bd9a0
mov dword [esp + 0x30], esi
mov eax, dword [esp + 0x388]
mov dword [esp + 0x150], 0
lea esi, [esp + 0x150]
test eax, eax
jle 0x4bda6a
xor ebx, ebx
mov ebp, dword [esp + 0x38c]
xor ecx, ecx
mov dword [esp + 0x38], edi
xor eax, eax
lea esi, [esp + 0x150]
mov edi, dword [esp + 0x30]
mov edx, dword [ebp + ebx*4]
test ecx, ecx
je 0x4bda51
xor eax, eax
cmp dword [esp + 0x154], edx
jne 0x4bda26
jmp 0x4bda30
cmp dword [esi + eax*4 + 4], edx
je 0x4bda30
inc eax
cmp eax, ecx
jne 0x4bda20
cmp eax, 0x3f
jbe 0x4bda51
cmp edi, edx
jge 0x4bda36
mov edi, edx
inc ebx
cmp ebx, dword [esp + 0x388]
je 0x4bda62
mov ecx, dword [esp + 0x150]
xor eax, eax
mov edx, dword [ebp + ebx*4]
test ecx, ecx
jne 0x4bda12
inc ecx
mov dword [esp + eax*4 + 0x154], edx
mov dword [esp + 0x150], ecx
jmp 0x4bda30
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x390]
mov dword [esp + 0x254], 0
lea ebx, [esp + 0x254]
test eax, eax
jle 0x4bdb0d
xor ebp, ebp
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x394]
xor ecx, ecx
mov dword [esp + 0x38], esi
xor eax, eax
lea ebx, [esp + 0x254]
mov esi, dword [esp + 0x30]
mov edx, dword [edi + ebp*4]
test ecx, ecx
je 0x4bdaf0
xor eax, eax
cmp dword [esp + 0x258], edx
jne 0x4bdac6
jmp 0x4bdad0
cmp dword [ebx + eax*4 + 4], edx
je 0x4bdad0
inc eax
cmp eax, ecx
jne 0x4bdac0
cmp eax, 0x3f
jbe 0x4bdaf0
cmp esi, edx
jge 0x4bdad6
mov esi, edx
inc ebp
cmp ebp, dword [esp + 0x390]
je 0x4bdb01
mov ecx, dword [esp + 0x254]
xor eax, eax
mov edx, dword [edi + ebp*4]
test ecx, ecx
jne 0x4bdab2
inc ecx
mov dword [esp + eax*4 + 0x258], edx
mov dword [esp + 0x254], ecx
jmp 0x4bdad0
mov dword [esp + 0x30], esi
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x398]
xor eax, eax
test ebp, ebp
js 0x4bdb6d
mov eax, dword [esp + 0x398]
mov edx, 0x10624dd3
imul edx
sar edx, 6
mov eax, dword [esp + 0x398]
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x358], edx
lea eax, [edx + edx*4]
mov edx, dword [esp + 0x398]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
sub edx, eax
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x35c], eax
lea eax, [esp + 0x358]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.WS2_32.DLL_select
sub esp, 0x14
test eax, eax
mov dword [esp + 0x30], eax
js 0x4bdc65
mov ecx, dword [esp + 0x380]
test ecx, ecx
jle 0x4bdbe1
mov dword [esp + 0x34], esi
xor ebp, ebp
mov esi, ebx
mov ebx, edi
mov edi, dword [esp + 0x384]
mov dword [esp + 4], ebx
mov eax, dword [edi + ebp*4]
mov dword [esp], eax
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
push edx
push edx
jne 0x4bdbd1
mov dword [edi + ebp*4], 0
inc ebp
cmp ebp, dword [esp + 0x380]
jne 0x4bdbb5
mov ebx, esi
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x388]
test ecx, ecx
jle 0x4bdc29
mov dword [esp + 0x2c], ebx
xor edi, edi
mov ebx, esi
mov ebp, dword [esp + 0x38c]
mov esi, dword [esp + 0x388]
mov dword [esp + 4], ebx
mov eax, dword [ebp + edi*4]
mov dword [esp], eax
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
push edx
push edx
jne 0x4bdc20
mov dword [ebp + edi*4], 0
inc edi
cmp edi, esi
jne 0x4bdc02
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x390]
test esi, esi
jle 0x4bdc65
xor esi, esi
mov ebp, dword [esp + 0x390]
mov edi, dword [esp + 0x394]
mov dword [esp + 4], ebx
mov eax, dword [edi + esi*4]
mov dword [esp], eax
call sub.WS2_32.DLL___WSAFDIsSet
test eax, eax
push ecx
push ecx
jne 0x4bdc60
mov dword [edi + esi*4], 0
inc esi
cmp esi, ebp
jne 0x4bdc44
mov eax, dword [esp + 0x30]
add esp, 0x36c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x30], 0xffffffff
lea edi, [esp + 0x4c]
jmp 0x4bd9cd