Function at 0x510c00
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x57c06c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov edx, 0x80
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov eax, dword [ecx + 4]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x120], esi
mov eax, dword [edi + 0x70]
mov ebx, dword [edi]
mov dword [ebp - 0x110], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x10c], eax
mov eax, dword [ecx + 0x10]
cmp eax, edx
cmova eax, edx
push eax
push dword [ecx + 0x18]
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x104]
push eax
call fcn.004e4c80
mov dword [esi], 0
add esp, 0xc
mov eax, dword [ebx + 0x17c]
test eax, eax
je 0x510c94
lea ecx, [ebp - 0x114]
push ecx
push 0
push dword [ebx + 0x180]
call eax
add esp, 0xc
jmp 0x510cac
push dword [ebp - 0x10c]
push dword [ebp - 0x110]
push dword [ebp - 0x114]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x510ece
push 0x80
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x114]
call fcn.00514320
add esp, 0x10
test eax, eax
je 0x510d26
lea eax, [ebp - 0x84]
push eax
push str.__Trying__s...
push ebx
call fcn.0050ffa0
lea eax, [ebp - 0x84]
push eax
push 0x561b70
lea edi, [ebx + 0x8694]
push 0x2e
push edi
call fcn.00511910
mov ecx, dword [ebp - 0x118]
add esp, 0x1c
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi + 0x3b], al
test al, al
jne 0x510d13
mov edi, dword [ebp - 0x118]
cmp dword [ebx + 0x308], 0
je 0x510d39
push esi
push edi
call fcn.00510ef0
add esp, 8
push esi
call fcn.00510580
mov eax, dword [ebx + 0x174]
add esp, 4
test eax, eax
je 0x510d68
push 0
push esi
push dword [ebx + 0x178]
call eax
add esp, 0xc
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x510ec7
push dword [ebp - 0x114]
push esi
push edi
call fcn.005107c0
add esp, 0xc
test eax, eax
jne 0x510ec7
push 1
push esi
call fcn.00526800
add esp, 8
cmp dword [edi + 0x70], 1
jne 0x510e32
push dword [ebp - 0x108]
lea eax, [ebp - 0x104]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x118], eax
cmp eax, 0xffffffff
jne 0x510e11
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x11c], eax
cmp eax, 0xb
je 0x510dfe
cmp eax, 0x2732
jle 0x510dd3
cmp eax, 0x2734
jle 0x510dfe
push eax
push edi
call fcn.005143f0
push eax
lea eax, [ebp - 0x84]
push eax
push str.Failed_to_connect_to__s:__s
push ebx
call fcn.0050ff00
mov eax, dword [ebp - 0x11c]
add esp, 0x18
mov dword [ebx + 0x8554], eax
jmp 0x510e3c
push dword [ebp + 0x10]
push esi
push edi
call fcn.00510fc0
add esp, 0xc
mov dword [ebp - 0x118], eax
cmp eax, 1
jne 0x510e3c
cmp dword [ebx + 0x508], 2
jne 0x510e3c
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e24d7
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x118], 0
lea eax, [ebp - 0x11c]
push eax
push esi
call fcn.00510f50
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x510e90
test ecx, ecx
je 0x510ea5
mov eax, dword [ebp - 0x120]
push str.connected_n
push ebx
mov dword [eax], 1
call fcn.0050ffa0
push esi
push edi
call fcn.00510690
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e24d7
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x510ea5
push str.Timeout_n
push ebx
call fcn.0050ffa0
add esp, 8
jmp 0x510ec7
mov eax, dword [ebp - 0x11c]
push eax
push edi
mov dword [ebx + 0x8554], eax
call fcn.005143f0
push eax
push 0x54c878
push ebx
call fcn.0050ffa0
add esp, 0x14
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e24d7
mov esp, ebp
pop ebp
ret