Function at 0x40ff10
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6063f1
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x6ab0d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x38], 0
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
jne 0x40ff81
call fcn.00410380
cmp byte [0x6b2b20], 0
je 0x40ff7e
mov ecx, edi
call fcn.00404640
mov ecx, dword [ebp - 0x40]
push eax
call fcn.00404640
push eax
push str.TCPClient__opening_a_new_connexion._the_last_one_was_automatically_closed__s:_s_
push 1
push 0x6b2b20
call fcn.004030c0
add esp, 0x14
mov eax, dword [ebp - 0x40]
cmp dword [edi + 0x14], 0x10
xorps xmm0, xmm0
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x30], 2
movups xmmword [ebp - 0x24], xmm0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], 6
mov dword [ebp - 0x38], 0
jb 0x40ffb2
mov ecx, dword [edi]
jmp 0x40ffb4
mov ecx, edi
cmp dword [eax + 0x14], 0x10
jb 0x40ffbc
mov eax, dword [eax]
lea edx, [ebp - 0x38]
push edx
lea edx, [ebp - 0x34]
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41002f
cmp byte [0x6b2b20], 0
je 0x410028
push 0
push 0x400
push 0x6b26b8
push 0x400
push eax
push 0
push 0x12ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x6b26b8
push dword [ebp - 0x14]
mov ecx, edi
call fcn.00404640
mov ecx, dword [ebp - 0x40]
push eax
call fcn.00404640
push eax
push str.TCPClient__get_addr_info_failed__server_port__s:_s___d:_s_
push 3
push 0x6b2b20
call fcn.004030c0
add esp, 0x1c
xor al, al
jmp 0x410360
mov eax, dword [ebp - 0x38]
mov byte [ebp - 0x39], 0
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x3c], eax
cmp eax, 0xffffffff
jne 0x4100b3
cmp byte [0x6b2b20], 0
je 0x410334
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.004029b0
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x410079
mov eax, dword [eax]
push eax
push str.TCPClient__create_socket_failed__s_
push 3
push 0x6b2b20
call fcn.00403570
mov dword [ebp - 4], 0xffffffff
add esp, 0x10
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x410334
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00408960
jmp 0x410334
push 4
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push ecx
push 1
push 6
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x410139
cmp byte [0x6b2b20], 0
je 0x410334
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.004029b0
mov dword [ebp - 4], 1
cmp dword [eax + 0x14], 8
jb 0x4100fc
mov eax, dword [eax]
push eax
push dword [esi + 0x3c]
push str.TCPClient__set_sock_opt_no_delay_failed__d___s_
push 3
push 0x6b2b20
call fcn.00403570
mov dword [ebp - 4], 0xffffffff
add esp, 0x14
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x410334
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00408960
jmp 0x410334
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x6b2ca8]
cmp eax, dword [ecx + 4]
jle 0x4101db
push 0x6b2ca8
call fcn.00569912
add esp, 4
cmp dword [0x6b2ca8], 0xffffffff
jne 0x4101db
push 0x120
push 0
push 0x6b2b88
mov dword [ebp - 4], 2
call fcn.005d2630
mov dword [0x6b2b88], 0
mov dword [0x6b2b8c], 0
push 0x114
push 0
mov byte [ebp - 4], 3
push 0x6b2b90
mov byte [0x6b2ca4], 0
call fcn.005d2630
add esp, 0x18
mov ecx, 0x6b2b88
call fcn.0040f070
push 0x60d790
call fcn.00569da0
push 0x6b2ca8
mov dword [ebp - 4], 0xffffffff
call fcn.005698d3
add esp, 8
mov eax, dword [ebp - 0x38]
push ecx
push dword [esi + 0x3c]
push ecx
push dword [eax + 0x18]
call fcn.0040ef60
mov eax, dword [ebp - 0x38]
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [esi + 0x3c]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4102bb
cmp byte [0x6b2b20], 0
je 0x410334
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0x88]
call fcn.004029b0
mov edi, eax
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x58]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx + 0x18]
call fcn.0040ee90
mov byte [ebp - 4], 5
cmp dword [edi + 0x14], 8
jb 0x410249
mov edi, dword [edi]
cmp dword [eax + 0x14], 8
jb 0x410251
mov eax, dword [eax]
push edi
push eax
push dword [esi + 0x3c]
push str.TCPClient__connect_failed__d____s__s_
push 3
push 0x6b2b20
call fcn.00403570
mov eax, dword [ebp - 0x44]
add esp, 0x18
cmp eax, 8
jb 0x41027f
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00408960
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov word [ebp - 0x58], ax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
cmp eax, 8
jb 0x410334
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00408960
jmp 0x410334
cmp byte [0x6b2b20], 0
je 0x410329
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x70]
mov edx, dword [edx + 0x18]
call fcn.0040ee90
mov dword [ebp - 4], 6
cmp dword [eax + 0x14], 8
jb 0x4102e1
mov eax, dword [eax]
push eax
push dword [esi + 0x3c]
push str.TCPClient__connected__d____s
push 1
push 0x6b2b20
call fcn.00403570
mov dword [ebp - 4], 0xffffffff
add esp, 0x14
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x410315
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00408960
xor eax, eax
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
mov dword [esi + 0x38], 0
mov byte [ebp - 0x39], 1
cmp dword [ebp - 0x38], 0
jne 0x410349
push 0
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ebp - 0x38], 0
mov al, byte [ebp - 0x39]
test al, al
jne 0x410360
cmp dword [esi + 0x3c], 0xffffffff
je 0x410360
mov ecx, esi
call fcn.00410380
mov al, byte [ebp - 0x39]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005697c8
mov esp, ebp
pop ebp
ret 8