Function at 0x464f10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
sub esp, 0x54
mov eax, dword [0x570930]
xor eax, dword [esp + 0x54]
push ebx
push esi
xor ebx, ebx
push str.Opening_connection_to_SOCKS_server._n
mov dword [esp + 0x5c], eax
mov dword [0x14073c0], ebx
call fcn.004357b0
add esp, 4
push 6
push 1
mov esi, 2
push esi
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0x8e3c58], eax
jne 0x464f7a
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.WARNING:_NET_OpenSocks:_socket:__s_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
mov eax, dword [0x8e4e50]
mov ecx, dword [eax + 4]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
jne 0x464fb6
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.WARNING:_NET_OpenSocks:_gethostbyname:__s_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
cmp word [eax + 8], si
je 0x464fc6
push str.WARNING:_NET_OpenSocks:_gethostbyname:_address_type_was_not_AF_INET_n
jmp 0x46533f
mov word [esp + 8], si
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [0x8e3cbc]
xor eax, eax
mov dword [esp + 0xc], ecx
mov ax, word [edx + 0x20]
push eax
call sub.WSOCK32.dll_htons
mov edx, dword [0x8e3c58]
push 0x10
lea ecx, [esp + 0xc]
push ecx
push edx
mov word [esp + 0x16], ax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x46502f
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.NET_OpenSocks:_connect:__s_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
mov eax, dword [0x8e3c74]
mov ecx, dword [eax + 4]
cmp byte [ecx], bl
jne 0x46504c
mov edx, dword [0x8e4e58]
mov eax, dword [edx + 4]
cmp byte [eax], bl
jne 0x46504c
xor eax, eax
jmp 0x465051
mov eax, 1
cmp eax, ebx
mov byte [esp + 0x18], 5
je 0x465066
mov byte [esp + 0x19], 2
mov ecx, 4
jmp 0x465070
mov byte [esp + 0x19], 1
mov ecx, 3
cmp eax, ebx
mov byte [esp + 0x1a], bl
je 0x46507d
mov byte [esp + 0x1a], 2
mov edx, dword [0x8e3c58]
push ebx
push ecx
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x465183
mov ecx, dword [0x8e3c58]
push ebx
push 0x40
lea eax, [esp + 0x20]
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x465261
cmp eax, esi
jne 0x46533a
cmp byte [esp + 0x18], 5
jne 0x46533a
mov cl, byte [esp + 0x19]
movzx eax, cl
sub eax, ebx
je 0x4650e2
sub eax, esi
je 0x4650e2
push str.NET_OpenSocks:_request_denied_n
jmp 0x46533f
cmp cl, 2
jne 0x4651f2
push ebp
push edi
mov edi, dword [0x8e3c74]
mov eax, dword [edi + 4]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x465100
mov ebp, dword [0x8e4e58]
sub eax, edx
mov edx, eax
mov eax, dword [ebp + 4]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x465117
sub eax, esi
cmp edx, ebx
mov byte [esp + 0x20], 1
mov byte [esp + 0x21], dl
je 0x465146
mov esi, dword [edi + 4]
mov ecx, edx
mov ebx, ecx
shr ecx, 2
lea edi, [esp + 0x22]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ebx, ebx
cmp eax, ebx
mov byte [esp + edx + 0x22], al
je 0x465165
mov esi, dword [ebp + 4]
mov ecx, eax
mov ebp, ecx
shr ecx, 2
lea edi, [esp + edx + 0x23]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x8e3c58]
push ebx
lea edx, [eax + edx + 3]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
pop edi
pop ebp
jne 0x4651ad
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.NET_OpenSocks:_send:__s_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
mov eax, dword [0x8e3c58]
push ebx
push 0x40
lea edx, [esp + 0x20]
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x465261
cmp eax, 2
jne 0x46533a
cmp byte [esp + 0x18], 1
jne 0x46533a
cmp byte [esp + 0x19], bl
je 0x4651ed
push str.NET_OpenSocks:_authentication_failed_n
jmp 0x46533f
mov esi, 2
mov ecx, dword [esp + 0x60]
push ecx
mov byte [esp + 0x1c], 5
mov byte [esp + 0x1d], 3
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], 1
mov dword [esp + 0x20], ebx
call sub.WSOCK32.dll_htons
push ebx
push 0xa
lea edx, [esp + 0x20]
mov word [esp + 0x28], ax
mov eax, dword [0x8e3c58]
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x465248
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.NET_OpenSocks:_send:__s_n
call fcn.004357b0
add esp, 8
mov edx, dword [0x8e3c58]
push ebx
push 0x40
lea ecx, [esp + 0x20]
push ecx
push edx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x46528b
call sub.WSOCK32.dll_WSAGetLastError
call fcn.00464280
push eax
push str.NET_OpenSocks:_recv:__s_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
cmp eax, esi
jl 0x46533a
cmp byte [esp + 0x18], 5
jne 0x46533a
mov al, byte [esp + 0x19]
cmp al, bl
je 0x4652c9
movzx eax, al
push eax
push str.NET_OpenSocks:_request_denied:__i_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
mov al, byte [esp + 0x1b]
cmp al, 1
je 0x4652f4
movzx ecx, al
push ecx
push str.NET_OpenSocks:_relay_address_is_not_IPV4:__i_n
call fcn.004357b0
add esp, 8
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
mov edx, dword [esp + 0x1c]
mov ax, word [esp + 0x20]
xor ecx, ecx
mov word [0x8e3c5c], si
mov dword [0x8e3c64], ecx
pop esi
mov dword [0x8e3c60], edx
mov word [0x8e3c5e], ax
mov dword [0x8e3c68], ecx
mov dword [0x14073c0], 1
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, dword [esp + 0x54]
add esp, 0x54
jmp fcn.0052e7b9
push str.NET_OpenSocks:_bad_response_n
call fcn.004357b0
mov ecx, dword [esp + 0x5c]
add esp, 4
xor ecx, dword [esp + 0x5c]
pop esi
pop ebx
add esp, 0x54
jmp fcn.0052e7b9