Function at 0x1001b2af
Capabilities:
Get socket status

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x328
push esi
mov esi, ecx
mov eax, dword [esi + 0x1514]
cmp eax, 0xffffffff
jne 0x1001b2cf
xor eax, eax
jmp 0x1001b53d
push edi
lea edi, [esi + 0x21b]
cmp byte [edi], 0
je 0x1001b2f0
mov edx, dword [esi]
push 1
push eax
push dword [ebp + 0x7c]
call dword [edx + 4]
mov byte [edi], 0
xor eax, eax
jmp 0x1001b53c
and dword [ebp - 0xb0], 0
xor edi, edi
inc edi
test byte [esi + 0x151c], 2
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 0x2b8], edi
je 0x1001b31b
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xb0], edi
mov dword [ebp - 0x1b0], eax
mov eax, dword [ebp + 0x78]
cdq
mov ecx, 0x3e8
idiv ecx
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1b4], edi
imul edx, edx, 0x3e8
and dword [ebp + 0x78], 0
mov dword [ebp + 0x64], eax
mov dword [ebp + 0x68], edx
inc dword [ebp + 0x78]
cmp dword [ebp + 0x78], 3
jg 0x1001b539
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp - 0x1b4]
push eax
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x2b8]
push eax
mov eax, dword [esi + 0x1514]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x1001b3b8
call ebx
cmp eax, 0x2714
je 0x1001b349
call ebx
test byte [esi + 0x151c], 0x20
je 0x1001b3b0
mov edx, dword [esi]
movzx eax, ax
shl eax, 0x10
or eax, 0x20
push eax
push dword [esi + 0x1514]
mov ecx, esi
push dword [ebp + 0x7c]
call dword [edx + 4]
or eax, 0xffffffff
jmp 0x1001b53b
test eax, eax
jle 0x1001b539
lea eax, [ebp - 0x1b4]
push eax
push dword [esi + 0x1514]
call sub.WS2_32.dll___WSAFDIsSet
push 0x10
pop ebx
test eax, eax
je 0x1001b433
test byte [esi + 0x151c], bl
je 0x1001b433
push ebx
xor edi, edi
lea eax, [ebp + 0x54]
push edi
push eax
call fcn.1003e4bd
add esp, 0xc
lea eax, [ebp + 0x78]
push eax
lea eax, [ebp + 0x54]
push eax
push dword [esi + 0x1514]
mov dword [ebp + 0x78], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x1001b411
mov edi, 0x2749
mov eax, dword [esi]
movzx ecx, di
shl ecx, 0x10
or ecx, ebx
push ecx
push dword [esi + 0x1514]
mov ecx, esi
push dword [ebp + 0x7c]
call dword [eax + 4]
xor dword [esi + 0x151c], ebx
xor edi, edi
inc edi
lea eax, [ebp - 0xb0]
push eax
push dword [esi + 0x1514]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001b4bf
test byte [esi + 0x151c], bl
je 0x1001b49a
and dword [ebp + 0x78], 0
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
push 0x1007
push 0xffff
push dword [esi + 0x1514]
mov dword [ebp + 0x6c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
movzx ecx, word [ebp + 0x78]
mov eax, dword [esi]
shl ecx, 0x10
or ecx, ebx
push ecx
push dword [esi + 0x1514]
mov ecx, esi
push dword [ebp + 0x7c]
call dword [eax + 4]
xor dword [esi + 0x151c], ebx
mov eax, dword [esi + 0x151c]
test al, 2
je 0x1001b4bf
push 2
push dword [esi + 0x1514]
xor eax, 2
push dword [ebp + 0x7c]
mov dword [esi + 0x151c], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [ebp - 0x2b8]
push eax
push dword [esi + 0x1514]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1001b539
test byte [esi + 0x151c], 8
mov eax, dword [esi]
mov ecx, esi
je 0x1001b4e6
push 8
jmp 0x1001b52d
and dword [esi + 0x14fc], 0
push edi
push dword [esi + 0x1514]
push dword [ebp + 0x7c]
call dword [eax + 4]
mov eax, dword [esi + 0x14fc]
test eax, eax
je 0x1001b539
test byte [esi + 0x151c], 0x20
je 0x1001b539
cmp eax, 0x2733
je 0x1001b539
cmp eax, 0x2714
je 0x1001b539
movzx ecx, word [esi + 0x14fc]
mov eax, dword [esi]
shl ecx, 0x10
or ecx, 0x20
push ecx
mov ecx, esi
push dword [esi + 0x1514]
push dword [ebp + 0x7c]
call dword [eax + 4]
xor eax, eax
pop ebx
pop edi
pop esi
add ebp, 0x70
leave
ret 8