Function at 0x40ce40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5ac
push ebx
push esi
push edi
lea eax, [esp + 0x428]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40cecf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov byte [esp + 0x28], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
push esi
stosw word es:[edi], ax
lea ecx, [esp + 0x2c]
push str.SSLTray:_WSAStartup_failed_with_error__d
push ecx
stosb byte es:[edi], al
call fcn.0044dd9b
lea edx, [esp + 0x34]
push edx
call fcn.00402a90
push esi
lea eax, [esp + 0x3c]
push 0x47c9e0
push eax
call fcn.0044dd9b
add esp, 0x1c
call fcn.00411520
push 0
lea ecx, [esp + 0x2c]
push ecx
push 1
mov ecx, eax
call fcn.004117f0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40cf28
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov byte [esp + 0x28], 0
xor eax, eax
mov ecx, 0xff
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
push esi
stosw word es:[edi], ax
lea edx, [esp + 0x2c]
push str.SSLTray:_socket_failed_with_error__d
push edx
stosb byte es:[edi], al
call fcn.0044dd9b
lea eax, [esp + 0x34]
push eax
call fcn.00402a90
add esp, 0x10
call dword [sym.imp.WS2_32.dll_WSACleanup]
push esi
jmp 0x40cfbc
mov eax, dword [ebp + 0xc]
push eax
mov word [esp + 0x1c], 2
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp + 8]
push ecx
mov word [esp + 0x1e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x10
lea edx, [esp + 0x1c]
push edx
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cfed
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
xor eax, eax
mov byte [esp + 0x28], 0
mov ecx, 0xff
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
push eax
push ecx
lea edx, [esp + 0x34]
push str.SSLTray:_connect__s:_d_failed_with_error__d
push edx
call fcn.0044dd9b
lea eax, [esp + 0x3c]
push eax
call fcn.00402a90
add esp, 0x18
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push ebx
lea ecx, [esp + 0x2c]
push 0x47c9e0
push ecx
call fcn.0044dd9b
add esp, 0xc
call fcn.00411520
push 0
lea edx, [esp + 0x2c]
push edx
push 1
mov ecx, eax
call fcn.004117f0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x18]
push eax
push 1
push 6
push esi
mov dword [esp + 0x28], 1
call edi
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1006
xor eax, eax
push 0xffff
push esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
call edi
push 4
lea edx, [esp + 0x10]
push edx
push 0x1005
push 0xffff
push esi
call edi
call fcn.00411520
push 1
mov edi, eax
push 0x47a7a9
push 1
mov ecx, edi
call fcn.004117f0
push 1
push 0x49f068
push 1
mov ecx, edi
call fcn.00411760
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret