Function at 0x4b5aa0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x32c
mov eax, dword [0x66bf78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x31c], eax
xor eax, eax
push esi
mov dword [ebp - 0x320], eax
mov eax, dword [ebp + 8]
mov esi, eax
mov dword [ebp - 0x318], ecx
mov dword [ebp - 0x314], 0xffffffff
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x324], edi
test eax, eax
jle 0x4b5b31
nop
test ebx, ebx
je 0x4b5b05
push ebx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4b5b31
mov ecx, dword [ebp - 0x318]
test ecx, ecx
je 0x4b5b14
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4b5b31
test edi, edi
je 0x4b5b23
push edi
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4b5b31
dec dword [ebp + 8]
dec esi
mov ecx, dword [ebp - 0x318]
test esi, esi
jg 0x4b5af0
test ebx, ebx
je 0x4b5d7a
push ebx
push 0
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b5d7a
cmp dword [0x68fa90], 0
jne 0x4b5b7d
call fcn.004b8930
test eax, eax
jne 0x4b5b73
push 0x1db
push str.nbase_misc.c
push str.ret___0
call dword [sym.imp.MSVCR120.dll__wassert]
add esp, 0xc
mov dword [0x68fa90], 1
mov edx, dword [ebx]
xor ecx, ecx
test edx, edx
je 0x4b5bb7
lea eax, [ebx + 4]
cmp dword [eax], 0
je 0x4b5b97
inc ecx
add eax, 4
cmp ecx, edx
jb 0x4b5b88
jmp 0x4b5bb7
lea eax, [edx - 1]
cmp ecx, eax
jae 0x4b5bb5
lea edx, [ebx + 4]
lea edx, [edx + ecx*4]
mov eax, dword [edx + 4]
lea edx, [edx + 4]
mov dword [edx - 4], eax
inc ecx
mov eax, dword [ebx]
dec eax
cmp ecx, eax
jb 0x4b5ba4
dec dword [ebx]
mov eax, dword [ebp - 0x31c]
test eax, eax
je 0x4b5bf4
imul ecx, dword [eax], 0xf4240
add ecx, dword [eax + 4]
mov eax, 0x431bde83
imul ecx
sar edx, 0xf
mov esi, edx
shr esi, 0x1f
add esi, edx
imul eax, esi, 0x1e848
mov dword [ebp - 0x314], esi
sub ecx, eax
je 0x4b5bf7
inc esi
mov dword [ebp - 0x314], esi
jmp 0x4b5bf7
or esi, 0xffffffff
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x310], 0
mov dword [ebp - 0x20c], 0
test esi, esi
je 0x4b5d24
mov eax, dword [ebp - 0x318]
lea edi, [ebp - 0x108]
mov dword [ebp - 0x32c], 0
mov ecx, 0x41
mov dword [ebp - 0x328], 0x1e848
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
test eax, eax
je 0x4b5c59
mov ecx, 0x41
lea edi, [ebp - 0x310]
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x324]
test eax, eax
je 0x4b5c72
mov ecx, 0x41
lea edi, [ebp - 0x20c]
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x320], edi
cmp eax, 1
jle 0x4b5cb4
lea ecx, [ebp - 0x32c]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
lea ecx, [ebp - 0x310]
push ecx
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
mov dword [ebp - 0x320], edi
cmp edi, 0xffffffff
jle 0x4b5d06
jmp 0x4b5cc1
push 0x1e848
call fcn.004b66f0
add esp, 4
call fcn.004b88d0
test eax, eax
je 0x4b5d06
mov ecx, dword [ebp - 0x108]
xor eax, eax
test ecx, ecx
je 0x4b5ce5
cmp dword [ebp + eax*4 - 0x104], 0
je 0x4b5ce5
inc eax
cmp eax, ecx
jb 0x4b5cd6
cmp eax, ecx
jne 0x4b5cff
cmp ecx, 0x40
jae 0x4b5cff
mov dword [ebp + eax*4 - 0x104], 0
inc dword [ebp - 0x108]
inc edi
mov dword [ebp - 0x320], edi
cmp dword [ebp - 0x31c], 0
mov esi, dword [ebp - 0x314]
je 0x4b5d1c
dec esi
mov dword [ebp - 0x314], esi
test edi, edi
je 0x4b5c15
mov edx, dword [ebp - 0x318]
lea esi, [ebp - 0x108]
mov ecx, 0x41
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
test edx, edx
je 0x4b5d4c
mov ecx, 0x41
lea esi, [ebp - 0x310]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x324]
test edi, edi
je 0x4b5d63
mov ecx, 0x41
lea esi, [ebp - 0x20c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x320]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bb11e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4b5da8
push dword [ebp - 0x31c]
mov edx, dword [ebp - 0x318]
push edi
push edx
push ebx
push eax
call dword [sym.imp.WS2_32.dll_select]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bb11e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x31c]
test ecx, ecx
jne 0x4b5dc1
push 0x2710
call fcn.004b66d0
add esp, 4
jmp 0x4b5db2
imul eax, dword [ecx], 0xf4240
add eax, dword [ecx + 4]
push eax
call fcn.004b66f0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004bb11e
mov esp, ebp
pop ebp
ret