Function at 0x519a20
Capabilities:
Connect socket

Disassembly:
sub esp, 0x164
mov eax, dword [0x5cab48]
xor eax, esp
mov dword [esp + 0x160], eax
mov ecx, dword [esp + 0x170]
mov eax, dword [esp + 0x16c]
push ebx
mov ebx, dword [esp + 0x16c]
push ebp
mov ebp, dword [ebx]
push edi
mov dword [esp + 0x14], ecx
mov dword [ecx], 0xffffffff
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x30]
push ecx
push eax
push ebx
mov dword [esp + 0x28], 0
call fcn.00519040
mov edi, eax
add esp, 0x10
test edi, edi
je 0x519a94
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x160]
xor ecx, esp
call fcn.0055423a
add esp, 0x164
ret
push esi
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0xc4]
push eax
lea eax, [esp + 0x48]
push eax
call fcn.00519980
add esp, 0xc
test eax, eax
jne 0x519af5
mov esi, dword [sym.imp.MSVCR110.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
push 0x80
lea eax, [esp + 0xf4]
push eax
push dword [edi]
call fcn.00504ec0
push eax
push dword [esi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00517c40
push dword [esp + 0x2c]
push ebx
call fcn.00518630
add esp, 0x24
jmp 0x519d1a
push dword [esp + 0x14]
lea eax, [esp + 0xc4]
push eax
push str.__Trying__s:_ld..._n
push ebp
call fcn.00517d30
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x20]
add esp, 0x10
cmp eax, 2
je 0x519b21
cmp eax, 0x17
jne 0x519b45
cmp dword [esp + 0x34], 1
jne 0x519b45
test byte [ebp + 0xaa0], 8
mov dword [esp + 0x10], 1
je 0x519b4d
push esi
push ebx
call fcn.00519e30
add esp, 8
jmp 0x519b4d
mov dword [esp + 0x10], 0
push esi
call fcn.00518fa0
add esp, 4
cmp dword [esp + 0x10], 0
je 0x519b73
test dword [ebp + 0xaa0], 0x1000
je 0x519b73
push esi
push ebp
call fcn.00519d40
add esp, 8
cmp dword [ebp + 0x618], 0
je 0x519bb5
push 1
push ebp
call fcn.00509700
mov eax, dword [ebp + 0x618]
push 0
push esi
push dword [ebp + 0x61c]
call eax
push 0
push ebp
mov dword [esp + 0x30], eax
call fcn.00509700
mov eax, dword [esp + 0x30]
add esp, 0x1c
cmp eax, 2
jne 0x519bfe
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x30]
cmp eax, 2
je 0x519bc3
cmp eax, 0x17
jne 0x519c16
lea eax, [esp + 0x40]
push eax
call fcn.0053fa50
push eax
push dword [esp + 0x38]
push esi
push ebx
call fcn.00519480
mov edi, eax
add esp, 0x14
test edi, edi
je 0x519c16
push esi
push ebx
call fcn.00518630
add esp, 8
mov eax, 7
cmp edi, 1
cmove edi, eax
mov eax, edi
jmp 0x519d1c
test eax, eax
je 0x519bb5
push esi
push ebx
call fcn.00518630
add esp, 8
mov eax, 0x2a
jmp 0x519d1c
push 1
push esi
call fcn.0053fae0
lea eax, [esp + 0x28]
push eax
call fcn.0051f080
movq xmm0, qword [eax]
movq qword [ebx + 0x2a8], xmm0
movq xmm0, qword [eax + 8]
add esp, 0xc
cmp dword [ebx + 0x2b8], 1
movq qword [ebx + 0x2b0], xmm0
jle 0x519c64
push 3
push dword [ebx + 0x2c4]
push dword [ebx + 0x2c0]
push ebp
call fcn.00508f60
add esp, 0x10
cmp dword [esp + 0x1c], 0
jne 0x519d14
cmp dword [ebx + 0x90], 1
jne 0x519d14
test dword [ebx + 0x2a4], 0x8000000
jne 0x519cab
push dword [esp + 0x3c]
lea eax, [esp + 0x44]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x519cab
test edi, edi
jne 0x519d10
mov eax, dword [esp + 0x18]
mov dword [eax], esi
mov eax, edi
jmp 0x519d1c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xb
je 0x519d08
cmp edi, 0x2732
jle 0x519cc8
cmp edi, 0x2734
jle 0x519d08
push 0x80
lea eax, [esp + 0xf4]
push eax
push edi
call fcn.00504ec0
push eax
lea eax, [esp + 0xd0]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push ebp
call fcn.00517d30
push esi
push ebx
mov dword [ebp + 0xcbc], edi
call fcn.00518630
mov edi, 7
add esp, 0x24
mov eax, edi
jmp 0x519d1c
mov eax, dword [esp + 0x18]
xor edi, edi
mov dword [eax], esi
mov eax, edi
jmp 0x519d1c
mov eax, dword [esp + 0x18]
mov dword [eax], esi
xor eax, eax
mov ecx, dword [esp + 0x170]
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.0055423a
add esp, 0x164
ret