Function at 0x49f320
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x5c6150]
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.004d9a60
mov dword [esi], 0
add esp, 0xc
mov eax, dword [ebx + 0x17c]
test eax, eax
je 0x49f3b4
lea ecx, [ebp - 0x114]
push ecx
push 0
push dword [ebx + 0x180]
call eax
add esp, 0xc
jmp 0x49f3cc
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 0x49f5ee
push 0x80
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x114]
call fcn.004a2b90
add esp, 0x10
test eax, eax
je 0x49f446
lea eax, [ebp - 0x84]
push eax
push str.__Trying__s...
push ebx
call fcn.0049e5e0
lea eax, [ebp - 0x84]
push eax
push 0x5af270
lea edi, [ebx + 0x8694]
push 0x2e
push edi
call fcn.004a0050
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 0x49f433
mov edi, dword [ebp - 0x118]
cmp dword [ebx + 0x308], 0
je 0x49f459
push esi
push edi
call fcn.0049f610
add esp, 8
push esi
call fcn.0049eca0
mov eax, dword [ebx + 0x174]
add esp, 4
test eax, eax
je 0x49f488
push 0
push esi
push dword [ebx + 0x178]
call eax
add esp, 0xc
mov dword [ebp - 0x11c], eax
test eax, eax
jne 0x49f5e7
push dword [ebp - 0x114]
push esi
push edi
call fcn.0049eee0
add esp, 0xc
test eax, eax
jne 0x49f5e7
push 1
push esi
call fcn.004b77b0
add esp, 8
cmp dword [edi + 0x70], 1
jne 0x49f552
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 0x49f531
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x11c], eax
cmp eax, 0xb
je 0x49f51e
cmp eax, 0x2732
jle 0x49f4f3
cmp eax, 0x2734
jle 0x49f51e
push eax
push edi
call fcn.004a2c60
push eax
lea eax, [ebp - 0x84]
push eax
push str.Failed_to_connect_to__s:__s
push ebx
call fcn.0049e540
mov eax, dword [ebp - 0x11c]
add esp, 0x18
mov dword [ebx + 0x8554], eax
jmp 0x49f55c
push dword [ebp + 0x10]
push esi
push edi
call fcn.0049f6e0
add esp, 0xc
mov dword [ebp - 0x118], eax
cmp eax, 1
jne 0x49f55c
cmp dword [ebx + 0x508], 2
jne 0x49f55c
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x118], 0
lea eax, [ebp - 0x11c]
push eax
push esi
call fcn.0049f670
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x49f5b0
test ecx, ecx
je 0x49f5c5
mov eax, dword [ebp - 0x120]
push str.connected_n
push ebx
mov dword [eax], 1
call fcn.0049e5e0
push esi
push edi
call fcn.0049edb0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x49f5c5
push str.Timeout_n
push ebx
call fcn.0049e5e0
add esp, 8
jmp 0x49f5e7
mov eax, dword [ebp - 0x11c]
push eax
push edi
mov dword [ebx + 0x8554], eax
call fcn.004a2c60
push eax
push 0x540f3c
push ebx
call fcn.0049e5e0
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.004d6cfd
mov esp, ebp
pop ebp
ret