Function at 0x4f4be0
Capabilities:
Connect socket

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, ecx
mov byte [esp + 0xb], 0
push esi
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x4f4c04
mov eax, dword [ecx]
push 0x5e8b1c
push 3
push ecx
call dword [eax + 0x14]
add esp, 0xc
mov eax, dword [ebp + 0x40]
mov ecx, 2
mov esi, dword [esp + 0x1c]
push esi
mov word [eax], cx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 0x40]
mov ebx, dword [esp + 0x18]
push ebx
mov word [ecx + 2], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, dword [ebp + 0x40]
mov dword [ecx + 4], eax
mov ecx, ebp
call fcn.004f49e0
mov al, byte [ebp + 0x3c]
mov byte [esp + 0x1c], al
test al, al
je 0x4f4c4d
push 0
mov ecx, ebp
call fcn.004e3cb0
mov ecx, dword [ebp + 0x24]
push edi
mov edi, dword [esp + 0x24]
test ecx, ecx
je 0x4f4c6a
mov eax, dword [ecx]
push edi
push esi
push ebx
push str._connecting_to__s:_d__timeout__d_msec_...__n
push ecx
call dword [eax + 0x18]
add esp, 0x14
push 0x10
push dword [ebp + 0x40]
push dword [ebp + 0x38]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x4f4c9c
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x4f4db2
mov eax, dword [ecx]
push str.connected_n
push ecx
call dword [eax + 0x18]
add esp, 8
mov bl, 1
jmp 0x4f4e1b
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2734
je 0x4f4cee
call esi
cmp eax, 0x2733
je 0x4f4cee
mov ebx, dword [ebp + 0x24]
test ebx, ebx
je 0x4f4e17
mov ebx, dword [ebx]
add ebx, 0x18
call fcn.00594945
mov esi, eax
call fcn.00594945
push dword [esi]
mov edi, eax
call fcn.0059e577
push eax
push dword [edi]
push str._d____s__n
push dword [ebp + 0x24]
call dword [ebx]
add esp, 0x14
jmp 0x4f4e17
call fcn.004df1e0
mov esi, eax
mov dword [esp + 0x1c], 0
add esi, edi
mov ebx, edx
mov edi, dword [esp + 0x28]
mov ecx, edi
adc ebx, 0
push 0
mov dword [esp + 0x18], ebx
call fcn.004e35f0
test al, al
jne 0x4f4e17
nop dword [eax]
call fcn.004df1e0
cmp ebx, edx
jb 0x4f4e02
ja 0x4f4d37
cmp esi, eax
jb 0x4f4e02
call fcn.004df1e0
mov ecx, esi
sub ecx, eax
mov eax, ebx
sbb eax, edx
test eax, eax
ja 0x4f4d5d
jb 0x4f4d52
cmp ecx, 0x1f4
jae 0x4f4d5d
call fcn.004df1e0
mov ecx, esi
sub ecx, eax
jmp 0x4f4d62
mov ecx, 0x1f4
push ecx
mov ecx, ebp
call fcn.004e3ed0
mov bl, al
mov dword [esp + 0x24], 4
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x20]
push eax
push 0x1007
push 0xffff
push dword [ebp + 0x38]
call dword [sym.imp.WS2_32.dll_getsockopt]
mov eax, dword [esp + 0x1c]
test bl, bl
je 0x4f4db6
test eax, eax
jne 0x4f4dba
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x4f4db2
mov eax, dword [ecx]
push str.connected__n
push ecx
call dword [eax + 0x18]
add esp, 8
mov bl, 1
jmp 0x4f4e1b
test eax, eax
je 0x4f4dc8
cmp eax, 0x2734
je 0x4f4dc8
cmp eax, 0x2733
jne 0x4f4dde
push 0
mov ecx, edi
call fcn.004e35f0
test al, al
jne 0x4f4e17
mov ebx, dword [esp + 0x14]
jmp 0x4f4d20
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x4f4e17
mov esi, dword [esi]
push eax
call fcn.0059e577
push eax
push dword [esp + 0x24]
push str.connection_error:__d____s__n
push dword [ebp + 0x24]
call dword [esi + 0x18]
add esp, 0x14
jmp 0x4f4e17
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x4f4e17
mov eax, dword [ecx]
push str.connection_timeout_n
push ecx
call dword [eax + 0x18]
add esp, 8
mov bl, byte [esp + 0x13]
cmp byte [esp + 0x20], 0
pop edi
je 0x4f4e2c
push 1
mov ecx, ebp
call fcn.004e3cb0
mov edx, dword [ebp + 0x24]
test edx, edx
je 0x4f4e43
mov ecx, dword [edx]
push str._asyncconnect_n
push 3
push edx
call dword [ecx + 0x14]
add esp, 0xc
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 8
ret 0x10