Function at 0x54f510
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bdc7b
mov eax, dword fs:[0]
push eax
sub esp, 0x884
mov eax, dword [0x68683c]
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 eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x878], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x884], ebx
mov dword [ebp - 0x874], esi
mov byte [ebp - 0x865], 0
mov edi, eax
cmp eax, 0xabcd0123
jne 0x54f577
mov byte [ebp - 0x865], 1
mov edi, 1
mov ecx, esi
call fcn.004babe0
cmp dword [ebx + 0x294], 0xffffffff
jne 0x54f5a2
mov ecx, dword [ebp - 0x878]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Invalid_socket.
call eax
mov byte [esi + 0x16], 1
jmp 0x54f7e1
mov eax, dword [esi + 4]
xor ebx, ebx
mov dword [ebp - 0x86c], ebx
cmp eax, ebx
je 0x54f5d4
mov eax, dword [eax + 0x88]
mov dword [ebp - 0x86c], eax
cmp eax, ebx
je 0x54f5d4
mov eax, 0x32
cmp dword [ebp - 0x86c], eax
jae 0x54f5d4
mov dword [ebp - 0x86c], eax
cmp edi, ebx
jne 0x54f5dd
mov edi, 0xc042c00
cmp dword [ebp - 0x86c], ebx
jne 0x54f5fa
mov ecx, esi
call fcn.004bac00
test al, al
je 0x54f5fa
mov dword [ebp - 0x86c], 0x42
xor eax, eax
mov dword [ebp - 0x870], ebx
lea ecx, [ebp - 0x864]
mov bl, 1
mov dword [ebp - 0x880], eax
mov dword [ebp - 0x87c], eax
call fcn.0044d6b0
mov eax, 0x3004bc8d
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 4], eax
cmp edi, eax
jbe 0x54f7b8
mov esi, dword [ebp - 0x86c]
mov ecx, esi
test ecx, ecx
jne 0x54f651
mov esi, 0x14d
mov eax, edi
sub eax, dword [ebp - 0x870]
cmp esi, eax
jbe 0x54f65f
mov esi, eax
test ecx, ecx
je 0x54f669
cmp esi, ecx
jbe 0x54f669
mov esi, ecx
test bl, bl
je 0x54f679
shr esi, 1
cmp esi, 1
jae 0x54f679
mov esi, 1
test edi, edi
je 0x54f683
cmp esi, edi
jbe 0x54f683
mov esi, edi
mov eax, 0x10624dd3
mul esi
shr edx, 6
mov ecx, edx
imul ecx, ecx, 0x3e8
mov eax, esi
sub eax, ecx
imul eax, eax, 0x3e8
push 0x40
mov dword [ebp - 0x880], edx
lea edx, [ebp - 0x54]
push 0
push edx
mov dword [ebp - 0x87c], eax
mov dword [ebp - 0x858], 0
call sub.MSVCR100.dll_memset
mov ebx, 0x3004bc8d
add esp, 0xc
cmp dword [ebp - 0x85c], ebx
je 0x54f6dc
push 0
call fcn.0040b200
add esp, 4
cmp dword [ebp - 0x14], ebx
je 0x54f6eb
push 0
call fcn.0040b200
add esp, 4
mov eax, dword [ebp - 0x884]
mov edx, dword [eax + 0x294]
test edx, edx
js 0x54f801
mov ecx, dword [ebp - 0x858]
xor eax, eax
test ecx, ecx
je 0x54f71e
jmp 0x54f710
cmp dword [ebp + eax*4 - 0x854], edx
je 0x54f71e
inc eax
cmp eax, ecx
jb 0x54f710
cmp eax, ecx
jne 0x54f737
cmp ecx, 0x200
jae 0x54f737
mov dword [ebp + eax*4 - 0x854], edx
inc dword [ebp - 0x858]
lea ecx, [ebp - 0x880]
push ecx
push 0
push 0
lea edx, [ebp - 0x858]
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x54f85b
test eax, eax
js 0x54f85b
jne 0x54f81f
cmp byte [ebp - 0x865], 0
jne 0x54f7b0
add dword [ebp - 0x870], esi
test edi, edi
je 0x54f786
mov eax, dword [ebp - 0x870]
inc eax
cmp eax, edi
jae 0x54f7b0
mov esi, dword [ebp - 0x878]
mov ebx, dword [ebp - 0x874]
push esi
mov ecx, ebx
call fcn.004bac10
test al, al
jne 0x54f835
xor bl, bl
cmp dword [ebp - 0x870], edi
jb 0x54f640
mov esi, dword [ebp - 0x874]
xor eax, eax
mov byte [esi + 0x14], 1
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - method.ckFdSet.virtual_0], vtable.ckFdSet.0
call fcn.0044d6c0
xor al, al
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.005a6cf8
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x874]
mov byte [ecx + 0x16], 1
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.0054d8b0
jmp 0x54f7e1
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.0054d8b0
mov al, 1
jmp 0x54f7e3
mov byte [ebx + 0x15], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.socket_operation_aborted_by_application
mov ecx, esi
call eax
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.0054d8b0
jmp 0x54f7e1
mov ecx, dword [ebp - 0x878]
push str.waitReadableSocket
push ecx
lea ecx, [ebp - 0x890]
call fcn.0045a1b0
lea ecx, [ebp - 0x890]
call fcn.0045a240
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x14], 0
jmp 0x54f7c5