Function at 0x4f8844
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe48
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x1b4], ebx
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405d50
xor eax, eax
push ebp
push 0x4f8b1c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov word [0x55736c], si
cmp dword [ebp + 8], 0
je 0x4f888b
mov eax, dword [ebp + 8]
mov byte [eax], 0
lea eax, [ebp - 0x1a0]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
test eax, eax
je 0x4f88c2
cmp dword [ebp + 8], 0
je 0x4f8afb
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b38
call fcn.004f8684
pop ecx
jmp 0x4f8afb
xor eax, eax
push ebp
push 0x4f8af4
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4f8610
call sub.wsock32.dll_WSASetBlockingHook
test eax, eax
jne 0x4f8901
cmp dword [ebp + 8], 0
je 0x4f88f7
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b4c
call fcn.004f8684
pop ecx
call fcn.004052ac
jmp 0x4f8afb
xor eax, eax
push ebp
push 0x4f8ada
push dword fs:[eax]
mov dword fs:[eax], esp
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4f894b
cmp dword [ebp + 8], 0
je 0x4f893c
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b68
call fcn.004f8684
pop ecx
call fcn.004052ac
call fcn.004052ac
jmp 0x4f8afb
xor eax, eax
push ebp
push 0x4f8ac0
push dword fs:[eax]
mov dword fs:[eax], esp
mov word [ebp - 0x1b0], 2
mov word [ebp - 0x1ae], 0
xor eax, eax
mov dword [ebp - 0x1ac], eax
push 0x10
lea eax, [ebp - 0x1b0]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_bind
test eax, eax
je 0x4f89b6
cmp dword [ebp + 8], 0
je 0x4f89a2
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b78
call fcn.004f8684
pop ecx
call fcn.004052ac
call fcn.004052ac
call fcn.004052ac
jmp 0x4f8afb
mov word [ebp - 0x1b0], 2
push ebx
call sub.wsock32.dll_htons
mov word [ebp - 0x1ae], ax
movzx eax, byte [ebp + 0xc]
dec eax
sub al, 4
jae 0x4f8a0a
push ebp
lea edx, [ebp - 0x1b4]
mov eax, dword [ebp - 4]
call fcn.004f8724
pop ecx
mov eax, dword [ebp - 0x1b4]
call fcn.00405d60
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b8], eax
mov eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1ac], eax
jmp 0x4f8a2a
mov eax, dword [ebp - 4]
call fcn.00405d60
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b8], eax
mov eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1ac], eax
call sub.kernel32.dll_GetTickCount_1
mov dword [0x557370], eax
push 0x10
lea eax, [ebp - 0x1b0]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_connect
test eax, eax
je 0x4f8a69
mov byte [ebp - 5], 0
cmp dword [ebp + 8], 0
je 0x4f8aa9
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b88
call fcn.004f8684
pop ecx
jmp 0x4f8aa9
mov dword [ebp - 0x10], 0x10
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1b0]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_getpeername
test eax, eax
sete byte [ebp - 5]
cmp byte [ebp - 5], 0
jne 0x4f8aa9
cmp dword [ebp + 8], 0
je 0x4f8aa9
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x4f8b98
call fcn.004f8684
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f8ac7
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_closesocket
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4f8b23
lea eax, [ebp - 0x1b4]
call fcn.0040588c
lea eax, [ebp - 4]
call fcn.0040588c
ret