Function at 0x408340
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
lea ecx, [esi + 0x38]
cmp ecx, edi
je 0x40836c
push 0xffffffffffffffff
push 0
push edi
call fcn.004079f0
cmp dword [esi + 0x58], 0
mov ebx, dword [ebp + 0xc]
mov dword [esi + 0x50], ebx
mov byte [esi + 0x35], 1
jne 0x40838d
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x58], eax
push str.start_connect_service
push 0x24
push str.LDConnectClient::connectService
call fcn.00423230
add esp, 0xc
lea eax, [ebp - 0x1a8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4083d2
push str.socket_error1
push 0x2a
push str.LDConnectClient::connectService
call fcn.00423230
add esp, 0xc
xor al, al
jmp 0x408565
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x30], eax
cmp eax, 0xffffffff
jne 0x408407
push str.socket_error2
push 0x33
push str.LDConnectClient::connectService
call fcn.00423230
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x408565
mov eax, 2
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x1c0]
push edi
push eax
call fcn.004273f0
add esp, 8
cmp dword [eax + 0x14], 0x10
jb 0x408428
mov eax, dword [eax]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp dword [ebp - 0x1ac], 0x10
mov dword [ebp - 0x10], eax
jb 0x40844a
push dword [ebp - 0x1c0]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
xor ebx, ebx
mov edi, 0x1f4
lea esp, [esp]
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4084da
inc ebx
mov eax, edi
imul eax, ebx
mov ecx, 0xea60
cmp eax, 0xea60
cmovg eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.connect_error_._try
push 0x4d
push str.LDConnectClient::connectService
call fcn.00423230
add edi, 0x1f4
add esp, 0xc
cmp edi, 0x157c
jl 0x408460
push str.connect_error_3
push 0x57
push str.LDConnectClient::connectService
call fcn.00423230
add esp, 0xc
push dword [esi + 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x408565
push dword [esi + 0x30]
push str.connected_server.__d
push 0x5d
push str.LDConnectClient::connectService
call fcn.00423230
mov edi, dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
push 0xc
call edi
add esp, 0x14
test eax, eax
je 0x40851f
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax + 8], 0
mov dword [eax], vtable.MemberFuncRunable_class_LDConnectClient_.0
mov dword [eax + 4], esi
mov dword [eax + 8], 0x408580
jmp 0x408521
xor eax, eax
push eax
lea ecx, [esi + 0x7c]
call fcn.0042a8a0
push 0xc
call edi
add esp, 4
test eax, eax
je 0x408555
xorps xmm0, xmm0
movq qword [eax], xmm0
mov dword [eax + 8], 0
mov dword [eax], vtable.MemberFuncRunable_class_LDConnectClient_.0
mov dword [eax + 4], esi
mov dword [eax + 8], 0x4088a0
jmp 0x408557
xor eax, eax
push eax
lea ecx, [esi + 0x8c]
call fcn.0042a8a0
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi + 0x35], 0
xor ecx, ebp
pop esi
pop ebx
call fcn.00431ce8
mov esp, ebp
pop ebp
ret 8