Function at 0x520a00
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 0x520a71
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 0x520ca0
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 0x520ac1
cmp edx, 1
jne 0x520ca4
mov esi, dword [edi + 4]
cmp esi, 0xffffffff
je 0x520ca4
mov edx, dword [edi + 8]
test edx, edx
je 0x520ae0
cmp edx, 1
jne 0x520ca4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x520ca4
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 0x520b1a
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 1
cmp eax, 0xffffffff
sete dl
test cl, 2
sete cl
or cl, dl
jne 0x520b3c
mov dword [esp + 0x22c], eax
mov dword [esp + 0x228], 1
cmp esi, 0xffffffff
je 0x520c90
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 0x520b7a
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 0x520ca4
cmp eax, esi
cmovg esi, eax
inc esi
cmp ecx, 0xffffffff
je 0x520c4d
nop
call fcn.005e93d0
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.0078a290
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 0x520c70
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
je 0x520ba0
jmp 0x520ca4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x520ca4
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 0x520c40
mov ebx, dword [esp + 0x14]
test eax, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
jns 0x520a18
jmp 0x520ca4
xor ecx, ecx
cmp eax, 0xffffffff
jne 0x520b6b
jmp 0x520b7a
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret