Function at 0x401a42
Capabilities:
Create tcp socket
Create thread
Create udp socket
Initialize winsock library
Set socket configuration
Start tcp server
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
mov dword [ebp - 0x1b4], 1
mov dword [ebp - 0x1b8], 0x10
lea eax, [address.sin_zero]
mov dword [esp + 4], eax
mov dword [esp], 0x202
call sym._WSAStartup_8
sub esp, 8
test eax, eax
je 0x401aa2
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.WSAStartup_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
jmp 0x401d29
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sym._socket_12
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x401af5
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.Socket_creation_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
call sym._WSACleanup_0
jmp 0x401d29
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x1b4]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._setsockopt_20
sub esp, 0x14
cmp eax, 0xffffffff
jne 0x401b63
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.setsockopt_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
jmp 0x401d29
mov word [ebp - 0x1b0], 2
mov dword [ebp - 0x1ac], 0
mov dword [esp], 0x1f97
call sym._htons_4
sub esp, 4
mov word [ebp - 0x1ae], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1b0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._bind_12
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x401bea
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.Bind_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
jmp 0x401d29
mov dword [esp + 4], 3
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._listen_8
sub esp, 8
cmp eax, 0xffffffff
jne 0x401c3e
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.Listen_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
jmp 0x401d29
mov dword [esp + 4], 0x1f97
mov dword [esp], str.Server_listening_on_port__d_n
call sym._printf
mov dword [esp], 4
call sym._malloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401ca8
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1a
mov dword [esp + 4], 1
mov dword [esp], str.Memory_allocation_failed._n
call sym._fwrite
nop
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
call sym._WSACleanup_0
jmp 0x401d29
lea eax, [ebp - 0x1b8]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1b0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._accept_12
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
cmp eax, 0xffffffff
jne 0x401d09
call sym._WSAGetLastError_0
mov dword [esp + 8], eax
mov dword [esp + 4], str.Accept_failed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._free
jmp 0x401d24
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], dbg.handle_client
call sym.__beginthread
jmp 0x401c52
leave
ret