Function at 0x401676
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push ecx
mov eax, 0x1210
call fcn.00402910
sub esp, eax
call dbg.__main
lea eax, [ebp - 0x1a8]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WSOCK32.DLL_WSAStartup]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4016d7
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.WSAStartup_failed_with_error:__d_n
call sym._printf
mov eax, 1
jmp 0x40197c
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401729
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.socket_failed_with_error:__ld_n
call sym._printf
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
mov eax, 1
jmp 0x40197c
mov word [ebp - 0x1b8], 2
mov dword [esp], str.SERVER_IP_ADDRESS
mov eax, dword [sym.imp.WSOCK32.DLL_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x1b4], eax
mov dword [esp], 0x1f90
mov eax, dword [sym.imp.WSOCK32.DLL_htons]
call eax
sub esp, 4
mov word [ebp - 0x1b6], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1b8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4017c4
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.connect_failed_with_error:__d_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
mov eax, 1
jmp 0x40197c
lea edx, [ebp - 0x11e0]
mov eax, 0
mov ecx, 0xa
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x11dc], sym._WindowProc_16
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call eax
sub esp, 4
mov dword [ebp - 0x11d0], eax
mov dword [ebp - 0x11bc], str.RemoteViewerWindow
lea eax, [ebp - 0x11e0]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_RegisterClassA]
call eax
sub esp, 4
mov eax, dword [ebp - 0x11d0]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0x258
mov dword [esp + 0x18], 0x320
mov dword [esp + 0x14], 0x80000000
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0xcf0000
mov dword [esp + 8], str.Remote_Viewer
mov dword [esp + 4], str.RemoteViewerWindow
mov dword [esp], 0
mov eax, dword [sym.imp.USER32.dll_CreateWindowExA]
call eax
sub esp, 0x30
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4018b7
mov dword [esp], str.Failed_to_create_window_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
mov eax, 1
jmp 0x40197c
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
sub esp, 8
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_UpdateWindow]
call eax
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x11b8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x401947
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.recv_failed_with_error:__d_n
call sym._printf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WSOCK32.DLL_WSACleanup]
call eax
mov eax, 1
jmp 0x40197c
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_InvalidateRect]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_UpdateWindow]
call eax
sub esp, 4
jmp 0x4018df
lea esp, [ebp - 8]
pop ecx
pop edi
pop ebp
lea esp, [ecx - 4]
ret