Function at 0x497ac0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [0x65bf90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ecx]
mov dword [ebp - 0xd0], edx
mov dword [edx], 0xffffffff
lea edx, [ebp - 0xd8]
push edx
lea edx, [ebp - 0xc4]
push edx
push eax
push ecx
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xcc], 0
mov dword [ebp - 0xd4], esi
call fcn.004979f0
add esp, 0x10
test eax, eax
je 0x497b28
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
push ebx
push edi
lea ebx, [ebp - 0xdc]
lea edi, [ebp - 0x34]
lea esi, [ebp - 0xb4]
call fcn.00497550
test eax, eax
jne 0x497b8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0xc8]
mov esi, eax
push esi
push edi
call fcn.0049a540
push eax
mov eax, dword [ebp - 0xd4]
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.00494d90
mov ecx, dword [ebp - 0xd8]
push ecx
push edi
call fcn.00497990
add esp, 0x20
pop edi
pop ebx
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xd4]
lea edx, [ebp - 0x34]
push edx
push str.__Trying__s..._n
push esi
call fcn.00494d10
mov ebx, dword [ebp - 0xd8]
mov edi, dword [ebp - 0xc8]
add esp, 0xc
cmp dword [esi + 0x35c], 0
je 0x497bc1
mov edx, ebx
call fcn.00497770
push ebx
call fcn.004977d0
add esp, 4
cmp dword [esi + 0x45c], 0
je 0x497be0
mov edi, ebx
call fcn.00496e60
mov edi, dword [ebp - 0xc8]
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x497c08
mov ecx, dword [esi + 0x1b4]
push 0
push ebx
push ecx
call eax
add esp, 0xc
cmp eax, 2
jne 0x497c4d
mov dword [ebp - 0xcc], 1
mov edx, dword [ebp - 0xc4]
push edx
push ebx
push edi
call fcn.00497010
add esp, 0xc
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x497c71
push ebx
push edi
call fcn.00497990
mov ecx, dword [ebp - 0xc8]
add esp, 8
lea eax, [ecx - 1]
neg eax
pop edi
sbb eax, eax
pop ebx
and eax, ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x497c08
push ebx
push edi
call fcn.00497990
add esp, 8
pop edi
pop ebx
mov eax, 0x2a
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
push 1
push ebx
call fcn.004b5fd0
add esp, 8
call fcn.00494900
cmp dword [edi + 0x238], 1
mov dword [edi + 0x230], eax
mov dword [edi + 0x234], edx
jle 0x497ca6
mov eax, dword [edi + 0x23c]
push eax
push esi
call fcn.00493080
add esp, 8
cmp dword [ebp - 0xcc], 0
jne 0x497d65
cmp dword [edi + 0x8c], 1
jne 0x497d65
mov ecx, dword [ebp - 0xb8]
push ecx
lea edx, [ebp - 0xb4]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x497d46
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xcc], eax
cmp eax, 0xb
je 0x497d3c
cmp eax, 0x2732
jle 0x497cf9
cmp eax, 0x2734
jle 0x497d3c
push eax
push edi
call fcn.0049a540
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.00494d10
mov ecx, dword [ebp - 0xcc]
push ebx
push edi
mov dword [esi + 0x85f4], ecx
call fcn.00497990
add esp, 0x20
pop edi
pop ebx
mov eax, 7
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xc8], 0
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebp - 0xc8]
pop edi
mov dword [edx], ebx
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005bdb17
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xd0]
mov ecx, dword [ebp - 4]
pop edi
mov dword [eax], ebx
pop ebx
xor ecx, ebp
xor eax, eax
pop esi
call fcn.005bdb17
mov esp, ebp
pop ebp
ret