Function at 0x502290
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c5e70
mov eax, dword fs:[0]
push eax
sub esp, 0x880
mov eax, dword [0x692c00]
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.0046ecc0
mov eax, dword [ebp - 0x88c]
cmp dword [eax + 0x294], 0xffffffff
jne 0x502313
mov eax, dword [edi]
mov ecx, edi
push str.Invalid_socket.
call dword [eax + 0x14]
mov byte [esi + 0x16], 1
xor al, al
jmp 0x502577
mov eax, dword [esi + 4]
xor edi, edi
test eax, eax
je 0x502330
mov edi, dword [eax + 0x88]
test edi, edi
je 0x502330
mov eax, 0x32
cmp edi, eax
cmovb edi, eax
test ebx, ebx
mov eax, 0xc042c00
cmove ebx, eax
test edi, edi
jne 0x50234f
mov ecx, esi
call fcn.0046ed60
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.0042a200
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 0x502549
mov al, byte [ebp - 0x879]
xor ecx, ecx
mov esi, ebx
mov edx, 0x14d
sub esi, ecx
test edi, edi
jne 0x5023bf
cmp esi, edx
cmovae esi, edx
jmp 0x5023c9
cmp edi, esi
cmovbe esi, edi
cmp esi, edi
cmova esi, edi
test al, al
je 0x5023da
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 0x50242f
push 0
call fcn.00401520
add esp, 4
cmp dword [ebp - 0x28], 0x3004bc8d
je 0x502442
push 0
call fcn.00401520
add esp, 4
mov eax, dword [ebp - 0x88c]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x502537
mov ecx, dword [ebp - 0x86c]
xor eax, eax
test ecx, ecx
je 0x502470
cmp dword [ebp + eax*4 - 0x868], edx
je 0x502470
inc eax
cmp eax, ecx
jb 0x502462
cmp eax, ecx
jne 0x502489
cmp ecx, 0x200
jae 0x502489
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 0x50250b
test eax, eax
js 0x50250b
jne 0x502507
cmp dword [ebp + 8], 0xabcd0123
je 0x502543
mov eax, dword [ebp - 0x884]
add eax, esi
mov esi, dword [ebp - 0x880]
mov dword [ebp - 0x884], eax
inc eax
cmp eax, ebx
jae 0x502549
push dword [ebp - 0x888]
mov ecx, esi
call fcn.0046ee20
test al, al
jne 0x5024f1
mov ecx, dword [ebp - 0x884]
cmp ecx, ebx
jae 0x502549
jmp 0x5023ab
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 0x50254d
mov bl, 1
jmp 0x50254f
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.004481f0
lea ecx, [ebp - 0x24]
call fcn.004482f0
jmp 0x50254d
mov eax, dword [ebp - 0x880]
mov byte [eax + 0x16], 1
jmp 0x50254d
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.0042a2a0
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.005b34c8
mov esp, ebp
pop ebp
ret 0xc