Function at 0x461360
Capabilities:
Get socket status

Disassembly:
sub esp, 0x340
push ebx
push ebp
mov ebp, dword [esp + 0x35c]
xor eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], eax
push esi
push edi
test ebp, ebp
jl 0x4613ad
jg 0x4613a4
mov edi, dword [esp + 0x360]
cmp edi, 0x7fffffff
jb 0x4613b4
mov edi, accept
xor ebp, ebp
jmp 0x4613b4
mov edi, dword [esp + 0x360]
mov ecx, dword [esp + 0x354]
mov ebx, dword [esp + 0x358]
cmp ecx, 0xffffffff
jne 0x461408
cmp ebx, 0xffffffff
jne 0x461408
cmp dword [esp + 0x35c], ebx
jne 0x461408
test edi, edi
je 0x4613fb
jns 0x4613f4
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret
test ebp, ebp
jl 0x461443
jg 0x461412
test edi, edi
je 0x461443
lea eax, [esp + 0x34]
mov dword [esp + 0x14], edi
push eax
call fcn.0046ad30
add esp, 4
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x354]
jmp 0x461447
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], eax
or edx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], edx
xor esi, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x148], esi
cmp ecx, 0xffffffff
je 0x461489
mov esi, 1
mov dword [esp + 0x14c], ecx
mov eax, esi
mov dword [esp + 0x148], esi
mov dword [esp + 0x48], ecx
mov edx, ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x10], ecx
cmp ebx, 0xffffffff
je 0x4614f0
xor ecx, ecx
test esi, esi
je 0x4614a2
cmp dword [esp + ecx*4 + 0x14c], ebx
je 0x4614a2
inc ecx
cmp ecx, esi
jb 0x461494
cmp ecx, esi
jne 0x4614c1
cmp esi, 0x40
jae 0x4614c1
mov dword [esp + ecx*4 + 0x14c], ebx
mov esi, dword [esp + 0x148]
inc esi
mov dword [esp + 0x148], esi
xor ecx, ecx
test eax, eax
je 0x4614d2
cmp dword [esp + ecx*4 + 0x48], ebx
je 0x4614d2
inc ecx
cmp ecx, eax
jb 0x4614c7
cmp ecx, eax
jne 0x4614e8
cmp eax, 0x40
jae 0x4614e8
mov dword [esp + ecx*4 + 0x48], ebx
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
cmp ebx, edx
jbe 0x4614f0
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x35c]
mov dword [esp + 0x24c], 0
cmp edx, 0xffffffff
je 0x461548
xor ecx, ecx
mov dword [esp + 0x250], edx
mov dword [esp + 0x24c], 1
test eax, eax
je 0x46152b
nop
cmp dword [esp + ecx*4 + 0x48], edx
je 0x46152b
inc ecx
cmp ecx, eax
jb 0x461520
cmp ecx, eax
jne 0x46153c
cmp eax, 0x40
jae 0x46153c
mov dword [esp + ecx*4 + 0x48], edx
inc dword [esp + 0x44]
mov eax, dword [esp + 0x10]
cmp edx, eax
jbe 0x46154c
mov eax, edx
jmp 0x46154c
mov eax, dword [esp + 0x10]
test ebp, ebp
jg 0x461560
jl 0x461556
test edi, edi
jae 0x461560
mov dword [esp + 0x10], 0
jmp 0x461568
lea ecx, [esp + 0x28]
mov dword [esp + 0x10], ecx
inc eax
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x14]
test ebp, ebp
jl 0x4615a4
jg 0x46157b
test edi, edi
je 0x4615a4
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [esp + 0x2c], eax
jmp 0x4615b2
mov eax, edi
or eax, ebp
jne 0x4615b2
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
push dword [esp + 0x10]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x254]
lea ecx, [esp + 0x254]
neg eax
sbb eax, eax
and eax, ecx
neg esi
push eax
sbb esi, esi
lea eax, [esp + 0x154]
and esi, eax
push esi
push dword [esp + 0x40]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x461697
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x461613
cmp dword [0x5219e0], 0
jne 0x4613e6
cmp eax, 0x2714
jne 0x4613e6
test ebp, ebp
jl 0x461620
jg 0x46162c
test edi, edi
jne 0x46162c
lea ecx, [ecx]
mov esi, dword [esp + 0x148]
jmp 0x46156d
lea eax, [esp + 0x34]
push eax
call fcn.0046ad30
mov edx, eax
sub esp, 0xc
mov eax, dword [esp + 0x28]
mov ecx, esp
sub esp, 0x10
mov dword [ecx], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x40]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x44]
mov dword [ecx + 0xc], eax
mov ecx, esp
mov eax, dword [edx]
mov dword [ecx], eax
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0xc]
mov dword [ecx + 0xc], eax
call fcn.0046ade0
mov ecx, edi
add esp, 0x20
sub ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
jle 0x4613fb
mov esi, dword [esp + 0x148]
jmp 0x461571
test eax, eax
js 0x4613e6
je 0x4613fb
mov edi, dword [esp + 0x354]
xor esi, esi
cmp edi, 0xffffffff
je 0x4616dc
lea eax, [esp + 0x148]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4616ca
mov esi, 1
lea eax, [esp + 0x44]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4616dc
or esi, 4
cmp ebx, 0xffffffff
je 0x461708
lea eax, [esp + 0x148]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4616f6
or esi, 8
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x461708
or esi, 4
mov ebx, dword [esp + 0x35c]
cmp ebx, 0xffffffff
je 0x46173b
lea eax, [esp + 0x24c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x461729
or esi, 2
lea eax, [esp + 0x44]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x46173b
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret