Function at 0x4063a0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3020
call fcn.0040b840
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 4]
test eax, eax
jne 0x4063ce
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor eax, eax
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
test esi, esi
jg 0x4063e2
jl 0x4063de
test edi, edi
jae 0x4063e2
xor eax, eax
jmp 0x406407
push 0
push 0xf4240
push esi
push edi
call fcn.0040b590
push 0
push 0xf4240
push esi
push edi
mov dword [ebp - 0x14], eax
call fcn.0040b750
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
mov ecx, 0x401
lea esi, [ebx + 0xc]
lea edi, [ebp - 0x201c]
push eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x401
lea esi, [ebx + 0x1010]
lea edi, [ebp - 0x1018]
lea edx, [ebp - 0x1018]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x401
lea esi, [ebx + 0x2014]
lea edi, [ebp - 0x3020]
lea eax, [ebp - 0x201c]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x3020]
push ecx
mov ecx, dword [ebx + 0x3018]
push edx
inc ecx
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_select]
mov edx, dword [ebp + 0x14]
xor edi, edi
cmp eax, edi
mov dword [edx], eax
jge 0x40648c
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x4065d3
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret 0x14
jne 0x40649c
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 0x4065bc
mov dword [ebp + 8], edi
mov dword [ebp - 4], edi
mov eax, dword [ebx + 0x301c]
add eax, edi
cmp dword [eax + 4], 1
jne 0x4065de
mov ecx, dword [eax + 0xc]
lea edx, [ebp - 0x201c]
push edx
mov esi, dword [ecx + 4]
push esi
mov dword [ebp - 0xc], esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x406505
lea eax, [ebp - 0x1018]
push eax
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x406505
lea ecx, [ebp - 0x3020]
push ecx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4065a2
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 edx, dword [ebx + 0x3020]
mov edi, dword [ebp - 0xc]
mov word [edx + eax + 0xa], 0
lea eax, [ebp - 0x201c]
push eax
push edi
call sub.WSOCK32.dll___WSAFDIsSet
mov esi, dword [ebp + 8]
test eax, eax
je 0x406552
mov ecx, dword [ebx + 0x3020]
or byte [ecx + esi + 0xa], 1
lea eax, [ecx + esi + 0xa]
lea edx, [ebp - 0x1018]
push edx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x406572
mov eax, dword [ebx + 0x3020]
or byte [eax + esi + 0xa], 4
lea eax, [eax + esi + 0xa]
lea ecx, [ebp - 0x3020]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x406592
mov edx, dword [ebx + 0x3020]
or byte [edx + esi + 0xa], 0x10
lea eax, [edx + esi + 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 0x4064b3
xor edi, edi
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 0x18]
cmp eax, edi
je 0x4065d3
mov edx, dword [ebx + 0x3020]
mov dword [eax], edx
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