Function at 0x40c6e8
Capabilities:
Create tcp socket
Initialize winsock library
Start tcp server

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe40
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0xc], eax
lea esi, [ebp - 8]
mov edi, 0x40e734
xor eax, eax
push ebp
push 0x40c9a9
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x40e730], 0
lea eax, [ebp - 0x19c]
push eax
mov dl, 1
mov al, 1
call fcn.004042e4
push eax
call sub.wsock32.dll_WSAStartup
mov ebx, eax
test ebx, ebx
je 0x40c78c
lea edx, [ebp - 0x1b0]
mov eax, ebx
call fcn.00404a80
mov ecx, dword [ebp - 0x1b0]
lea eax, [ebp - 0xc]
mov edx, 0x40c9c0
call fcn.004036d0
push 0x10
push 0x40c9e8
mov eax, dword [ebp - 0xc]
call fcn.00403884
push eax
push 0
call sub.user32.dll_MessageBoxA_1
call fcn.0040338c
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [edi], eax
cmp dword [edi], 0xffffffff
jne 0x40c7dd
call sub.wsock32.dll_WSAGetLastError
lea edx, [ebp - 0x1b4]
call fcn.00404a80
mov ecx, dword [ebp - 0x1b4]
lea eax, [ebp - 0xc]
mov edx, 0x40ca00
call fcn.004036d0
push 0x10
push 0x40c9e8
mov eax, dword [ebp - 0xc]
call fcn.00403884
push eax
push 0
call sub.user32.dll_MessageBoxA_1
call fcn.0040338c
mov word [ebp - 0x1ac], 2
mov ax, word [0x40e71c]
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x1aa], ax
mov eax, dword [0x40e720]
mov dword [ebp - 0x1a8], eax
push 0x10
lea eax, [ebp - 0x1ac]
push eax
mov eax, dword [edi]
push eax
call sub.wsock32.dll_bind
inc eax
jne 0x40c87f
push 0x30
call sub.user32.dll_MessageBeep
push 0x40ca2c
call sub.wsock32.dll_WSAGetLastError
lea edx, [ebp - 0x1bc]
call fcn.00404a80
push dword [ebp - 0x1bc]
push 0x40ca58
push 0x40ca68
lea edx, [ebp - 0x1c0]
mov eax, dword [0x40e71c]
call fcn.00404a80
push dword [ebp - 0x1c0]
push 0x40cac0
lea eax, [ebp - 0x1b8]
mov edx, 6
call fcn.00403744
mov eax, dword [ebp - 0x1b8]
call fcn.004097e4
call fcn.0040338c
call fcn.0040c310
push 0x64
mov eax, dword [edi]
push eax
call sub.wsock32.dll_listen
call fcn.0040c33c
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1ac]
push eax
mov eax, dword [edi]
push eax
call sub.wsock32.dll_accept
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40c976
cmp byte [0x40e730], 0
jne 0x40c976
mov dl, 1
mov eax, dword [0x404468]
call fcn.00402b2c
mov dword [esi], eax
mov eax, dword [esi]
mov dword [eax + 0x10], ebx
mov eax, dword [esi]
mov edx, dword [ebp - 0x1a8]
mov dword [eax + 0xc], edx
movzx eax, word [ebp - 0x1aa]
mov edx, dword [esi]
mov dword [edx + 8], eax
mov eax, dword [esi]
mov edx, dword [eax]
call dword [edx]
test al, al
jne 0x40c902
mov eax, esi
call fcn.004058bc
jmp 0x40c893
mov eax, dword [0x40d2ac]
mov eax, dword [eax]
call fcn.00405490
mov eax, dword [0x40d2b0]
cmp dword [eax], 0
jne 0x40c936
mov eax, dword [0x40d2b4]
mov eax, dword [eax]
mov dword [eax + 0x14], 0xea60
mov eax, dword [0x40d2b4]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
push eax
call sub.kernel32.dll_SetEvent
mov eax, dword [0x40d2b0]
inc dword [eax]
mov eax, dword [0x40d2ac]
mov eax, dword [eax]
call fcn.004054c0
mov dl, 1
mov eax, dword [0x407064]
call fcn.00407904
mov ebx, eax
mov byte [ebx + 0xe], 1
mov eax, dword [esi]
mov dword [ebx + 0x201c], eax
mov eax, dword [esi]
call fcn.00405cb8
mov eax, ebx
call fcn.00405aa4
jmp 0x40c893
cmp dword [edi], 0xffffffff
je 0x40c983
mov eax, dword [edi]
push eax
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c9b0
lea eax, [ebp - 0x1c0]
mov edx, 5
call fcn.00403524
lea eax, [ebp - 0xc]
call fcn.00403500
ret