Function at 0x41fa40
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0xe4
mov eax, dword [0x46e074]
xor eax, esp
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0xec]
push ebx
push ebp
mov ebp, dword [esp + 0xf0]
mov edx, dword [ebp]
push esi
push edi
mov dword [esp + 0x14], edx
push ebp
lea ebx, [esp + 0x20]
lea edx, [esp + 0x2c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
mov dword [eax], 0xffffffff
call fcn.0041ff20
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x41fd0e
movzx eax, word [esp + 0x38]
sub eax, 2
jne 0x41fafb
lea eax, [esp + 0x3c]
push 0x2e
push eax
lea esi, [esp + 0xc4]
call fcn.0043eab0
add esp, 8
test eax, eax
je 0x41fafb
mov ecx, dword [esp + 0x3a]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, esi
mov esi, dword [esp + 0x14]
push edx
push str.__Trying__s..._n
mov ecx, esi
call fcn.004140b0
mov ebx, dword [esp + 0x24]
add esp, 8
cmp dword [esp + 0x28], 2
jne 0x41faf7
mov edi, 1
cmp dword [esp + 0x2c], edi
je 0x41fb37
xor edi, edi
jmp 0x41fb49
mov byte [esp + 0xbc], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebp
call fcn.00412840
add esp, 4
push eax
mov eax, dword [esp + 0x18]
push edi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
call fcn.00414140
mov eax, dword [esp + 0x28]
add esp, 0xc
mov esi, ebp
call fcn.0041fec0
jmp 0x41fd0e
cmp dword [esi + 0x3ec], 0
je 0x41fb49
mov ecx, ebx
mov eax, ebp
call fcn.0041f940
mov esi, ebx
call fcn.0041f9a0
mov esi, dword [esp + 0x14]
test edi, edi
je 0x41fb68
cmp dword [esi + 0x528], 0
je 0x41fb68
mov edi, ebx
call fcn.0041eb80
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x41fba8
mov ecx, dword [esi + 0x1b4]
push 0
push ebx
push ecx
call eax
add esp, 0xc
cmp eax, 2
jne 0x41fb91
mov edi, 1
mov dword [esp + 0x20], edi
jmp 0x41fbad
test eax, eax
je 0x41fba8
mov eax, ebx
mov esi, ebp
call fcn.0041fec0
mov eax, 0x2a
jmp 0x41fd10
mov edi, 1
cmp dword [esp + 0x28], 2
jne 0x41fbe8
push 2
push ebx
mov ecx, ebp
call fcn.0041ed90
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x41fbe8
mov eax, ebx
mov esi, ebp
call fcn.0041fec0
mov eax, dword [esp + 0x18]
cmp eax, edi
jne 0x41fd10
mov eax, 7
jmp 0x41fd10
lea edx, [esp + 0x1c]
push edx
push 0x8004667e
push ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
cmp dword [ebp + 0x300], edi
mov dword [ebp + 0x2f8], edx
mov dword [ebp + 0x2fc], ecx
jle 0x41fc4a
mov ecx, dword [ebp + 0x30c]
mov edx, dword [ebp + 0x308]
push ecx
push edx
push esi
call fcn.00417460
add esp, 0xc
cmp dword [esp + 0x20], 0
jne 0x41fd08
cmp dword [ebp + 0x8c], edi
jne 0x41fd08
cmp dword [ebp + 0x2e0], 0
jne 0x41fc80
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41fcf5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0xb
je 0x41fce1
cmp esi, 0x2732
jle 0x41fc9d
cmp esi, 0x2734
jle 0x41fce1
push ebp
mov edi, esi
call fcn.00412840
mov edi, dword [esp + 0x18]
add esp, 4
push eax
lea edx, [esp + 0xc0]
push edx
push str.Immediate_connect_fail_for__s:__s_n
mov ecx, edi
call fcn.004140b0
mov dword [edi + 0x8700], esi
add esp, 0xc
mov eax, ebx
mov esi, ebp
call fcn.0041fec0
mov dword [esp + 0x18], 7
mov eax, dword [esp + 0x18]
jmp 0x41fd10
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], 0
mov dword [eax], ebx
mov eax, dword [esp + 0x18]
jmp 0x41fd10
cmp dword [esp + 0x18], 0
jne 0x41fd02
mov eax, dword [esp + 0x24]
mov dword [eax], ebx
mov eax, dword [esp + 0x18]
jmp 0x41fd10
mov ecx, dword [esp + 0x24]
mov dword [ecx], ebx
xor eax, eax
mov ecx, dword [esp + 0xec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004453f2
add esp, 0xe4
ret