Function at 0x40f9c0
Capabilities:
Connect socket

Disassembly:
sub esp, 0xa8
mov eax, dword [0x456130]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xb0]
push ebx
push ebp
mov ebp, dword [esp + 0xb4]
mov ebx, dword [ebp]
push edi
xor edi, edi
mov dword [ecx], 0xffffffff
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x20], edx
mov dword [edx], edi
lea edx, [esp + 0x24]
push edx
push eax
push ebp
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
call fcn.0040f8e0
add esp, 0x10
test eax, eax
je 0x40fa34
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xa4]
xor ecx, esp
call fcn.00431acd
add esp, 0xa8
ret
movzx eax, word [esp + 0x30]
sub eax, 2
push esi
lea esi, [ebp + 0x9e]
jne 0x40fafd
push 0x2e
push esi
lea eax, [esp + 0x40]
push eax
push 2
call fcn.00413320
add esp, 0x10
test eax, eax
je 0x40fafd
mov ecx, dword [esp + 0x36]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
lea eax, [ebp + 0x40]
mov dword [ebp + 0xcc], edx
mov edi, eax
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
push eax
push str.__Trying__s..._n
push ebx
movsw word es:[edi], word [esi]
call fcn.0040e940
push ebp
call fcn.0040f510
mov esi, dword [esp + 0x24]
add esp, 0x10
cmp dword [ebx + 0x34c], 0
je 0x40fab0
mov edx, esi
mov edi, ebp
call fcn.0040f760
push esi
call fcn.0040f7c0
add esp, 4
cmp dword [ebx + 0x440], 0
je 0x40facd
mov edi, ebx
call fcn.0040ef70
mov esi, dword [esp + 0x14]
mov eax, dword [ebx + 0x1a4]
test eax, eax
je 0x40fb66
mov edx, dword [ebx + 0x1a8]
push 0
push esi
push edx
call eax
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, 2
jne 0x40fb5e
mov dword [esp + 0x18], 1
jmp 0x40fb66
mov byte [esi], 0
mov dword [ebp + 0xcc], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00412440
push eax
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.0040e9d0
mov eax, dword [ebp + 0x28]
mov ecx, dword [esp + 0x2c]
add esp, 0x18
cmp eax, edi
je 0x40fb46
cmp ecx, dword [ebp + 0x134]
jne 0x40fb52
cmp dword [ebp + 0x13c], edi
je 0x40fb52
mov dword [ebp + 0x13c], edi
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40fd14
push ecx
mov ecx, dword [ebp + 0x2c]
push ecx
call eax
jmp 0x40fd11
test eax, eax
jne 0x40fcaa
mov eax, dword [esp + 0x24]
push eax
push esi
push ebp
call fcn.0040f0d0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x40fb8c
push esi
push ebp
call fcn.0040f890
add esp, 8
mov eax, edi
jmp 0x40fd16
push 1
push esi
call fcn.0042a490
add esp, 8
cmp dword [esp + 0x18], 0
jne 0x40fc42
cmp dword [ebp + 0x74], 1
jne 0x40fc42
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40fbce
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], eax
call fcn.004130d0
cmp dword [ebp + 0x20c], 1
mov dword [ebp + 0x204], eax
mov dword [ebp + 0x208], edx
jle 0x40fbf8
mov eax, dword [ebp + 0x210]
push eax
push ebx
call fcn.00412840
add esp, 8
cmp edi, 0xffffffff
jne 0x40fcbb
mov eax, dword [esp + 0x10]
cmp eax, 0xb
je 0x40fc91
cmp eax, 0x2732
jle 0x40fc1c
cmp eax, 0x2734
jle 0x40fc91
push eax
push ebp
call fcn.00412440
push eax
lea eax, [ebp + 0x40]
push eax
push str.Failed_to_connect_to__s:__s
push ebx
call fcn.0040e9d0
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov dword [ebx + 0x85c4], ecx
jmp 0x40fc4a
xor edi, edi
cmp dword [esp + 0x18], edi
jne 0x40fc67
push esi
lea esi, [esp + 0x14]
call fcn.0040f4a0
add esp, 4
test edi, edi
jne 0x40fcd1
test eax, eax
je 0x40fce6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
push str.connected_n
push ebx
mov dword [eax], 1
call fcn.0040e940
push esi
push ebp
call fcn.0040f5b0
mov ecx, dword [esp + 0x2c]
add esp, 0x10
mov dword [ecx], esi
jmp 0x40fd14
mov eax, dword [esp + 0xc4]
push ebp
mov edi, esi
call fcn.0040f060
mov edi, eax
add esp, 4
cmp edi, 3
jne 0x40fcbb
push esi
push ebp
call fcn.0040f890
add esp, 8
mov eax, 0x2a
jmp 0x40fd16
cmp edi, 1
jne 0x40fc4a
cmp dword [ebx + 0x578], 2
jne 0x40fc4a
mov edx, dword [esp + 0x1c]
mov dword [edx], esi
jmp 0x40fd14
cmp edi, 1
jne 0x40fce6
push str.Timeout_n
push ebx
call fcn.0040e940
add esp, 8
jmp 0x40fd06
mov eax, dword [esp + 0x10]
push eax
push ebp
mov dword [ebx + 0x85c4], eax
call fcn.00412440
push eax
push 0x449514
push ebx
call fcn.0040e940
add esp, 0x14
mov edx, dword [esp + 0x14]
push edx
push ebp
call fcn.0040f890
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0xb4]
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.00431acd
add esp, 0xa8
ret