Function at 0x50fae2
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x5c31c8]
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.0051000c
pop ecx
pop ecx
test eax, eax
je 0x50fb4f
xor eax, eax
jmp 0x50fe2e
lea eax, [ebx + 0xcc]
lea esi, [ebx + 0x9e]
push eax
mov edx, esi
lea ecx, [ebp - 0x8c]
call fcn.0050f6ca
pop ecx
test eax, eax
jne 0x50fb9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
mov edx, esi
call fcn.0052922c
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.00510cc2
mov edi, dword [ebp - 0xb0]
add esp, 0x10
jmp 0x50fe1f
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.00510c4e
add esp, 0xc
mov ecx, ebx
call fcn.0050f67d
mov edi, dword [ebp - 0xb0]
xor eax, eax
cmp dword [esi + 0x314], eax
je 0x50fbdb
mov edx, edi
mov ecx, ebx
call fcn.0050fa2b
mov ecx, edi
call fcn.0050fa87
cmp dword [esi + 0x40c], 0
je 0x50fc1f
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 0x50fc1f
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00510c4e
add esp, 0xc
mov eax, dword [esi + 0x16c]
test eax, eax
je 0x50fc50
push 0
push edi
push dword [esi + 0x170]
call eax
add esp, 0xc
mov dword [ebp - 0xa4], eax
cmp eax, 2
jne 0x50fd3c
mov dword [ebp - 0xac], 1
push dword [ebp - 0x9c]
mov edx, edi
mov ecx, ebx
call fcn.0050f274
pop ecx
test eax, eax
jne 0x50fe19
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 0x50fd53
cmp dword [ebx + 0x74], 1
jne 0x50fd53
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 0x50fcc7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa4], eax
call fcn.00519343
cmp dword [ebx + 0x230], 1
mov dword [ebx + 0x228], eax
mov dword [ebx + 0x22c], edx
jle 0x50fcee
mov edx, dword [ebx + 0x234]
mov ecx, esi
call fcn.0050a459
mov eax, dword [ebp - 0xa0]
cmp eax, 0xffffffff
jne 0x50fd75
mov eax, dword [ebp - 0xa4]
cmp eax, 0xb
je 0x50fd5d
cmp eax, 0x2732
jle 0x50fd12
cmp eax, 0x2734
jle 0x50fd5d
mov edx, eax
mov ecx, ebx
call fcn.0052922c
push eax
lea eax, [ebx + 0x40]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.00510cc2
mov edx, dword [ebp - 0xa4]
add esp, 0x10
mov dword [esi + 0x858c], edx
jmp 0x50fd96
test eax, eax
je 0x50fc50
mov dword [ebp - 0xa0], 0x2a
jmp 0x50fe1f
xor eax, eax
mov dword [ebp - 0xa0], eax
jmp 0x50fcf4
push dword [ebp + 8]
mov edx, edi
mov ecx, ebx
call fcn.0050f1fd
mov dword [ebp - 0xa0], eax
pop ecx
cmp eax, 3
je 0x50fd44
cmp eax, 1
jne 0x50fd90
cmp dword [esi + 0x540], 2
jne 0x50fd90
mov eax, dword [ebp - 0xb4]
mov dword [eax], edi
jmp 0x50fb48
mov edx, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xac]
test ecx, ecx
jne 0x50fdb5
lea edx, [ebp - 0xa4]
mov ecx, edi
call fcn.0050f5a0
mov edx, dword [ebp - 0xa4]
mov ecx, eax
mov eax, dword [ebp - 0xa0]
test eax, eax
jne 0x50fde7
test ecx, ecx
je 0x50fdfb
mov eax, dword [ebp - 0xb8]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.00510c4e
pop ecx
pop ecx
mov edx, edi
mov ecx, ebx
call fcn.0050f717
jmp 0x50fd83
cmp eax, 1
jne 0x50fdfb
push str.Timeout_n
push esi
call fcn.00510c4e
pop ecx
pop ecx
jmp 0x50fe17
mov ecx, ebx
mov dword [esi + 0x858c], edx
call fcn.0052922c
push eax
push 0x59a4fc
push esi
call fcn.00510c4e
add esp, 0xc
xor eax, eax
mov dword [ebp - 0xa0], eax
mov edx, edi
mov ecx, ebx
call fcn.0050ffd8
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055daac
mov esp, ebp
pop ebp
ret