Function at 0x4d3410
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x51300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
mov eax, 0x10624dd3
imul ebx
push esi
sar edx, 6
mov esi, ecx
mov eax, edx
mov dword [ebp - 0x324], esi
shr eax, 0x1f
mov ecx, ebx
add eax, edx
mov edx, dword [esi]
mov dword [ebp - 0x330], eax
imul eax, eax, 0x3e8
push edi
xor edi, edi
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x320], edi
sub ecx, eax
mov dword [ebp - 0x110], edi
imul eax, ecx, 0x3e8
xor ecx, ecx
test ebx, ebx
mov dword [ebp - 0x32c], eax
lea eax, [ebp - 0x330]
cmovs eax, ecx
mov dword [ebp - 0x328], eax
test edx, edx
je 0x4d35c4
nop
mov ecx, dword [edx + 0x9c]
and ecx, 0xfffcffff
mov dword [edx + 0x9c], ecx
test ecx, 0x2008
jne 0x4d35ae
mov esi, dword [edx + 0x40]
cmp esi, 0xffffffff
je 0x4d35ae
mov eax, ecx
shr eax, 0xe
not al
test al, 1
jne 0x4d34dc
test cl, 0x20
jne 0x4d34dc
cmp dword [edx + 0x60], 0
jbe 0x4d35ae
test cl, cl
js 0x4d35ae
mov ecx, dword [ebp - 0x110]
xor eax, eax
test ecx, ecx
je 0x4d34fe
nop dword [eax + eax]
cmp dword [ebp + eax*4 - 0x10c], esi
je 0x4d34fe
inc eax
cmp eax, ecx
jb 0x4d34f0
cmp eax, ecx
jne 0x4d3514
cmp ecx, 0x40
jae 0x4d3514
mov dword [ebp + eax*4 - 0x10c], esi
inc dword [ebp - 0x110]
mov ecx, dword [edx + 0x9c]
mov eax, ecx
shr eax, 0xe
not al
test al, 1
je 0x4d3561
mov eax, dword [ebp - 0x218]
xor ecx, ecx
test eax, eax
je 0x4d3542
mov esi, dword [edx + 0x40]
cmp dword [ebp + ecx*4 - 0x214], esi
je 0x4d3542
inc ecx
cmp ecx, eax
jb 0x4d3534
cmp ecx, eax
jne 0x4d355b
cmp eax, 0x40
jae 0x4d355b
mov eax, dword [edx + 0x40]
mov dword [ebp + ecx*4 - 0x214], eax
inc dword [ebp - 0x218]
mov ecx, dword [edx + 0x9c]
test cl, 0x20
jne 0x4d3570
cmp dword [edx + 0x60], 0
jbe 0x4d35a7
test cl, cl
js 0x4d35a7
mov ecx, dword [ebp - 0x320]
xor eax, eax
test ecx, ecx
je 0x4d358e
mov esi, dword [edx + 0x40]
nop
cmp dword [ebp + eax*4 - 0x31c], esi
je 0x4d358e
inc eax
cmp eax, ecx
jb 0x4d3580
cmp eax, ecx
jne 0x4d35a7
cmp ecx, 0x40
jae 0x4d35a7
mov ecx, dword [edx + 0x40]
mov dword [ebp + eax*4 - 0x31c], ecx
inc dword [ebp - 0x320]
cmp dword [edx + 0x40], edi
cmova edi, dword [edx + 0x40]
mov edx, dword [edx]
test edx, edx
jne 0x4d3490
mov esi, dword [ebp - 0x324]
mov eax, dword [ebp - 0x328]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [edi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x4d3611
test edi, edi
jne 0x4d35f3
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x110], 0
mov esi, dword [esi]
test esi, esi
je 0x4d36b5
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
mov eax, dword [esi + 0x40]
cmp eax, 0xffffffff
je 0x4d3647
lea ecx, [ebp - 0x110]
push ecx
push eax
call edi
test eax, eax
je 0x4d3647
push str.socket_error
push esi
call fcn.004cd840
add esp, 8
jmp 0x4d36ab
mov eax, dword [esi + 0x40]
cmp eax, 0xffffffff
je 0x4d3664
lea ecx, [ebp - 0x218]
push ecx
push eax
call edi
test eax, eax
je 0x4d3664
mov ecx, 0x10000
jmp 0x4d3666
xor ecx, ecx
mov eax, dword [esi + 0x9c]
and eax, 0xfffeffff
or eax, ecx
mov dword [esi + 0x9c], eax
mov eax, dword [esi + 0x40]
cmp eax, 0xffffffff
je 0x4d3696
lea ecx, [ebp - 0x320]
push ecx
push eax
call edi
test eax, eax
je 0x4d3696
mov ecx, 0x20000
jmp 0x4d3698
xor ecx, ecx
mov eax, dword [esi + 0x9c]
and eax, 0xfffdffff
or eax, ecx
mov dword [esi + 0x9c], eax
mov esi, dword [esi]
test esi, esi
jne 0x4d3621
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f1f57
mov esp, ebp
pop ebp
ret