Function at 0x513e90
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7482ab
mov eax, dword fs:[0]
push eax
sub esp, 0x884
mov eax, dword [0x899944]
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 0x513ef7
mov byte [ebp - 0x865], 1
mov edi, 1
mov ecx, esi
call fcn.004a71c0
cmp dword [ebx + 0xb4], 0xffffffff
jne 0x513f22
mov ecx, dword [ebp - 0x878]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Invalid_socket.
call eax
mov byte [esi + 0x12], 1
jmp 0x514161
mov eax, dword [esi + 4]
xor ebx, ebx
mov dword [ebp - 0x86c], ebx
cmp eax, ebx
je 0x513f54
mov eax, dword [eax + 0x88]
mov dword [ebp - 0x86c], eax
cmp eax, ebx
je 0x513f54
mov eax, 0x32
cmp dword [ebp - 0x86c], eax
jae 0x513f54
mov dword [ebp - 0x86c], eax
cmp edi, ebx
jne 0x513f5d
mov edi, 0xc042c00
cmp dword [ebp - 0x86c], ebx
jne 0x513f7a
mov ecx, esi
call fcn.004a71e0
test al, al
je 0x513f7a
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.0046e410
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 0x514138
mov esi, dword [ebp - 0x86c]
mov ecx, esi
test ecx, ecx
jne 0x513fd1
mov esi, 0x14d
mov eax, edi
sub eax, dword [ebp - 0x870]
cmp esi, eax
jbe 0x513fdf
mov esi, eax
test ecx, ecx
je 0x513fe9
cmp esi, ecx
jbe 0x513fe9
mov esi, ecx
test bl, bl
je 0x513ff9
shr esi, 1
cmp esi, 1
jae 0x513ff9
mov esi, 1
test edi, edi
je 0x514003
cmp esi, edi
jbe 0x514003
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 fcn.0070dc20
mov ebx, 0x3004bc8d
add esp, 0xc
cmp dword [ebp - 0x85c], ebx
je 0x51405c
push 0
call fcn.0040a460
add esp, 4
cmp dword [ebp - 0x14], ebx
je 0x51406b
push 0
call fcn.0040a460
add esp, 4
mov eax, dword [ebp - 0x884]
mov edx, dword [eax + 0xb4]
test edx, edx
js 0x514181
mov ecx, dword [ebp - 0x858]
xor eax, eax
test ecx, ecx
je 0x51409e
jmp 0x514090
cmp dword [ebp + eax*4 - 0x854], edx
je 0x51409e
inc eax
cmp eax, ecx
jb 0x514090
cmp eax, ecx
jne 0x5140b7
cmp ecx, 0x200
jae 0x5140b7
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 0x5141db
test eax, eax
js 0x5141db
jne 0x51419f
cmp byte [ebp - 0x865], 0
jne 0x514130
add dword [ebp - 0x870], esi
test edi, edi
je 0x514106
mov eax, dword [ebp - 0x870]
inc eax
cmp eax, edi
jae 0x514130
mov esi, dword [ebp - 0x878]
mov ebx, dword [ebp - 0x874]
push esi
mov ecx, ebx
call fcn.004a71f0
test al, al
jne 0x5141b5
xor bl, bl
cmp dword [ebp - 0x870], edi
jb 0x513fc0
mov esi, dword [ebp - 0x874]
xor eax, eax
mov byte [esi + 0x10], 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.0046e300
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.0070bb4c
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x874]
mov byte [ecx + 0x12], 1
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.00512180
jmp 0x514161
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xffffffff
call fcn.00512180
mov al, 1
jmp 0x514163
mov byte [ebx + 0x11], 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.00512180
jmp 0x514161
mov ecx, dword [ebp - 0x878]
push str.waitReadableSocket
push ecx
lea ecx, [ebp - 0x890]
call fcn.00474ef0
lea ecx, [ebp - 0x890]
call fcn.00474f80
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x14], 0
jmp 0x514145