Function at 0x50eef0
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.00405c14
xor eax, eax
push ebp
push 0x50f1c8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov word [0x5535d0], si
cmp dword [ebp + 8], 0
je 0x50ef37
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 0x50ef6e
cmp dword [ebp + 8], 0
je 0x50f1a7
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f1e4
call fcn.0050ed48
pop ecx
jmp 0x50f1a7
xor eax, eax
push ebp
push 0x50f1a0
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x50ecf0
call sub.wsock32.dll_WSASetBlockingHook
test eax, eax
jne 0x50efad
cmp dword [ebp + 8], 0
je 0x50efa3
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f1f8
call fcn.0050ed48
pop ecx
call fcn.00405170
jmp 0x50f1a7
xor eax, eax
push ebp
push 0x50f186
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 0x50eff7
cmp dword [ebp + 8], 0
je 0x50efe8
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f214
call fcn.0050ed48
pop ecx
call fcn.00405170
call fcn.00405170
jmp 0x50f1a7
xor eax, eax
push ebp
push 0x50f16c
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 0x50f062
cmp dword [ebp + 8], 0
je 0x50f04e
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f224
call fcn.0050ed48
pop ecx
call fcn.00405170
call fcn.00405170
call fcn.00405170
jmp 0x50f1a7
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 0x50f0b6
push ebp
lea edx, [ebp - 0x1b4]
mov eax, dword [ebp - 4]
call fcn.0050ede8
pop ecx
mov eax, dword [ebp - 0x1b4]
call fcn.00405c24
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b8], eax
mov eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1ac], eax
jmp 0x50f0d6
mov eax, dword [ebp - 4]
call fcn.00405c24
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 [0x5535d4], 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 0x50f115
mov byte [ebp - 5], 0
cmp dword [ebp + 8], 0
je 0x50f155
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f234
call fcn.0050ed48
pop ecx
jmp 0x50f155
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 0x50f155
cmp dword [ebp + 8], 0
je 0x50f155
push ebp
call sub.wsock32.dll_WSAGetLastError
mov edx, eax
mov eax, 0x50f244
call fcn.0050ed48
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50f173
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 0x50f1cf
lea eax, [ebp - 0x1b4]
call fcn.00405750
lea eax, [ebp - 4]
call fcn.00405750
ret