Function at 0x58fc50
Capabilities:
Get socket status

Disassembly:
push 0xffffffffffffffff
push 0x6518fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x878
mov eax, dword [esp + 0x888]
push ebx
push ebp
push esi
mov ebx, ecx
push edi
cmp eax, 0xabcd0123
mov dword [esp + 0x24], ebx
mov byte [esp + 0x13], 0
mov edi, eax
jne 0x58fc94
mov byte [esp + 0x13], 1
mov edi, 1
mov esi, dword [esp + 0x89c]
mov ecx, esi
call fcn.00514cb0
cmp dword [ebx + 0x294], 0xffffffff
jne 0x58fcc5
mov ecx, dword [esp + 0x8a0]
push str.Invalid_socket.
mov eax, dword [ecx]
call dword [eax + 0x14]
mov byte [esi + 0x16], 1
jmp 0x58feb8
mov eax, dword [esi + 4]
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x14], ebp
je 0x58fcf1
mov eax, dword [eax + 0x88]
cmp eax, ebp
mov dword [esp + 0x14], eax
je 0x58fcf1
mov ecx, dword [esp + 0x14]
mov eax, 0x32
cmp ecx, eax
jae 0x58fcf1
mov dword [esp + 0x14], eax
cmp edi, ebp
jne 0x58fcfa
mov edi, 0xc042c00
cmp dword [esp + 0x14], ebp
jne 0x58fd13
mov ecx, esi
call fcn.00514ce0
test al, al
je 0x58fd13
mov dword [esp + 0x14], 0x42
mov ecx, dword [ebx + 0x294]
push ecx
call fcn.004f04f0
add esp, 4
test al, al
je 0x58fd6c
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x8a0]
lea eax, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [ebx + 0x294]
push ecx
push ebp
push 1
push edi
push edx
push eax
mov dword [esp + 0x38], ebp
call fcn.005df580
add esp, 0x20
test al, al
je 0x58feb8
cmp dword [esp + 0x18], ebp
jle 0x58feb8
mov al, 1
jmp 0x58feba
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], ebp
mov bl, 1
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
call fcn.0058b450
cmp edi, ebp
mov dword [esp + 0x890], ebp
jbe 0x58fea0
mov ebp, dword [esp + 0x8a0]
mov esi, dword [esp + 0x14]
mov ecx, esi
test ecx, ecx
jne 0x58fda8
mov esi, 0x14d
mov edx, dword [esp + 0x18]
mov eax, edi
sub eax, edx
cmp esi, eax
jbe 0x58fdb6
mov esi, eax
test ecx, ecx
je 0x58fdc0
cmp esi, ecx
jbe 0x58fdc0
mov esi, ecx
test bl, bl
je 0x58fdd0
shr esi, 1
cmp esi, 1
jae 0x58fdd0
mov esi, 1
test edi, edi
jbe 0x58fdda
cmp esi, edi
jbe 0x58fdda
mov esi, edi
mov eax, 0x10624dd3
mul esi
shr edx, 6
mov dword [esp + 0x1c], edx
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, esi
shl ecx, 3
sub eax, ecx
lea ecx, [esp + 0x34]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 0x20], eax
call fcn.0058b4b0
mov edx, dword [esp + 0x24]
push ebp
lea ecx, [esp + 0x38]
mov eax, dword [edx + 0x294]
push eax
call fcn.0058b500
test al, al
je 0x58fed5
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x40]
push ecx
push 0
push 0
push edx
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x58ff0d
test eax, eax
jl 0x58ff0d
jne 0x58fee2
mov al, byte [esp + 0x13]
test al, al
jne 0x58fe99
mov ecx, dword [esp + 0x18]
add ecx, esi
test edi, edi
mov dword [esp + 0x18], ecx
je 0x58fe78
mov eax, ecx
inc eax
cmp eax, edi
jae 0x58fe99
mov esi, dword [esp + 0x89c]
push ebp
mov ecx, esi
call fcn.00514cf0
test al, al
jne 0x58fefa
mov eax, dword [esp + 0x18]
xor bl, bl
cmp eax, edi
jb 0x58fd99
mov esi, dword [esp + 0x89c]
mov byte [esi + 0x14], 1
lea ecx, [esp + 0x34]
mov dword [esp + 0x890], 0xffffffff
call fcn.0058b490
xor al, al
mov ecx, dword [esp + 0x888]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x884
ret 0xc
mov ecx, dword [esp + 0x89c]
mov byte [ecx + 0x16], 1
jmp 0x58fea4
lea ecx, [esp + 0x34]
mov dword [esp + 0x890], 0xffffffff
call fcn.0058b490
mov al, 1
jmp 0x58feba
mov byte [esi + 0x15], 1
mov edx, dword [ebp]
push str.socket_operation_aborted_by_application
mov ecx, ebp
call dword [edx + 0x14]
jmp 0x58fea4
push str.waitReadableSocket
push ebp
lea ecx, [esp + 0x30]
call fcn.004f0370
lea ecx, [esp + 0x28]
call fcn.004f03e0
jmp 0x58fea4