Function at 0x405fa4
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
push esi
push edi
mov dword [ebp - 4], 0
call fcn.00406322
cmp dword [0x441bb4], 0
je 0x405fe3
movsx eax, byte [0x44214c]
test eax, eax
jne 0x405fe3
mov byte [0x44214c], 1
call dword [0x441bb4]
mov byte [0x44214c], 0
cmp dword [0x4423d8], 0
je 0x4061ad
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov ecx, 0x41
mov esi, 0x441e38
lea edi, [ebp - 0x31c]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
mov esi, 0x441f3c
lea edi, [ebp - 0x218]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
mov esi, 0x442040
lea edi, [ebp - 0x114]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x31c]
push ecx
mov edx, dword [0x4423d4]
add edx, 1
push edx
call sub.WSOCK32.dll_select
test eax, eax
je 0x40618f
mov dword [ebp - 0x320], 0
jmp 0x40607f
mov eax, dword [ebp - 0x320]
add eax, 1
mov dword [ebp - 0x320], eax
mov ecx, dword [ebp - 0x320]
cmp ecx, dword [0x4423d8]
jge 0x40617f
mov edx, dword [ebp - 0x320]
shl edx, 4
mov eax, dword [0x4423e0]
mov ecx, dword [eax + edx]
mov dword [ebp - 0x324], ecx
mov word [ebp - 0x328], 0
lea edx, [ebp - 0x31c]
push edx
mov eax, dword [ebp - 0x324]
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4060d9
mov cx, word [ebp - 0x328]
or cl, 1
mov word [ebp - 0x328], cx
lea edx, [ebp - 0x218]
push edx
mov eax, dword [ebp - 0x324]
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x406101
mov cx, word [ebp - 0x328]
or cl, 4
mov word [ebp - 0x328], cx
lea edx, [ebp - 0x114]
push edx
mov eax, dword [ebp - 0x324]
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x406129
mov cx, word [ebp - 0x328]
or cl, 8
mov word [ebp - 0x328], cx
mov edx, dword [ebp - 0x320]
shl edx, 4
mov eax, dword [0x4423e0]
movsx ecx, word [eax + edx + 4]
movsx edx, word [ebp - 0x328]
and ecx, edx
test ecx, ecx
je 0x40617a
mov eax, dword [ebp - 0x320]
shl eax, 4
mov ecx, dword [0x4423e0]
mov edx, dword [ecx + eax + 0xc]
push edx
mov eax, dword [ebp - 0x324]
push eax
mov ecx, dword [ebp - 0x320]
shl ecx, 4
mov edx, dword [0x4423e0]
call dword [edx + ecx + 8]
add esp, 8
jmp 0x406070
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
jmp 0x4061ad
fld qword [ebp + 8]
fcomp qword [0x4305f0]
fnstsw ax
test ah, 0x41
jne 0x4061ad
mov dword [ebp + 8], 0xd2f1a9fc
mov dword [ebp + 0xc], 0x3f50624d
cmp dword [0x441bb4], 0
jne 0x4061bf
cmp dword [0x4421a0], 0
je 0x4061cd
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
call fcn.00404380
test eax, eax
jne 0x4061f6
cmp dword [ebp + 8], 0x78b58c40
jne 0x4061f6
cmp dword [ebp + 0xc], 0x4415af1d
jne 0x4061f6
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
call dword [0x433b64]
fld qword [ebp + 8]
fcomp qword [0x4305e8]
fnstsw ax
test ah, 0x41
jne 0x406222
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0x40c38800
jmp 0x406234
mov eax, dword [ebp + 8]
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x334], ecx
mov edx, dword [ebp - 0x338]
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0x334]
mov dword [ebp + 0xc], eax
fld qword [ebp + 8]
fmul qword [0x4305e0]
fadd qword [0x430428]
call sub.MSVCRT.dll__ftol
mov dword [ebp - 8], eax
push 0xff
mov ecx, dword [ebp - 8]
push ecx
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
call dword [0x433b60]
push 1
push 0
push 0
push 0
push 0x441e00
call dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jle 0x406312
cmp dword [ebp - 4], 0
je 0x406312
cmp dword [ebp - 4], 0xffffffff
je 0x406312
mov edx, dword [0x441e04]
cmp edx, dword [0x4423e8]
jne 0x4062e4
mov eax, dword [0x441e08]
mov dword [0x442150], eax
lea ecx, [ebp - 0x32c]
push ecx
lea edx, [ebp - 0x330]
push edx
call fcn.0040ec73
add esp, 8
test eax, eax
jne 0x4062e4
mov eax, dword [ebp - 0x32c]
push eax
call dword [ebp - 0x330]
add esp, 4
jmp 0x4062b8
push 0x441e00
call dword [sym.imp.USER32.dll_TranslateMessage]
push 0x441e00
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
push 0x441e00
call dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 4], eax
jmp 0x406294
call fcn.00404460
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret