Function at 0x416360
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x586f0c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], ecx
mov dword [ebp - 0x31c], edx
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x314], 0xffffffff
mov esi, edi
test edi, edi
jle 0x4163f3
test ebx, ebx
je 0x4163c0
push ebx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4163f0
mov eax, dword [ebp - 0x324]
test eax, eax
je 0x4163d5
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4163f0
mov eax, dword [ebp - 0x320]
test eax, eax
je 0x4163ea
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4163f0
dec esi
dec edi
test esi, esi
jg 0x4163b1
mov dword [ebp + 8], edi
test ebx, ebx
je 0x416624
push ebx
push 0
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x416624
xor esi, esi
cmp dword [0x58aed0], esi
jne 0x41643f
call fcn.00419490
test eax, eax
jne 0x416435
push 0x188
push str.nbase_misc.c
push str.ret___0
call fcn.004becc9
add esp, 0xc
mov dword [0x58aed0], 1
mov edx, dword [ebx]
xor eax, eax
cmp edx, esi
jbe 0x416479
lea ecx, [ebx + 4]
lea ebx, [ebx]
cmp dword [ecx], esi
je 0x41645e
inc eax
add ecx, 4
cmp eax, edx
jb 0x416450
jmp 0x416479
dec edx
cmp eax, edx
jae 0x416477
lea ecx, [ebx + eax*4 + 4]
mov edx, dword [ecx + 4]
mov dword [ecx], edx
mov edx, dword [ebx]
inc eax
dec edx
add ecx, 4
cmp eax, edx
jb 0x416467
dec dword [ebx]
mov eax, dword [ebp - 0x31c]
cmp eax, esi
je 0x4164b5
mov ecx, dword [eax]
imul ecx, ecx, 0xf4240
add ecx, dword [eax + 4]
mov eax, 0x431bde83
imul ecx
sar edx, 0xf
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x314], eax
imul eax, eax, 0x1e848
sub ecx, eax
je 0x4164b5
inc dword [ebp - 0x314]
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x310], esi
mov dword [ebp - 0x20c], esi
jmp 0x4164d2
xor esi, esi
cmp dword [ebp - 0x314], esi
je 0x4165d0
mov dword [ebp - 0x32c], esi
mov ecx, 0x41
mov esi, ebx
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x324]
mov dword [ebp - 0x328], 0x1e848
test esi, esi
je 0x416514
mov ecx, 0x41
lea edi, [ebp - 0x310]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x320]
test esi, esi
je 0x41652b
mov ecx, 0x41
lea edi, [ebp - 0x20c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
mov esi, 1
mov dword [ebp - 0x318], 0
cmp eax, esi
jle 0x41656f
lea ecx, [ebp - 0x32c]
push ecx
lea edx, [ebp - 0x20c]
push edx
lea ecx, [ebp - 0x310]
push ecx
lea edx, [ebp - 0x108]
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x318], eax
cmp eax, 0xffffffff
jle 0x4165b4
call fcn.00419610
test eax, eax
je 0x4165b4
mov ecx, dword [ebp - 0x108]
xor eax, eax
test ecx, ecx
je 0x416594
cmp dword [ebp + eax*4 - 0x104], 0
je 0x416594
add eax, esi
cmp eax, ecx
jb 0x416584
cmp eax, ecx
jne 0x4165ae
cmp ecx, 0x40
jae 0x4165ae
mov dword [ebp + eax*4 - 0x104], 0
add dword [ebp - 0x108], esi
add dword [ebp - 0x318], esi
cmp dword [ebp - 0x31c], 0
je 0x4165c3
sub dword [ebp - 0x314], esi
cmp dword [ebp - 0x318], 0
je 0x4164d0
mov ecx, 0x41
lea esi, [ebp - 0x108]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x324]
test edi, edi
je 0x4165f6
mov ecx, 0x41
lea esi, [ebp - 0x310]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x320]
test edi, edi
je 0x41660d
mov ecx, 0x41
lea esi, [ebp - 0x20c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x318]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x31c]
test edi, edi
jle 0x416656
mov ecx, dword [ebp - 0x320]
mov edx, dword [ebp - 0x324]
push eax
push ecx
push edx
push ebx
push edi
call dword [sym.imp.WS2_32.dll_select]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bf32e
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x41666f
lea ebx, [ebx]
push 0x2710
call fcn.00417100
add esp, 4
jmp 0x416660
mov ecx, dword [eax]
imul ecx, ecx, 0xf4240
add ecx, dword [eax + 4]
push ecx
call fcn.00417090
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004bf32e
mov esp, ebp
pop ebp
ret