Function at 0x405b30
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3020
call fcn.0040ab80
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
test esi, esi
jg 0x405b54
jl 0x405b50
test edi, edi
jae 0x405b54
xor eax, eax
jmp 0x405b79
push 0
push 0xf4240
push esi
push edi
call fcn.0040a880
push 0
push 0xf4240
push esi
push edi
mov dword [ebp - 0x14], eax
call fcn.0040a940
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov ebx, dword [ebp + 8]
mov ecx, 0x401
lea edi, [ebp - 0x201c]
push eax
lea esi, [ebx + 0xc]
lea eax, [ebp - 0x3020]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x401
lea esi, [ebx + 0x1010]
lea edi, [ebp - 0x1018]
push eax
mov eax, dword [ebx + 0x3018]
lea edx, [ebp - 0x201c]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x401
lea esi, [ebx + 0x2014]
lea edi, [ebp - 0x3020]
inc eax
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x1018]
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_select]
mov ecx, dword [ebp + 0x14]
xor edi, edi
cmp eax, edi
mov dword [ecx], eax
jge 0x405c01
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x405d4c
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret 0x14
jne 0x405c11
pop edi
pop esi
mov eax, 0x11177
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx + 4]
mov dword [ebp + 0x10], edi
cmp eax, edi
mov dword [ebp - 8], edi
jbe 0x405d35
mov dword [ebp + 8], edi
mov dword [ebp - 4], edi
mov edx, dword [ebx + 0x301c]
mov ecx, dword [edi + edx + 4]
lea eax, [edi + edx]
cmp ecx, 1
jne 0x405d57
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x201c]
push ecx
mov esi, dword [eax + 4]
push esi
mov dword [ebp - 0xc], esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x405c7e
lea edx, [ebp - 0x1018]
push edx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x405c7e
lea eax, [ebp - 0x3020]
push eax
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x405d1b
mov esi, dword [ebx + 0x301c]
mov eax, dword [ebp + 8]
add esi, edi
mov edi, dword [ebx + 0x3020]
add edi, eax
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x3020]
mov edi, dword [ebp - 0xc]
lea edx, [ebp - 0x201c]
push edx
push edi
mov word [eax + ecx + 0xa], 0
call sub.WSOCK32.dll___WSAFDIsSet
mov esi, dword [ebp + 8]
test eax, eax
je 0x405ccb
mov eax, dword [ebx + 0x3020]
or byte [esi + eax + 0xa], 1
lea eax, [esi + eax + 0xa]
lea ecx, [ebp - 0x1018]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x405ceb
mov edx, dword [ebx + 0x3020]
or byte [esi + edx + 0xa], 4
lea eax, [esi + edx + 0xa]
lea eax, [ebp - 0x3020]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x405d0b
mov ecx, dword [ebx + 0x3020]
or byte [esi + ecx + 0xa], 0x10
lea eax, [esi + ecx + 0xa]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 4]
inc ecx
add esi, 0x14
mov dword [ebp + 0x10], ecx
mov dword [ebp + 8], esi
mov eax, dword [ebp - 8]
mov ecx, dword [ebx + 4]
inc eax
add edi, 0x14
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edi
jb 0x405c28
xor edi, edi
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
cmp eax, edi
je 0x405d4c
mov ecx, dword [ebx + 0x3020]
mov dword [eax], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0x14