Function at 0x1010a1a2
Capabilities:
Get socket status

Disassembly:
push ebp
sub esp, 0x5c
push 0x36c
mov eax, 0x1017cbaf
call fcn.1014d21b
mov edi, ecx
mov eax, dword [edi + 0x7c]
mov esi, dword [ebp + 0x68]
mov ecx, dword [esi]
mov byte [ebp + 0x5d], al
mov eax, dword [edi + 0x98]
xor ebx, ebx
inc ebx
push 2
lea edx, [ebp + 0x5c]
mov byte [ebp + 0x5c], bl
mov byte [ebp + 0x5e], al
mov eax, dword [ecx]
push edx
call dword [eax + 8]
cmp dword [edi + 0x80], 0x10
mov ecx, dword [esi]
jb 0x1010a1ec
mov eax, dword [edi + 0x6c]
jmp 0x1010a1ef
lea eax, [edi + 0x6c]
movsx edx, byte [ebp + 0x5d]
mov dword [ebp + 0x68], eax
mov eax, dword [ecx]
push edx
push dword [ebp + 0x68]
call dword [eax + 8]
mov ecx, dword [esi]
mov eax, dword [ecx]
push ebx
lea edx, [ebp + 0x5e]
push edx
call dword [eax + 8]
mov ecx, dword [esi]
lea eax, [edi + 0x84]
cmp dword [eax + 0x18], 0x10
jb 0x1010a21e
mov eax, dword [eax + 4]
jmp 0x1010a221
add eax, 4
movsx edi, byte [ebp + 0x5e]
mov edx, dword [ecx]
push edi
push eax
call dword [edx + 8]
mov eax, dword [ebp + 0x70]
push 0x32
xor edx, edx
pop ecx
div ecx
xor edi, edi
mov dword [ebp + 0x68], edi
cmp eax, edi
mov dword [ebp + 0x70], eax
jbe 0x1010a2f7
mov eax, dword [ebp + 0x6c]
mov al, byte [eax]
test al, al
je 0x1010a33c
mov eax, dword [esi]
mov dword [ebp - 0x274], edi
mov dword [ebp + 0x54], edi
mov dword [ebp + 0x58], 0xc350
mov ecx, dword [eax + 8]
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x378], edi
mov dword [ebp - 0x274], ebx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x374], ecx
lea ecx, [ebp + 0x54]
push ecx
lea ecx, [ebp - 0x378]
push ecx
mov dword [ebp - 0x378], ebx
mov eax, dword [eax + 8]
push edi
lea ecx, [ebp - 0x274]
push ecx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x1010a386
cmp eax, edi
jle 0x1010a2e8
mov eax, dword [esi]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x274]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1010a3d1
mov eax, dword [esi]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x378]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1010a439
inc dword [ebp + 0x68]
mov eax, dword [ebp + 0x68]
cmp eax, dword [ebp + 0x70]
jb 0x1010a246
push str.timeout
lea ecx, [ebp + 0x1c]
call fcn.100025a0
push str.socks5_auth_fail
lea ecx, [ebp]
mov dword [ebp - 4], 8
call fcn.100025a0
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x130]
mov byte [ebp - 4], 9
call fcn.10108a53
push 0x101a57d8
lea eax, [ebp - 0x130]
jmp 0x1010a380
push str.terminate
lea ecx, [ebp - 0x60]
call fcn.100025a0
push str.socks5_respauth_fail
lea ecx, [ebp - 0x98]
mov dword [ebp - 4], edi
call fcn.100025a0
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], bl
call fcn.10108a53
push 0x101a57d8
lea eax, [ebp - 0xf0]
push eax
call fcn.10149808
push str.select_error
lea ecx, [ebp - 0x28]
call fcn.100025a0
push str.socks5_respauth_fail
lea ecx, [ebp - 0xd0]
mov dword [ebp - 4], 2
call fcn.100025a0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xd0]
push eax
lea ecx, [ebp - 0x170]
mov byte [ebp - 4], 3
call fcn.10108a53
push 0x101a57d8
lea eax, [ebp - 0x170]
jmp 0x1010a380
push dword [ebp + 0x6c]
mov ecx, dword [esi]
mov eax, dword [ecx]
push 2
lea edx, [ebp + 0x5c]
push edx
call dword [eax + 4]
cmp byte [ebp + 0x5d], 0
je 0x1010a481
push str.Invalid_Username_Password
lea ecx, [ebp - 0xb4]
call fcn.100025a0
push str.socks5_respauth_fail
lea ecx, [ebp - 0x7c]
mov dword [ebp - 4], 4
call fcn.100025a0
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 5
call fcn.10108a53
push 0x101a57d8
lea eax, [ebp - 0x150]
jmp 0x1010a380
push str.closed
lea ecx, [ebp - 0x44]
call fcn.100025a0
push str.socks5_respauth_fail
lea ecx, [ebp + 0x38]
mov dword [ebp - 4], 6
call fcn.100025a0
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp + 0x38]
push eax
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 7
call fcn.10108a53
push 0x101a57d8
lea eax, [ebp - 0x110]
jmp 0x1010a380
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x60
leave
ret 0xc