Function at 0x40e7d0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, dword [0x4a5c78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebx]
mov dword [ecx], 0xffffffff
mov dword [ebp - 0xa8], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x94], ecx
mov ecx, dword [eax + 0xc]
mov esi, edx
mov edx, dword [ebx + 0x70]
mov dword [ebp - 0x8c], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0xac], esi
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0x90], edx
mov dword [ebp - 0x88], ecx
cmp ecx, 0x80
jbe 0x40e83b
mov ecx, 0x80
mov dword [ebp - 0x88], ecx
mov edx, dword [eax + 0x18]
push ecx
push edx
lea eax, [ebp - 0x84]
push eax
call fcn.00467c80
mov dword [esi], 0
mov eax, dword [edi + 0x174]
add esp, 0xc
test eax, eax
je 0x40e876
mov edx, dword [edi + 0x178]
lea ecx, [ebp - 0x94]
push ecx
push 0
push edx
call eax
add esp, 0xc
jmp 0x40e891
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x94]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x98], eax
cmp eax, 0xffffffff
je 0x40eb58
movzx eax, word [ebp - 0x84]
sub eax, 2
lea esi, [ebx + 0x9a]
jne 0x40e95e
push 0x2e
push esi
lea eax, [ebp - 0x80]
push eax
push 2
call fcn.00420f20
add esp, 0x10
test eax, eax
je 0x40e95e
mov ecx, dword [ebp - 0x82]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
lea eax, [ebx + 0x3c]
mov dword [ebx + 0xc8], edx
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
mov edi, dword [ebp - 0x9c]
push str.__Trying__s...
push edi
call fcn.0042a430
push ebx
call fcn.0040e470
mov esi, dword [ebp - 0x98]
add esp, 0x10
cmp dword [edi + 0x308], 0
je 0x40e92c
mov edx, esi
mov edi, ebx
call fcn.0040e710
mov edi, dword [ebp - 0x9c]
push esi
call fcn.0040e770
mov eax, dword [edi + 0x16c]
add esp, 4
test eax, eax
je 0x40e996
mov ecx, dword [edi + 0x170]
push 0
push esi
push ecx
call eax
add esp, 0xc
mov dword [ebp - 0xa4], eax
test eax, eax
je 0x40e996
push esi
jmp 0x40eb52
mov byte [esi], 0
mov dword [ebx + 0xc8], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
call fcn.0042e3c0
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.0042a4b0
mov eax, dword [ebp - 0x98]
add esp, 0x18
push eax
jmp 0x40eb52
mov ecx, dword [ebp - 0x94]
push esi
push ebx
call fcn.0040e090
add esp, 8
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x40e9cd
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0xa0]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00468861
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.004264e0
add esp, 8
cmp dword [ebx + 0x70], 1
jne 0x40ea49
mov edx, dword [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0xa0], eax
cmp eax, 0xffffffff
jne 0x40ea96
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xa4], eax
cmp eax, 0xb
je 0x40ea55
cmp eax, 0x2732
jle 0x40ea21
cmp eax, 0x2734
jle 0x40ea55
push eax
push ebx
call fcn.0042e3c0
push eax
lea eax, [ebx + 0x3c]
push eax
push str.Failed_to_connect_to__s:__s
push edi
call fcn.0042a4b0
mov ecx, dword [ebp - 0xa4]
add esp, 0x18
mov dword [edi + 0x855c], ecx
jmp 0x40eaa4
mov dword [ebp - 0xa0], 0
jmp 0x40eaa4
mov eax, dword [ebp + 0xc]
push ebx
mov edi, esi
call fcn.0040e020
add esp, 4
mov dword [ebp - 0xa0], eax
cmp eax, 3
jne 0x40ea8a
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov eax, 0x2a
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00468861
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x9c]
mov eax, dword [ebp - 0xa0]
cmp eax, 1
jne 0x40eaa4
cmp dword [edi + 0x510], 2
je 0x40eaee
push esi
lea esi, [ebp - 0xa4]
call fcn.0040e400
mov ecx, dword [ebp - 0xa0]
add esp, 4
test ecx, ecx
jne 0x40eb08
test eax, eax
je 0x40eb23
mov ecx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0xac]
push str.connected_n
push ecx
mov dword [eax], 1
call fcn.0042a430
mov esi, dword [ebp - 0x98]
push esi
push ebx
call fcn.0040e510
add esp, 0x10
mov edx, dword [ebp - 0xa8]
pop edi
mov dword [edx], esi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00468861
mov esp, ebp
pop ebp
ret
cmp ecx, 1
jne 0x40eb23
mov eax, dword [ebp - 0x9c]
push str.Timeout_n
push eax
call fcn.0042a430
add esp, 8
jmp 0x40eb4b
mov eax, dword [ebp - 0xa4]
mov esi, dword [ebp - 0x9c]
push eax
push ebx
mov dword [esi + 0x855c], eax
call fcn.0042e3c0
push eax
push 0x48e2bc
push esi
call fcn.0042a430
add esp, 0x14
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00468861
mov esp, ebp
pop ebp
ret