Function at 0x501180
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c1e10
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x68cc00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x88c], ecx
mov esi, dword [ebp + 0xc]
mov ebx, 1
cmp dword [ebp + 8], 0xabcd0123
mov ecx, esi
mov edi, dword [ebp + 0x10]
cmovne ebx, dword [ebp + 8]
mov dword [ebp - 0x880], esi
mov dword [ebp - 0x888], edi
call fcn.0046d400
mov eax, dword [ebp - 0x88c]
cmp dword [eax + 0x294], 0xffffffff
jne 0x501203
mov eax, dword [edi]
mov ecx, edi
push str.Invalid_socket.
call dword [eax + 0x14]
mov byte [esi + 0x16], 1
xor al, al
jmp 0x501467
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
je 0x501220
mov edi, dword [eax + 0x88]
test edi, edi
je 0x501220
mov eax, 0x32
cmp edi, eax
cmovb edi, eax
test ebx, ebx
mov eax, 0xc042c00
cmove ebx, eax
test edi, edi
jne 0x50123f
mov ecx, esi
call fcn.0046d4a0
test al, al
mov ecx, 0x42
cmovne edi, ecx
lea ecx, [ebp - 0x878]
mov dword [ebp - 0x884], 0
mov byte [ebp - 0x879], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.00429fb0
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x870], 0x3004bc8d
mov dword [ebp - 0x28], 0x3004bc8d
mov dword [ebp - 4], 0
test ebx, ebx
je 0x501439
mov al, byte [ebp - 0x879]
xor ecx, ecx
mov esi, ebx
mov edx, 0x14d
sub esi, ecx
test edi, edi
jne 0x5012af
cmp esi, edx
cmovae esi, edx
jmp 0x5012b9
cmp edi, esi
cmovbe esi, edi
cmp esi, edi
cmova esi, edi
test al, al
je 0x5012ca
shr esi, 1
mov eax, 1
cmp esi, 1
cmovb esi, eax
cmp esi, ebx
mov dword [ebp - 0x86c], 0
mov eax, 0x10624dd3
cmova esi, ebx
mul esi
mov ecx, esi
shr edx, 6
imul eax, edx, 0x3e8
push 0x40
push 0
mov dword [ebp - 0x18], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x68]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [ebp - 0x870], 0x3004bc8d
je 0x50131f
push 0
call fcn.004014f0
add esp, 4
cmp dword [ebp - 0x28], 0x3004bc8d
je 0x501332
push 0
call fcn.004014f0
add esp, 4
mov eax, dword [ebp - 0x88c]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x501427
mov ecx, dword [ebp - 0x86c]
xor eax, eax
test ecx, ecx
je 0x501360
cmp dword [ebp + eax*4 - 0x868], edx
je 0x501360
inc eax
cmp eax, ecx
jb 0x501352
cmp eax, ecx
jne 0x501379
cmp ecx, 0x200
jae 0x501379
mov dword [ebp + eax*4 - 0x868], edx
inc dword [ebp - 0x86c]
lea eax, [ebp - 0x18]
push eax
push 0
push 0
lea eax, [ebp - 0x86c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x5013fb
test eax, eax
js 0x5013fb
jne 0x5013f7
cmp dword [ebp + 8], 0xabcd0123
je 0x501433
mov eax, dword [ebp - 0x884]
add eax, esi
mov esi, dword [ebp - 0x880]
mov dword [ebp - 0x884], eax
inc eax
cmp eax, ebx
jae 0x501439
push dword [ebp - 0x888]
mov ecx, esi
call fcn.0046d560
test al, al
jne 0x5013e1
mov ecx, dword [ebp - 0x884]
cmp ecx, ebx
jae 0x501439
jmp 0x50129b
mov ecx, dword [ebp - 0x888]
mov byte [esi + 0x15], 1
push str.socket_operation_aborted_by_application
mov eax, dword [ecx]
call dword [eax + 0x14]
jmp 0x50143d
mov bl, 1
jmp 0x50143f
push str.waitReadableSocket
push dword [ebp - 0x888]
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x24]
movq qword [ebp - 0x24], xmm0
call fcn.00447ef0
lea ecx, [ebp - 0x24]
call fcn.00447ff0
jmp 0x50143d
mov eax, dword [ebp - 0x880]
mov byte [eax + 0x16], 1
jmp 0x50143d
mov esi, dword [ebp - 0x880]
mov byte [esi + 0x14], 1
xor bl, bl
lea ecx, [ebp - 0x878]
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x870], 0
mov dword [ebp - 0x28], 0
call fcn.0042a050
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005af5a8
mov esp, ebp
pop ebp
ret 0xc