Function at 0x4ffb68
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x5b31c8]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, ecx
xor eax, eax
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebx]
or dword [ecx], 0xffffffff
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xac], eax
mov dword [esi], eax
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x9c]
mov dword [ebp - 0xb4], ecx
push eax
mov ecx, ebx
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0xa8], edi
call fcn.0050007f
pop ecx
pop ecx
test eax, eax
je 0x4ffbd5
xor eax, eax
jmp 0x4ffeb4
lea eax, [ebx + 0xcc]
lea esi, [ebx + 0x9e]
push eax
mov edx, esi
lea ecx, [ebp - 0x8c]
call fcn.004ff750
pop ecx
test eax, eax
jne 0x4ffc20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
call fcn.005188fe
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.00500d35
mov edi, dword [ebp - 0xb0]
add esp, 0x10
jmp 0x4ffea5
push 0xb
lea eax, [ebx + 0x40]
pop ecx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
push eax
push str.__Trying__s..._n
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0xa8]
push esi
call fcn.00500cc1
add esp, 0xc
mov ecx, ebx
call fcn.004ff703
mov edi, dword [ebp - 0xb0]
xor eax, eax
cmp dword [esi + 0x314], eax
je 0x4ffc61
mov edx, edi
mov ecx, ebx
call fcn.004ffab1
mov ecx, edi
call fcn.004ffb0d
cmp dword [esi + 0x408], 0
je 0x4ffca5
push 4
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], 1
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4ffca5
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00500cc1
add esp, 0xc
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x4ffcd6
push 0
push edi
push dword [esi + 0x170]
call eax
add esp, 0xc
mov dword [ebp - 0xa4], eax
cmp eax, 2
jne 0x4ffdc2
mov dword [ebp - 0xac], 1
push dword [ebp - 0x9c]
mov edx, edi
mov ecx, ebx
call fcn.004ff2fa
pop ecx
test eax, eax
jne 0x4ffe9f
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 0xac], 0
jne 0x4ffdd9
cmp dword [ebx + 0x74], 1
jne 0x4ffdd9
push dword [ebp - 0x90]
lea eax, [ebp - 0x8c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0xa0], eax
cmp eax, 0xffffffff
jne 0x4ffd4d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa4], eax
call fcn.00508db9
cmp dword [ebx + 0x20c], 1
mov dword [ebx + 0x204], eax
mov dword [ebx + 0x208], edx
jle 0x4ffd74
mov edx, dword [ebx + 0x210]
mov ecx, esi
call fcn.004fa5db
mov eax, dword [ebp - 0xa0]
cmp eax, 0xffffffff
jne 0x4ffdfb
mov eax, dword [ebp - 0xa4]
cmp eax, 0xb
je 0x4ffde3
cmp eax, 0x2732
jle 0x4ffd98
cmp eax, 0x2734
jle 0x4ffde3
mov edx, eax
mov ecx, ebx
call fcn.005188fe
push eax
lea eax, [ebx + 0x40]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.00500d35
mov edx, dword [ebp - 0xa4]
add esp, 0x10
mov dword [esi + 0x858c], edx
jmp 0x4ffe1c
test eax, eax
je 0x4ffcd6
mov dword [ebp - 0xa0], 0x2a
jmp 0x4ffea5
xor eax, eax
mov dword [ebp - 0xa0], eax
jmp 0x4ffd7a
push dword [ebp + 8]
mov edx, edi
mov ecx, ebx
call fcn.004ff283
mov dword [ebp - 0xa0], eax
pop ecx
cmp eax, 3
je 0x4ffdca
cmp eax, 1
jne 0x4ffe16
cmp dword [esi + 0x540], 2
jne 0x4ffe16
mov eax, dword [ebp - 0xb4]
mov dword [eax], edi
jmp 0x4ffbce
mov edx, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x4ffe3b
lea edx, [ebp - 0xa4]
mov ecx, edi
call fcn.004ff626
mov edx, dword [ebp - 0xa4]
mov ecx, eax
mov eax, dword [ebp - 0xa0]
test eax, eax
jne 0x4ffe6d
test ecx, ecx
je 0x4ffe81
mov eax, dword [ebp - 0xb8]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.00500cc1
pop ecx
pop ecx
mov edx, edi
mov ecx, ebx
call fcn.004ff79d
jmp 0x4ffe09
cmp eax, 1
jne 0x4ffe81
push str.Timeout_n
push esi
call fcn.00500cc1
pop ecx
pop ecx
jmp 0x4ffe9d
mov ecx, ebx
mov dword [esi + 0x858c], edx
call fcn.005188fe
push eax
push 0x588d2c
push esi
call fcn.00500cc1
add esp, 0xc
xor eax, eax
mov dword [ebp - 0xa0], eax
mov edx, edi
mov ecx, ebx
call fcn.0050004b
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054e63c
mov esp, ebp
pop ebp
ret