Function at 0x50a1b0
Capabilities:
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
sub esp, 0x200
push ebx
push ebp
mov ebp, dword [esp + 0x20c]
push esi
test ebp, ebp
push edi
mov esi, ecx
jne 0x50a1d6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret 8
push 0
lea eax, [esi + 0x8c]
push 0
push eax
mov ecx, esi
call fcn.00508a90
test eax, eax
jne 0x50a1f9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret 8
push ebp
call sub.WS2_32.dll_inet_addr
mov edi, eax
cmp edi, 0xffffffff
jne 0x50a24a
push ebp
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x50a243
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x50a3a0
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 4]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], 0xffffffff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret 8
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov edi, dword [eax]
mov ecx, dword [esp + 0x218]
mov byte [esp + 0x10], 4
push ecx
mov byte [esp + 0x15], 1
call sub.WS2_32.dll_htons
mov word [esp + 0x12], ax
mov eax, dword [esi + 4]
mov dword [esp + 0x14], edi
cmp eax, 0xffffffff
mov byte [esp + 0x19], 0
mov byte [esp + 0x18], 0
mov edi, 9
mov ebx, 0xa
lea ebp, [esp + 0x10]
je 0x50a3a0
lea edx, [esp + 0x10]
test edx, edx
je 0x50a3a0
mov eax, dword [esi + 4]
push 0
push edi
push ebp
push eax
call sub.WS2_32.dll_send
cmp eax, 1
jge 0x50a2cf
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x50a210
dec ebx
test ebx, ebx
jle 0x50a210
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x50a2df
push eax
push 0x5a1094
add ebp, eax
sub edi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
test edi, edi
jg 0x50a29a
mov eax, dword [esi + 4]
mov edi, 8
cmp eax, 0xffffffff
mov ebx, 0xa
lea ebp, [esp + 0x10]
je 0x50a3a0
mov edx, dword [esi + 4]
push 0
push edi
push ebp
push edx
call sub.WS2_32.dll_recv
cmp eax, 1
jge 0x50a32a
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x50a380
dec ebx
test ebx, ebx
jle 0x50a380
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x50a33a
push eax
push 0x5a1090
sub edi, eax
add ebp, eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
test edi, edi
jg 0x50a2fd
cmp byte [esp + 0x11], 0x5a
je 0x50a3e0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x50a369
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 4]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], 0xffffffff
movsx eax, byte [esp + 0x11]
sub eax, 0x5b
je 0x50a3bd
dec eax
je 0x50a3b6
dec eax
je 0x50a3af
push str.Socks4_Proxy:_unknown_error
jmp 0x50a3c2
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x50a3a0
push 2
push eax
call sub.WS2_32.dll_shutdown
mov eax, dword [esi + 4]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 4], 0xffffffff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret 8
push str.Socks4_Proxy:_request_rejected_because_the_client_program_and_identd_report_different_user_ids
jmp 0x50a3c2
push str.Socks4_Proxy:_request_rejected_because_SOCKS_server_cannot_connect_to_identd_on_the_client
jmp 0x50a3c2
push str.Socks4_Proxy:_request_reject_or_failed
push 1
push 0x596558
call fcn.004aa400
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x200
ret 8