Function at 0x4043b1
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov eax, dword [0x423004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
push esi
push edi
mov edi, ecx
mov eax, ebx
cdq
mov ecx, 0x3e8
idiv ecx
xor ecx, ecx
mov dword [ebp - 0x32c], edi
mov dword [ebp - 0xc], eax
imul eax, edx, 0x3e8
mov dword [ebp - 8], eax
xor eax, eax
mov esi, eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x328], eax
test ebx, ebx
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0xc]
cmovs eax, ecx
mov ecx, dword [edi]
mov dword [ebp - 0x330], eax
test ecx, ecx
je 0x404542
mov edx, dword [ecx + 0x8c]
and edx, 0xfffcffff
mov dword [ecx + 0x8c], edx
test edx, 0x2008
jne 0x40452c
mov edi, dword [ecx + 0x30]
cmp edi, 0xffffffff
je 0x40452c
mov eax, edx
shr eax, 0xe
not al
test al, 1
jne 0x404463
test dl, 0x20
jne 0x404463
cmp dword [ecx + 0x50], 0
jbe 0x40452c
test dl, dl
js 0x40452c
mov edx, dword [ebp - 0x118]
xor eax, eax
test edx, edx
je 0x40447d
cmp dword [ebp + eax*4 - 0x114], edi
je 0x40447d
inc eax
cmp eax, edx
jb 0x40446f
cmp eax, edx
jne 0x404493
cmp edx, 0x40
jae 0x404493
mov dword [ebp + eax*4 - 0x114], edi
inc dword [ebp - 0x118]
mov edx, dword [ecx + 0x8c]
mov eax, edx
shr eax, 0xe
not al
test al, 1
je 0x4044e0
mov eax, dword [ebp - 0x220]
xor edx, edx
test eax, eax
je 0x4044c1
mov edi, dword [ecx + 0x30]
cmp dword [ebp + edx*4 - 0x21c], edi
je 0x4044c1
inc edx
cmp edx, eax
jb 0x4044b3
cmp edx, eax
jne 0x4044da
cmp eax, 0x40
jae 0x4044da
mov eax, dword [ecx + 0x30]
mov dword [ebp + edx*4 - 0x21c], eax
inc dword [ebp - 0x220]
mov edx, dword [ecx + 0x8c]
test dl, 0x20
jne 0x4044ef
cmp dword [ecx + 0x50], 0
jbe 0x404525
test dl, dl
js 0x404525
mov eax, dword [ebp - 0x328]
xor edx, edx
test eax, eax
je 0x40450c
mov edi, dword [ecx + 0x30]
cmp dword [ebp + edx*4 - 0x324], edi
je 0x40450c
inc edx
cmp edx, eax
jb 0x4044fe
cmp edx, eax
jne 0x404525
cmp eax, 0x40
jae 0x404525
mov eax, dword [ecx + 0x30]
mov dword [ebp + edx*4 - 0x324], eax
inc dword [ebp - 0x328]
cmp dword [ecx + 0x30], esi
cmova esi, dword [ecx + 0x30]
mov ecx, dword [ecx]
test ecx, ecx
jne 0x404417
mov edi, dword [ebp - 0x32c]
mov eax, dword [ebp - 0x330]
push eax
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [esi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x404586
test esi, esi
jne 0x404571
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
and dword [ebp - 0x220], 0
and dword [ebp - 0x328], 0
and dword [ebp - 0x118], 0
mov esi, dword [edi]
test esi, esi
je 0x404629
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
cmp dword [esi + 0x30], 0xffffffff
je 0x4045d8
lea eax, [ebp - 0x118]
push eax
push dword [esi + 0x30]
call edi
test eax, eax
je 0x4045bb
push str.socket_error
push esi
call fcn.00401d1f
pop ecx
pop ecx
jmp 0x40461f
cmp dword [esi + 0x30], 0xffffffff
je 0x4045d8
lea eax, [ebp - 0x220]
push eax
push dword [esi + 0x30]
call edi
test eax, eax
je 0x4045d8
mov ecx, 0x10000
jmp 0x4045da
xor ecx, ecx
mov eax, dword [esi + 0x8c]
and eax, 0xfffeffff
or eax, ecx
cmp dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x8c], eax
je 0x40460a
lea eax, [ebp - 0x328]
push eax
push dword [esi + 0x30]
call edi
test eax, eax
je 0x40460a
mov ecx, 0x20000
jmp 0x40460c
xor ecx, ecx
mov eax, dword [esi + 0x8c]
and eax, 0xfffdffff
or eax, ecx
mov dword [esi + 0x8c], eax
mov esi, dword [esi]
test esi, esi
jne 0x404596
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404b90
leave
ret