Function at 0x4062b0
Capabilities:
Get socket status

Disassembly:
mov eax, 0x6024
call fcn.004c79d0
mov eax, dword [0x501230]
xor eax, esp
mov dword [esp + 0x6020], eax
mov edx, dword [esp + 0x6028]
mov dword [esp], edx
test edx, edx
jne 0x4062ee
or eax, 0xffffffff
mov ecx, dword [esp + 0x6020]
xor ecx, esp
call fcn.004c75e8
add esp, 0x6024
ret
push ebx
push ebp
mov ebp, dword [esp + 0x6034]
push esi
push edi
xor esi, esi
mov dword [esp + 0x24], 0
xor edi, edi
mov dword [esp + 0x2028], 0
mov dword [esp + 0x402c], 0
test ebp, ebp
je 0x4064a6
lea ebx, [esi + 4]
nop word [eax + eax]
xor eax, eax
mov dword [esp + 0x1c], 4
mov word [edx + edi*8 + 6], ax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x24]
push eax
push 0x1008
push 0xffff
push dword [edx + edi*8]
call dword [sym.imp.WSOCK32.dll_getsockopt]
mov edx, dword [esp + 0x10]
cmp eax, 0xffffffff
jne 0x406373
mov word [edx + edi*8 + 6], bx
jmp 0x406408
movzx ebx, word [edx + edi*8 + 4]
test ebx, 0x300
je 0x4063ba
mov eax, dword [esp + 0x24]
xor ecx, ecx
test eax, eax
je 0x40639f
mov edx, dword [edx + edi*8]
nop dword [eax]
cmp dword [esp + ecx*4 + 0x28], edx
je 0x40639b
inc ecx
cmp ecx, eax
jb 0x406390
mov edx, dword [esp + 0x10]
cmp ecx, eax
jne 0x4063b5
cmp eax, 0x800
jae 0x4063b5
mov eax, dword [edx + edi*8]
mov dword [esp + ecx*4 + 0x28], eax
inc dword [esp + 0x24]
mov esi, 1
test bl, 0x10
je 0x406403
mov eax, dword [esp + 0x2028]
xor ecx, ecx
test eax, eax
je 0x4063de
mov edx, dword [edx + edi*8]
nop
cmp dword [esp + ecx*4 + 0x202c], edx
je 0x4063de
inc ecx
cmp ecx, eax
jb 0x4063d0
mov edx, dword [esp + 0x10]
cmp ecx, eax
jne 0x4063fe
cmp eax, 0x800
jae 0x4063fe
mov eax, dword [edx + edi*8]
mov dword [esp + ecx*4 + 0x202c], eax
inc dword [esp + 0x2028]
mov esi, 1
mov ebx, 4
inc edi
cmp edi, ebp
jb 0x406330
test esi, esi
je 0x4064a6
mov ebx, dword [esp + 0x6040]
xor ecx, ecx
test ebx, ebx
js 0x40645e
lea ecx, [esp + 0x14]
jne 0x40643e
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
jmp 0x40645e
mov eax, 0x10624dd3
mul ebx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [esp + 0x14], edx
sub ebx, eax
imul eax, ebx, 0x3e8
mov dword [esp + 0x18], eax
push ecx
lea eax, [esp + 0x4030]
push eax
lea eax, [esp + 0x2030]
push eax
lea eax, [esp + 0x30]
push eax
push 0
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x4064a2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov esi, eax
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
call fcn.004068d0
add esp, 4
mov dword [esi], eax
or eax, 0xffffffff
jmp 0x406524
mov edx, dword [esp + 0x10]
xor edi, edi
test ebp, ebp
je 0x406522
lea esi, [edx + 6]
mov ebx, 0x300
cmp word [esi], 4
je 0x406519
lea eax, [esp + 0x24]
push eax
push dword [esi - 6]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4064da
mov ax, word [esi - 2]
and ax, bx
or word [esi], ax
inc edi
lea eax, [esp + 0x2028]
push eax
push dword [esi - 6]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4064fa
mov ax, word [esi - 2]
and ax, 0x10
or word [esi], ax
inc edi
lea eax, [esp + 0x402c]
push eax
push dword [esi - 6]
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x40651a
mov ax, word [esi - 2]
and ax, 1
or word [esi], ax
inc edi
add esi, 8
sub ebp, 1
jne 0x4064b8
mov eax, edi
mov ecx, dword [esp + 0x6030]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c75e8
add esp, 0x6024
ret