Function at 0x5be1b7
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x320
mov ebx, dword [ebp + 8]
mov eax, dword [0x7a8498]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x110]
mov esi, 0x100
mov edi, 0xff
push esi
push edi
push eax
call fcn.006ccfc0
add esp, 0xc
lea eax, [ebp - 0x214]
push esi
push edi
push eax
call fcn.006ccfc0
add esp, 0xc
lea eax, [ebp - 0x318]
push esi
push edi
push eax
call fcn.006ccfc0
add esp, 0xc
test ebx, ebx
je 0x5be227
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x5be227
mov edx, ebx
xor eax, eax
cmp dword [edx + eax*8], 0xffffffff
jne 0x5be24e
inc eax
cmp esi, eax
jne 0x5be21c
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.005be044
add esp, 8
mov esi, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006c9121
mov eax, esi
add esp, 0x320
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
mov dword [ebp - 0x114], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x31c], ebx
mov dword [ebp - 0x328], 0
xor edi, edi
xor eax, eax
mov word [edx + eax*8 + 6], 0
mov ecx, dword [edx + eax*8]
cmp ecx, 0xffffffff
je 0x5be374
movzx edx, word [edx + eax*8 + 4]
test edx, 0x710
je 0x5be371
test edx, 0x300
je 0x5be2d2
xor esi, esi
test edi, edi
je 0x5be2b2
cmp dword [ebp + esi*4 - 0x110], ecx
je 0x5be2b2
inc esi
cmp edi, esi
jne 0x5be2a2
mov esi, edi
cmp esi, edi
jne 0x5be2cf
cmp edi, 0x3f
ja 0x5be2cf
mov dword [ebp + edi*4 - 0x110], ecx
mov edi, dword [ebp - 0x114]
inc edi
mov dword [ebp - 0x114], edi
mov esi, dword [ebp + 0xc]
test dl, 0x10
je 0x5be336
cmp dword [ebp - 0x328], 0
mov dword [ebp - 0x32c], edi
je 0x5be302
xor esi, esi
cmp dword [ebp + esi*4 - 0x214], ecx
je 0x5be304
inc esi
cmp dword [ebp - 0x328], esi
jne 0x5be2e8
mov esi, dword [ebp - 0x328]
jmp 0x5be304
xor esi, esi
mov edi, dword [ebp - 0x328]
cmp esi, edi
jne 0x5be32d
cmp edi, 0x3f
ja 0x5be32d
mov dword [ebp + edi*4 - 0x214], ecx
mov esi, dword [ebp - 0x218]
inc esi
mov dword [ebp - 0x328], esi
mov dword [ebp - 0x218], esi
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x32c]
test edx, 0x600
je 0x5be371
xor edx, edx
test ebx, ebx
je 0x5be354
cmp dword [ebp + edx*4 - 0x318], ecx
je 0x5be354
inc edx
cmp ebx, edx
jne 0x5be344
mov edx, ebx
cmp edx, ebx
jne 0x5be371
cmp ebx, 0x3f
ja 0x5be371
mov dword [ebp + ebx*4 - 0x318], ecx
mov ebx, dword [ebp - 0x31c]
inc ebx
mov dword [ebp - 0x31c], ebx
mov edx, dword [ebp + 8]
inc eax
cmp eax, esi
jne 0x5be270
xor eax, eax
dec eax
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], eax
test edi, edi
mov eax, dword [ebp - 0x328]
jne 0x5be3b1
test eax, eax
jne 0x5be3b1
test ebx, ebx
jne 0x5be3b1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.005be044
add esp, 8
jmp 0x5be444
mov ecx, dword [ebp + 0x14]
test ecx, ecx
mov esi, dword [ebp + 0x10]
js 0x5be3f2
mov eax, esi
or eax, ecx
je 0x5be3fc
push 0
push 0x3e8
push ecx
push esi
call fcn.006c95b0
imul ecx, eax, 0x3e8
sub esi, ecx
mov ecx, bind
cmp eax, ecx
sbb edx, 0
cmovb ecx, eax
mov dword [ebp - 0x324], ecx
imul ecx, esi, 0x3e8
jmp 0x5be408
xor eax, eax
mov esi, dword [ebp - 0x328]
jmp 0x5be417
mov dword [ebp - 0x324], 0
xor ecx, ecx
mov esi, dword [ebp - 0x328]
lea eax, [ebp - 0x324]
mov dword [eax + 4], ecx
test ebx, ebx
lea ecx, [ebp - 0x31c]
cmove ecx, ebx
test esi, esi
lea edx, [ebp - 0x218]
cmove edx, esi
test edi, edi
lea esi, [ebp - 0x114]
cmove esi, edi
push eax
push ecx
push edx
push esi
push 0
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test eax, eax
mov ecx, dword [ebp + 8]
jle 0x5be237
xor edx, edx
inc edx
mov eax, dword [ebp + 0xc]
cmp eax, 2
cmovae edx, eax
mov dword [ebp - 0x328], edx
xor esi, esi
xor ebx, ebx
mov word [ecx + ebx*8 + 6], 0
mov eax, dword [ecx + ebx*8]
cmp eax, 0xffffffff
je 0x5be50b
lea edi, [ebx*4]
lea ecx, [ebp - 0x114]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x5be4b0
mov eax, dword [ecx + ebx*8 + 4]
bt eax, 8
jae 0x5be4a4
or byte [ecx + edi*2 + 7], 1
test eax, 0x300
je 0x5be4b0
or byte [ecx + edi*2 + 7], 3
lea eax, [ebp - 0x218]
push eax
push dword [ecx + edi*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x5be4d2
test byte [ecx + ebx*8 + 4], 0x10
je 0x5be4d2
or byte [ecx + edi*2 + 6], 0x10
lea eax, [ebp - 0x31c]
push eax
push dword [ecx + edi*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x5be502
mov eax, dword [ecx + ebx*8 + 4]
bt eax, 9
jae 0x5be4f7
or byte [ecx + edi*2 + 7], 2
bt eax, 0xa
jae 0x5be502
or byte [ecx + edi*2 + 7], 4
cmp word [ecx + edi*2 + 6], 1
sbb esi, 0xffffffff
inc ebx
cmp dword [ebp - 0x328], ebx
jne 0x5be467
jmp 0x5be237