Function at 0x520130
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffff
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x80c]
mov dword [ecx + 8], eax
mov dword [ebp - 0x24], 0
jmp 0x520164
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x80c]
jae 0x52018b
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x38]
mov eax, dword [esi + eax*4 + 0x810]
mov dword [edx + ecx*4 + 0xc], eax
jmp 0x52015b
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
jne 0x5201ad
push str.No_sockets_exists_for_fdSetSelect.
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x520337
mov eax, dword [ebp + 8]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
imul edx, edx, 0x3e8
mov eax, dword [ebp + 8]
sub eax, edx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
movzx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x52020b
lea edx, [ebp - 0x20]
push edx
push 0
push 0
mov eax, dword [ebp - 0x38]
add eax, 8
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
jmp 0x520227
lea edx, [ebp - 0x20]
push edx
push 0
mov eax, dword [ebp - 0x38]
add eax, 8
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0xffffffff
jne 0x520250
push str.select_system_call_failed.
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x38]
call fcn.0051fdc0
xor al, al
jmp 0x520337
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 8], 0
jne 0x520268
mov ecx, dword [ebp - 0x38]
call fcn.0051fdc0
mov al, 1
jmp 0x520337
call fcn.00576590
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x52027d
xor al, al
jmp 0x520337
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x520298
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 4]
jge 0x5202fd
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x80c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], 0
jmp 0x5202be
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x28]
jge 0x5202fb
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
mov ecx, dword [edx + ecx*4 + 0xc]
cmp ecx, dword [esi + eax*4 + 0x810]
jne 0x5202f9
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 4]
call fcn.00576800
push eax
mov ecx, dword [ebp - 0x14]
call fcn.00576af0
jmp 0x5202fb
jmp 0x5202b5
jmp 0x52028f
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x520325
push 1
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x30]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x3c], eax
jmp 0x52032c
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 4], edx
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 0x10