Function at 0x4010e0
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get hostname
Initialize winsock library
Resolve dns
Start tcp server

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x2e8
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x2e4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [esp + 0x30], eax
lea eax, [esp + 0x58]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401128
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x4036a8
jmp 0x401354
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401151
call esi
push eax
push 0x4036cc
call fcn.00401020
add esp, 8
mov eax, dword [ebp + 8]
mov dword [esp + 0x2c], 0x2328
cmp eax, 2
jl 0x40117b
mov eax, dword [esp + 0x30]
push dword [eax + 4]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
movzx eax, ax
add esp, 4
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
cmp eax, 3
jl 0x4011a0
mov eax, dword [esp + 0x30]
mov edx, 0x405378
mov ecx, dword [eax + 8]
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x401190
jmp 0x4011bf
push 0x4036ec
call fcn.00401020
add esp, 4
push 0x405378
push str.___r_n_
call fcn.00401060
add esp, 8
push pe_nt_image_headers32
lea eax, [esp + 0x1ec]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [esp + 0x1e8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
push dword [esp + 0x2c]
xorps xmm0, xmm0
mov eax, 2
movlpd qword [esp + 0x40], xmm0
mov word [esp + 0x38], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
lea eax, [esp + 0x34]
push 0x10
push eax
push edi
mov dword [esp + 0x44], 0
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40122a
call esi
push eax
push 0x403710
jmp 0x401354
push bind
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x401248
call esi
push eax
push 0x403734
jmp 0x401354
mov eax, dword [esp + 0x2c]
movzx eax, ax
push eax
push 0x40374c
call fcn.00401020
add esp, 8
mov dword [esp + 0x2c], 0x10
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
je 0x401348
cmp dword [0x40547c], 0x64
jb 0x4012bb
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [esp + 0x12]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x64
push 0x403790
call fcn.00401020
add esp, 0x10
jmp 0x401324
push dword [esp + 0x12]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x4037d8
call fcn.00401020
movups xmm0, xmmword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x44], esi
lea eax, [esp + 0x30]
movups xmmword [esp + 0x48], xmm0
push eax
push 0
lea eax, [esp + 0x4c]
push eax
push 0x401380
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
lock inc dword [0x40547c]
mov eax, dword [0x40547c]
push eax
push 0x403804
call fcn.00401020
add esp, 8
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0x10
push eax
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401281
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x40376c
call fcn.00401020
mov ecx, dword [esp + 0x2f4]
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.00401a51
mov esp, ebp
pop ebp
ret