Function at 0x514b60
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x324
mov ebx, dword [ebp + 8]
mov eax, dword [0x7aa024]
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.00650600
add esp, 0xc
lea eax, [ebp - 0x214]
push esi
push edi
push eax
call fcn.00650600
add esp, 0xc
lea eax, [ebp - 0x318]
push esi
push edi
push eax
call fcn.00650600
add esp, 0xc
test ebx, ebx
je 0x514bd0
mov edx, ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x514bd0
xor eax, eax
cmp dword [edx + eax*8], 0xffffffff
jne 0x514c0d
inc eax
cmp ebx, eax
jne 0x514bc5
xor ebx, ebx
mov edx, dword [ebp + 0x10]
mov eax, edx
mov esi, dword [ebp + 0x14]
or eax, esi
je 0x514f5f
test esi, esi
js 0x514da5
mov eax, 0xfffffffe
cmp edx, eax
mov ecx, 0xfffffffe
cmovb ecx, edx
test esi, esi
cmovs eax, edx
cmove eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x514f5f
xor edi, edi
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x31c], edi
mov dword [ebp - 0x328], 0
xor esi, esi
xor eax, eax
mov word [edx + eax*8 + 6], 0
mov ecx, dword [edx + eax*8]
cmp ecx, 0xffffffff
je 0x514d42
movzx edx, word [edx + eax*8 + 4]
test edx, 0x710
je 0x514d3f
test edx, 0x300
je 0x514c96
xor ebx, ebx
test esi, esi
je 0x514c71
cmp dword [ebp + ebx*4 - 0x110], ecx
je 0x514c71
inc ebx
cmp esi, ebx
jne 0x514c61
mov ebx, esi
cmp ebx, esi
jne 0x514c93
cmp esi, 0x3f
mov ebx, dword [ebp + 0xc]
ja 0x514c96
mov dword [ebp + esi*4 - 0x110], ecx
mov esi, dword [ebp - 0x114]
inc esi
mov dword [ebp - 0x114], esi
jmp 0x514c96
mov ebx, dword [ebp + 0xc]
test dl, 0x10
je 0x514cff
cmp dword [ebp - 0x328], 0
mov dword [ebp - 0x32c], esi
je 0x514cc6
xor ebx, ebx
cmp dword [ebp + ebx*4 - 0x214], ecx
je 0x514cc8
inc ebx
cmp dword [ebp - 0x328], ebx
jne 0x514cac
mov ebx, dword [ebp - 0x328]
jmp 0x514cc8
xor ebx, ebx
mov esi, dword [ebp - 0x328]
cmp ebx, esi
jne 0x514cf6
cmp esi, 0x3f
mov ebx, dword [ebp + 0xc]
ja 0x514cf9
mov dword [ebp + esi*4 - 0x214], ecx
mov esi, dword [ebp - 0x218]
inc esi
mov dword [ebp - 0x328], esi
mov dword [ebp - 0x218], esi
jmp 0x514cf9
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x32c]
test edx, 0x600
je 0x514d3f
xor edx, edx
test edi, edi
je 0x514d1d
cmp dword [ebp + edx*4 - 0x318], ecx
je 0x514d1d
inc edx
cmp edi, edx
jne 0x514d0d
mov edx, edi
cmp edx, edi
jne 0x514d3f
cmp edi, 0x3f
mov edx, dword [ebp + 8]
ja 0x514d42
mov dword [ebp + edi*4 - 0x318], ecx
mov edi, dword [ebp - 0x31c]
inc edi
mov dword [ebp - 0x31c], edi
jmp 0x514d42
mov edx, dword [ebp + 8]
inc eax
cmp eax, ebx
jne 0x514c2f
xor ebx, ebx
dec ebx
mov dword [ebp - 0x324], ebx
mov dword [ebp - 0x320], ebx
test esi, esi
mov eax, dword [ebp - 0x328]
jne 0x514db8
test eax, eax
jne 0x514db8
test edi, edi
jne 0x514db8
mov edx, dword [ebp + 0x10]
mov eax, edx
mov esi, dword [ebp + 0x14]
or eax, esi
je 0x514d9e
test esi, esi
js 0x514e2d
mov eax, 0xfffffffe
cmp edx, eax
mov ecx, 0xfffffffe
cmovb ecx, edx
test esi, esi
cmovs eax, edx
cmove eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
jmp 0x514f5f
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
xor ebx, ebx
dec ebx
jmp 0x514f5f
mov ebx, dword [ebp + 0x14]
test ebx, ebx
mov ecx, dword [ebp + 0x10]
js 0x514e26
mov eax, ecx
or eax, ebx
je 0x514e3d
xor eax, eax
mov edx, 0x3e8
push eax
push edx
push ebx
push ecx
call fcn.00670df0
mov dword [ebp - 0x330], eax
mov dword [ebp - 0x32c], edx
xor eax, eax
push eax
mov eax, 0x3e8
push eax
push ebx
push dword [ebp + 0x10]
call fcn.00674c00
mov ecx, SysReAllocString
mov ebx, dword [ebp - 0x330]
cmp ebx, ecx
mov edx, SysReAllocString
cmovb edx, ebx
cmp dword [ebp - 0x32c], 0
cmovs ecx, ebx
cmove ecx, edx
mov dword [ebp - 0x324], ecx
imul ecx, eax, 0x3e8
jmp 0x514e49
xor eax, eax
mov ebx, dword [ebp + 0xc]
jmp 0x514e55
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x514f5f
mov dword [ebp - 0x324], 0
xor ecx, ecx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x324]
mov dword [eax + 4], ecx
test edi, edi
lea ecx, [ebp - 0x31c]
cmovne edi, ecx
mov ecx, dword [ebp - 0x328]
test ecx, ecx
lea edx, [ebp - 0x218]
cmovne ecx, edx
test esi, esi
lea edx, [ebp - 0x114]
cmovne esi, edx
push eax
push edi
push ecx
push esi
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x514f5d
xor eax, eax
inc eax
cmp ebx, 2
cmovae eax, ebx
mov dword [ebp - 0x328], eax
xor ebx, ebx
xor edi, edi
mov ecx, dword [ebp + 8]
mov word [ecx + edi*8 + 6], 0
mov eax, dword [ecx + edi*8]
cmp eax, 0xffffffff
je 0x514f4e
mov esi, ebx
lea ebx, [edi*4]
lea ecx, [ebp - 0x114]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x514ef1
mov eax, dword [ecx + edi*8 + 4]
bt eax, 8
jae 0x514ee5
or byte [ecx + ebx*2 + 7], 1
test eax, 0x300
je 0x514ef1
or byte [ecx + ebx*2 + 7], 3
lea eax, [ebp - 0x218]
push eax
push dword [ecx + ebx*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x514f13
test byte [ecx + edi*8 + 4], 0x10
je 0x514f13
or byte [ecx + ebx*2 + 6], 0x10
lea eax, [ebp - 0x31c]
push eax
push dword [ecx + ebx*2]
call sub.WS2_32.dll___WSAFDIsSet
mov ecx, dword [ebp + 8]
test eax, eax
je 0x514f43
mov eax, dword [ecx + edi*8 + 4]
bt eax, 9
jae 0x514f38
or byte [ecx + ebx*2 + 7], 2
bt eax, 0xa
jae 0x514f43
or byte [ecx + ebx*2 + 7], 4
cmp word [ecx + ebx*2 + 6], 1
mov ebx, esi
sbb ebx, 0xffffffff
inc edi
cmp dword [ebp - 0x328], edi
jne 0x514ea6
jmp 0x514f5f
mov ebx, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0064d372
mov eax, ebx
add esp, 0x324
pop esi
pop edi
pop ebx
pop ebp
ret