Function at 0x50cdd0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x334
mov eax, dword [0x6d35ac]
xor eax, esp
mov dword [esp + 0x330], eax
mov edx, dword [esp + 0x338]
mov dword [esp + 0x14], edx
push esi
test edx, edx
je 0x50ce0c
mov esi, dword [esp + 0x340]
xor eax, eax
test esi, esi
je 0x50ce0c
cmp dword [edx + eax*8], 0xffffffff
jne 0x50ce5a
inc eax
cmp eax, esi
jb 0x50ce01
mov ecx, dword [esp + 0x344]
mov eax, ecx
mov edx, dword [esp + 0x348]
or eax, edx
je 0x50d1c7
test edx, edx
jg 0x50d1b3
jl 0x50ce36
test ecx, ecx
jae 0x50d1a8
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0059a7a2
add esp, 0x334
ret
push ebx
push ebp
push edi
xor ebx, ebx
mov dword [esp + 0x10], 0xffffffff
xor ebp, ebp
mov dword [esp + 0x34], ebx
xor edi, edi
mov dword [esp + 0x138], ebp
xor eax, eax
mov dword [esp + 0x23c], edi
mov dword [esp + 0x14], eax
xor ecx, ecx
mov word [edx + eax*8 + 6], cx
mov ecx, dword [edx + eax*8]
cmp ecx, 0xffffffff
je 0x50cf6d
jae 0x50cfab
movzx edx, word [edx + eax*8 + 4]
test dl, 7
je 0x50cf69
cmp ecx, dword [esp + 0x10]
mov eax, ecx
cmovbe eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
test dl, 1
je 0x50cee5
xor eax, eax
test ebx, ebx
je 0x50cecf
cmp dword [esp + eax*4 + 0x38], ecx
je 0x50cecf
inc eax
cmp eax, ebx
jb 0x50cec4
cmp eax, ebx
jne 0x50cee5
cmp ebx, 0x40
jae 0x50cee5
mov dword [esp + eax*4 + 0x38], ecx
mov ebx, dword [esp + 0x34]
inc ebx
mov dword [esp + 0x34], ebx
test dl, 4
je 0x50cf1d
xor eax, eax
test ebp, ebp
je 0x50cefe
cmp dword [esp + eax*4 + 0x13c], ecx
je 0x50cefe
inc eax
cmp eax, ebp
jb 0x50cef0
cmp eax, ebp
jne 0x50cf1d
cmp ebp, 0x40
jae 0x50cf1d
mov dword [esp + eax*4 + 0x13c], ecx
mov ebp, dword [esp + 0x138]
inc ebp
mov dword [esp + 0x138], ebp
test dl, 2
je 0x50cf65
xor eax, eax
test edi, edi
je 0x50cf3e
nop dword [eax + eax]
cmp dword [esp + eax*4 + 0x240], ecx
je 0x50cf3e
inc eax
cmp eax, edi
jb 0x50cf30
cmp eax, edi
jne 0x50cf5d
cmp edi, 0x40
jae 0x50cf5d
mov dword [esp + eax*4 + 0x240], ecx
mov edi, dword [esp + 0x23c]
inc edi
mov dword [esp + 0x23c], edi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
inc eax
mov dword [esp + 0x14], eax
cmp eax, esi
jb 0x50ce83
test ebx, ebx
jne 0x50d015
test ebp, ebp
jne 0x50d015
test edi, edi
jne 0x50d015
mov ecx, dword [esp + 0x350]
mov eax, ecx
mov edx, dword [esp + 0x354]
or eax, edx
jne 0x50cfd2
jmp 0x50d116
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.0059a7a2
add esp, 0x334
ret
test edx, edx
jg 0x50cffa
jl 0x50cfdc
test ecx, ecx
jae 0x50cfef
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
jmp 0x50d116
test edx, edx
jl 0x50d007
jg 0x50cffa
cmp ecx, 0xffffffff
jb 0x50d007
mov ecx, 0xfffffffe
mov dword [esp + 0x20], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
jmp 0x50d116
mov ecx, dword [esp + 0x354]
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x350]
test ecx, ecx
jg 0x50d054
jl 0x50d035
test eax, eax
jae 0x50d042
mov dword [esp + 0x1c], 0
jmp 0x50d0de
test ecx, ecx
jl 0x50d0ce
jg 0x50d054
test eax, eax
je 0x50d0ce
push 0
push 0x3e8
push ecx
push eax
call fcn.0059b3f0
push 0
push 0x3e8
mov esi, edx
mov dword [esp + 0x1c], eax
push esi
push eax
call fcn.0059b930
mov ecx, dword [esp + 0x350]
sub ecx, eax
mov eax, dword [esp + 0x354]
push 0
push 0x3e8
sbb eax, edx
push eax
push ecx
call fcn.0059b930
mov ecx, eax
test esi, esi
jl 0x50d0c0
jg 0x50d0a9
mov eax, dword [esp + 0x14]
cmp eax, 0x7fffffff
jbe 0x50d0c4
mov eax, accept
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jmp 0x50d0de
mov eax, dword [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jmp 0x50d0de
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
push dword [esp + 0x1c]
xor eax, eax
lea edx, [esp + 0x240]
test edi, edi
lea ecx, [esp + 0x13c]
cmove edx, eax
test ebp, ebp
push edx
cmove ecx, eax
xor esi, esi
test ebx, ebx
lea eax, [esp + 0x3c]
push ecx
cmove eax, esi
push eax
mov eax, dword [esp + 0x20]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x50cfb9
mov esi, dword [esp + 0x24]
xor edi, edi
mov ebx, dword [esp + 0x34c]
add esi, 6
nop
xor eax, eax
mov word [esi], ax
mov eax, dword [esi - 6]
cmp eax, 0xffffffff
je 0x50d199
lea ecx, [esp + 0x34]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x50d156
test byte [esi - 2], 1
je 0x50d156
or word [esi], 1
lea eax, [esp + 0x138]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x50d174
test byte [esi - 2], 4
je 0x50d174
or word [esi], 4
lea eax, [esp + 0x23c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x50d192
test byte [esi - 2], 2
je 0x50d192
or word [esi], 2
cmp word [esi], 0
je 0x50d199
inc edi
add esi, 8
sub ebx, 1
jne 0x50d130
mov eax, edi
jmp 0x50cfb9
test edx, edx
jl 0x50d1c0
jg 0x50d1b3
cmp ecx, 0xffffffff
jb 0x50d1c0
mov ecx, 0xfffffffe
mov dword [esp + 0x1c], 0
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x334]
xor eax, eax
pop esi
xor ecx, esp
call fcn.0059a7a2
add esp, 0x334
ret