Function at 0x4185b0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x12c
mov eax, dword [0x4594d4]
xor eax, esp
mov dword [esp + 0x124], eax
mov eax, dword [esp + 0x130]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [eax + 4]
mov ebp, dword [edi]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 0xc]
mov esi, edx
mov edx, dword [edi + 0x70]
mov dword [esp + 0x28], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], ecx
cmp ecx, 0x80
jbe 0x41860a
mov ecx, 0x80
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 0x18]
push ecx
push edx
lea eax, [esp + 0x38]
push eax
call fcn.004315f0
mov byte [esi], 0
mov eax, dword [ebp + 0x154]
add esp, 0xc
test eax, eax
je 0x41863e
mov edx, dword [ebp + 0x158]
lea ecx, [esp + 0x20]
push ecx
push 0
push edx
call eax
add esp, 0xc
jmp 0x418653
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x418860
mov eax, dword [esp + 0x20]
sub eax, 2
je 0x418674
push 0x273f
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4186da
lea eax, [esp + 0x34]
push 0x80
push eax
lea esi, [esp + 0xb8]
call fcn.00428010
add esp, 8
test eax, eax
je 0x4186da
mov ecx, esi
push ecx
push str.__Trying__s...
mov ecx, ebp
call fcn.00418f30
lea edx, [esp + 0xb8]
push edx
lea esi, [ebp + 0x85c8]
push 0x450c74
mov ecx, 0x2e
mov eax, esi
call fcn.0041f380
lea edx, [edi + 0x3c]
add esp, 0x10
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4186d0
cmp byte [ebp + 0x28e], 0
je 0x4186ec
mov edx, ebx
mov eax, edi
call fcn.004184f0
mov esi, ebx
call fcn.00418550
mov eax, dword [ebp + 0x14c]
test eax, eax
je 0x418718
mov ecx, dword [ebp + 0x150]
push 0
push ebx
push ecx
call eax
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jne 0x418859
mov edx, dword [esp + 0x20]
push edx
push ebx
mov ecx, edi
call fcn.00418180
add esp, 8
test eax, eax
jne 0x418859
lea eax, [esp + 0x10]
push eax
push 0x8004667e
mov esi, 1
push ebx
mov dword [esp + 0x1c], esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [edi + 0x70], esi
jne 0x4187b9
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4187dd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xb
je 0x4187c3
cmp esi, 0x2732
jle 0x41878a
cmp esi, 0x2734
jle 0x4187c3
push edi
mov edi, esi
call fcn.00428720
add esp, 4
push eax
lea eax, [esp + 0xb4]
push eax
push str.Failed_to_connect_to__s:__s
mov eax, ebp
call fcn.00418ff0
mov edi, dword [esp + 0x24]
add esp, 0xc
mov dword [ebp + 0x84bc], esi
jmp 0x4187eb
mov dword [esp + 0x10], 0
jmp 0x4187eb
mov eax, dword [esp + 0x144]
push edi
mov edi, ebx
call fcn.00418110
mov edi, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, 1
jne 0x4187eb
cmp dword [ebp + 0x470], 2
je 0x41881a
push ebx
lea esi, [esp + 0x18]
call fcn.00418480
mov ecx, dword [esp + 0x14]
add esp, 4
test ecx, ecx
jne 0x41881e
test al, al
je 0x418834
mov ecx, dword [esp + 0x1c]
mov byte [ecx], 1
push str.connected_n
mov ecx, ebp
call fcn.00418f30
add esp, 4
mov eax, ebx
jmp 0x418863
cmp ecx, 1
jne 0x418834
push str.Timeout_n
mov ecx, ebp
call fcn.00418f30
add esp, 4
jmp 0x418859
mov eax, dword [esp + 0x14]
push edi
mov edi, eax
mov dword [ebp + 0x84bc], eax
call fcn.00428720
add esp, 4
push eax
push 0x450c2c
mov ecx, ebp
call fcn.00418f30
add esp, 8
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov ecx, dword [esp + 0x134]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042bbc1
add esp, 0x12c
ret