Function at 0x405de4
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
push esi
push edi
mov dword [ebp - 4], 0
call fcn.00406162
cmp dword [0x436e0c], 0
je 0x405e23
movsx eax, byte [0x4373a4]
test eax, eax
jne 0x405e23
mov byte [0x4373a4], 1
call dword [0x436e0c]
mov byte [0x4373a4], 0
cmp dword [0x437630], 0
je 0x405fed
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov ecx, 0x41
mov esi, 0x437090
lea edi, [ebp - 0x31c]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
mov esi, 0x437194
lea edi, [ebp - 0x218]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41
mov esi, 0x437298
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 [0x43762c]
add edx, 1
push edx
call sub.WSOCK32.dll_select
test eax, eax
je 0x405fcf
mov dword [ebp - 0x320], 0
jmp 0x405ebf
mov eax, dword [ebp - 0x320]
add eax, 1
mov dword [ebp - 0x320], eax
mov ecx, dword [ebp - 0x320]
cmp ecx, dword [0x437630]
jge 0x405fbf
mov edx, dword [ebp - 0x320]
shl edx, 4
mov eax, dword [0x437638]
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 0x405f19
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 0x405f41
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 0x405f69
mov cx, word [ebp - 0x328]
or cl, 8
mov word [ebp - 0x328], cx
mov edx, dword [ebp - 0x320]
shl edx, 4
mov eax, dword [0x437638]
movsx ecx, word [eax + edx + 4]
movsx edx, word [ebp - 0x328]
and ecx, edx
test ecx, ecx
je 0x405fba
mov eax, dword [ebp - 0x320]
shl eax, 4
mov ecx, dword [0x437638]
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 [0x437638]
call dword [edx + ecx + 8]
add esp, 8
jmp 0x405eb0
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
jmp 0x405fed
fld qword [ebp + 8]
fcomp qword [0x430578]
fnstsw ax
test ah, 0x41
jne 0x405fed
mov dword [ebp + 8], 0xd2f1a9fc
mov dword [ebp + 0xc], 0x3f50624d
cmp dword [0x436e0c], 0
jne 0x405fff
cmp dword [0x4373f8], 0
je 0x40600d
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
call fcn.004041c0
test eax, eax
jne 0x406036
cmp dword [ebp + 8], 0x78b58c40
jne 0x406036
cmp dword [ebp + 0xc], 0x4415af1d
jne 0x406036
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
call dword [0x4331b0]
fld qword [ebp + 8]
fcomp qword [0x4306d0]
fnstsw ax
test ah, 0x41
jne 0x406062
mov dword [ebp - 0x338], 0
mov dword [ebp - 0x334], 0x40c38800
jmp 0x406074
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 [0x4306c8]
fadd qword [0x430430]
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 [0x4331ac]
push 1
push 0
push 0
push 0
push 0x437058
call dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jle 0x406152
cmp dword [ebp - 4], 0
je 0x406152
cmp dword [ebp - 4], 0xffffffff
je 0x406152
mov edx, dword [0x43705c]
cmp edx, dword [0x437640]
jne 0x406124
mov eax, dword [0x437060]
mov dword [0x4373a8], eax
lea ecx, [ebp - 0x32c]
push ecx
lea edx, [ebp - 0x330]
push edx
call fcn.0040f733
add esp, 8
test eax, eax
jne 0x406124
mov eax, dword [ebp - 0x32c]
push eax
call dword [ebp - 0x330]
add esp, 4
jmp 0x4060f8
push 0x437058
call dword [sym.imp.USER32.dll_TranslateMessage]
push 0x437058
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
push 0x437058
call dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 4], eax
jmp 0x4060d4
call fcn.004042a0
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret