Function at 0x51ee40
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x330
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov ecx, 0
test bl, 1
jne 0x51eeb1
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
push 0
push dword [eax + 0x1c]
lea eax, [esp + 0x28]
push eax
mov eax, dword [ebp + 8]
call dword [eax + 0x18]
add esp, 0xc
movzx eax, byte [esp + 0x20]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x20]
and eax, 1
and ecx, 0xfffffffc
or ecx, eax
movzx eax, byte [esp + 0x21]
and eax, 1
lea eax, [ecx + eax*2]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x20], eax
movsd xmm0, qword [esp + 0x28]
mov eax, dword [ebp + 8]
movsd qword [eax + 0x10], xmm0
mov ecx, ebx
mov dword [esp + 0x14], ecx
push esi
call dword [ebp + 0xc]
add esp, 4
test eax, eax
jne 0x51f0e0
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x10], eax
mov edx, dword [edi]
mov ebx, dword [edi + 0x10]
mov eax, 0xffffffff
mov dword [esp + 0xc], 0
mov esi, 0xffffffff
test edx, edx
je 0x51ef01
cmp edx, 1
jne 0x51f0e4
mov esi, dword [edi + 4]
cmp esi, 0xffffffff
je 0x51f0e4
mov edx, dword [edi + 8]
test edx, edx
je 0x51ef20
cmp edx, 1
jne 0x51f0e4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x51f0e4
mov dword [esp + 0x20], 0
mov dword [esp + 0x228], 0
mov dword [esp + 0x124], 0
cmp esi, 0xffffffff
sete dl
test cl, 1
sete dh
or dh, dl
jne 0x51ef5a
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 1
cmp eax, 0xffffffff
sete dl
test cl, 2
sete cl
or cl, dl
jne 0x51ef7c
mov dword [esp + 0x22c], eax
mov dword [esp + 0x228], 1
cmp esi, 0xffffffff
je 0x51f0d0
cmp eax, 0xffffffff
setne dl
mov dword [esp + 0x128], esi
mov dword [esp + 0x124], 1
cmp esi, eax
setne dh
mov ecx, 1
test dh, dl
je 0x51efba
mov dword [esp + ecx*4 + 0x128], eax
inc ecx
mov dword [esp + 0x124], ecx
mov edx, eax
and edx, esi
mov ecx, ebx
and ecx, dword [esp + 0x10]
and edx, ecx
cmp edx, 0xffffffff
je 0x51f0e4
cmp eax, esi
cmovg esi, eax
inc esi
cmp ecx, 0xffffffff
je 0x51f08d
nop
call fcn.005e7810
mov edi, ebx
sub edi, eax
mov eax, dword [esp + 0x10]
sbb eax, edx
mov ecx, 0
cmovb eax, ecx
cmovb edi, ecx
add edi, 0x3e7
adc eax, 0
mov ecx, 0xffffffff
cmovb eax, ecx
cmovb edi, ecx
push 0
push 0x3b9aca00
push eax
push edi
call fcn.00788230
add esp, 0x10
mov ecx, eax
imul eax, eax, 0x3b9aca00
sub edi, eax
mov eax, edi
mov edx, 0x10624dd3
mul edx
shr edx, 6
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x230]
push eax
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x51f0b0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x51efe0
jmp 0x51f0e4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x51f0e4
push 0
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x230]
push eax
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x51f080
mov ebx, dword [esp + 0x14]
test eax, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
jns 0x51ee58
jmp 0x51f0e4
xor ecx, ecx
cmp eax, 0xffffffff
jne 0x51efab
jmp 0x51efba
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret