Function at 0x50fc50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
sub esp, 0x174
mov eax, dword [0x67dc50]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
mov ebx, dword [esp + 0x184]
push ebp
push esi
mov esi, dword [esp + 0x184]
mov ebp, ecx
mov ecx, dword [0x67e8e0]
push edi
mov edi, dword [esp + 0x18c]
test ecx, ecx
je 0x50fce0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x50fce0
test ebx, ebx
je 0x50fca3
mov eax, dword [ebx]
push eax
call sub.WSOCK32.dll_inet_ntoa
jmp 0x50fca8
mov eax, str._NULL_
mov ecx, esi
test esi, esi
jne 0x50fcb3
mov ecx, str._null_
push eax
push edi
push ecx
lea ecx, [esp + 0x30]
push str._ENTERING__PzExtSockClient::Connec_name_s__port_d__inaddr_s_
push ecx
mov dword [esp + 0x38], str..._xsocket.cpp
mov dword [esp + 0x3c], 0x207
mov dword [esp + 0x40], 0x14
call fcn.005090f0
add esp, 0x14
mov byte [esp + 0x13], 0
mov eax, esi
test esi, esi
jne 0x50fcf0
mov eax, str.127.0.0.1
call fcn.0050f8e0
mov esi, eax
test esi, esi
je 0x50fe7c
push 6
mov ebx, 1
push ebx
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp], eax
cmp eax, 0xffffffff
je 0x50fe6b
movsx edx, word [esi + 0xa]
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [esp + 0x30]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov eax, 2
push edi
mov word [esp + 0x28], ax
call sub.WSOCK32.dll_htons
mov edx, dword [ebp]
push 0x10
lea ecx, [esp + 0x28]
push ecx
push edx
mov word [esp + 0x32], ax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x50fe00
call fcn.00502540
mov dword [esp + 0x34], eax
call fcn.00502630
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
push 0x100
push eax
mov dword [esp + 0x184], ebx
call fcn.00502770
lea ecx, [esp + 0x144]
push 0x20
push ecx
call fcn.005026d0
add esp, 0x10
lea ecx, [esp + 0x34]
call fcn.0050ebc0
push str.connected
mov ecx, ebp
call fcn.0050fb20
push 0x3000
lea edi, [ebp + 8]
push 0
push edi
call sub.MSVCR90.dll_memset
add esp, 0xc
mov ecx, 0x53
lea esi, [esp + 0x34]
push 0x2000
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, ebp
call fcn.0050f560
push 0x258
push 0
mov ecx, ebp
call fcn.0050f3c0
jmp 0x50fe94
mov dword [0x67e8f0], 4
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [0x67e8e0]
mov dword [0x67e8f4], eax
test ecx, ecx
je 0x50fe5b
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x50fe5b
mov ecx, dword [0x67e8f4]
push ecx
lea edx, [esp + 0x18]
push str.FAILED:_socket:__d
push edx
mov dword [esp + 0x20], str..._xsocket.cpp
mov dword [esp + 0x24], 0x237
mov dword [esp + 0x28], 0xa
call fcn.005090f0
add esp, 0xc
mov ecx, ebp
call fcn.0050fbb0
mov dword [ebp], 0xffffffff
jmp 0x50fe90
mov dword [0x67e8f0], 3
call sub.WSOCK32.dll_WSAGetLastError
jmp 0x50fe8b
mov dword [0x67e8f0], 1
call fcn.0050ef00
mov dword [0x67e8f4], eax
mov bl, byte [esp + 0x13]
mov ecx, dword [0x67e8e0]
test ecx, ecx
je 0x50fed4
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x28
jl 0x50fed4
lea eax, [esp + 0x14]
push str._EXITING__PzExtSockClient::Connect
push eax
mov dword [esp + 0x1c], str..._xsocket.cpp
mov dword [esp + 0x20], 0x246
mov dword [esp + 0x24], 0x28
call fcn.005090f0
add esp, 8
mov ecx, dword [esp + 0x180]
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
xor ecx, esp
call fcn.005f617e
add esp, 0x174
ret 0xc