Function at 0x4954b4
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
sub esp, 0x24c
mov eax, dword [0x597fb8]
xor eax, esp
mov dword [esp + 0x248], eax
push esi
mov esi, ecx
cmp dword [esi + 0x204], 0xffffffff
jne 0x4957a4
mov eax, dword [esi + 0x178]
sub eax, 1
push edi
je 0x4955d5
sub eax, 1
je 0x4955be
sub eax, 1
je 0x4954f4
push str.503_Invalid_sequence_of_commands._r_n
call fcn.00492d00
add esp, 4
jmp 0x4955b9
movsx eax, word [esi + 0x180]
lea edi, [esi + 0x180]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x204], eax
je 0x495793
push 4
lea ecx, [esp + 0xc]
push ecx
push 1
push 0xffff
push eax
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [0x59912c]
mov eax, dword [edx + 0x10]
mov ecx, dword [esi + 0x204]
push 0x33
push 0x403
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov dx, word [edi]
mov eax, dword [esi + 0x204]
sub dx, 2
neg dx
sbb edx, edx
and edx, 0xc
add edx, 0x10
push edx
push edi
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x495598
call fcn.00494ef0
pop edi
pop esi
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.00549930
add esp, 0x24c
ret
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x4955be
call edi
push eax
push str.500_Failed_to_connect_to_port__d._r_n
mov ecx, esi
call fcn.00492d00
add esp, 8
call fcn.00493420
pop edi
pop esi
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.00549930
add esp, 0x24c
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x204], eax
je 0x495793
lea ecx, [esp + 0x140]
push ecx
call fcn.00523650
lea edx, [esp + 0x30]
push edx
call fcn.00523650
mov ecx, dword [esi + 0x204]
push 4
lea eax, [esp + 0x10]
push eax
push 1
push 0xffff
push ecx
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [0x59912c]
mov eax, dword [edx + 0x10]
mov ecx, dword [esi + 0x204]
push 0x33
push 0x403
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
movzx edx, byte [esi + 0x183]
movzx ecx, byte [esi + 0x181]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push edx
movzx edx, byte [esi + 0x180]
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
movzx eax, byte [esi + 0x182]
push eax
push ecx
push edx
lea eax, [esp + 0x150]
push str._d._d._d._d
push eax
mov dword [esp + 0x2c], 2
mov dword [esp + 0x34], 6
mov dword [esp + 0x30], 1
call fcn.00524440
mov ecx, dword [esi + 0x184]
push ecx
lea edx, [esp + 0x4c]
push 0x551658
push edx
call fcn.00524440
mov edx, dword [esp + 0x5c]
add esp, 0x24
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0x14c]
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
call dword [0x58ef6c]
test eax, eax
jne 0x495751
mov eax, dword [esp + 8]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x18]
mov eax, dword [esi + 0x204]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x49571e
call fcn.00494ef0
mov ecx, dword [esp + 8]
push ecx
call dword [0x58ef70]
jmp 0x495765
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x495744
call edi
push eax
push str.500_Failed_to_connect_to_port__d._r_n
mov ecx, esi
call fcn.00492d00
add esp, 8
call fcn.00493420
mov ecx, dword [esp + 8]
push ecx
call dword [0x58ef70]
jmp 0x495765
push str.500_Failed_to_get_port_address._r_n
mov ecx, esi
call fcn.00492d00
add esp, 4
call fcn.00493420
lea edx, [esp + 0x30]
push edx
call fcn.00527550
lea eax, [esp + 0x140]
push eax
call fcn.00527550
pop edi
pop esi
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.00549930
add esp, 0x24c
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_create_port_socket__d._r_n
jmp 0x4955af
call fcn.00494ef0
mov ecx, dword [esp + 0x24c]
pop esi
xor ecx, esp
call fcn.00549930
add esp, 0x24c
ret