Function at 0x412dc0
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d92dd
mov eax, dword fs:[0]
push eax
sub esp, 0x1cc
mov eax, dword [0x51093c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1a8], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1cc], edi
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 4], 0
mov dword [edi], 0
mov dword [edi + 4], 0
call fcn.00409af0
mov dword [edi], eax
lea eax, [edi + 0x34]
push 2
push eax
call fcn.0049eb91
add esp, 8
mov dword [edi + 0x64], 0
mov dword [edi + 0x68], 0
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 3
mov dword [edi + 0x20], 1
mov dword [ebp - 0x1c4], 1
mov dword [edi + 0x1c], 0x10
mov dword [edi + 0x24], eax
test ecx, ecx
je 0x412e6c
lock inc dword [ecx + 4]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x64], eax
mov esi, dword [edi + 0x68]
mov dword [edi + 0x68], ecx
test esi, esi
je 0x412e9d
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x412e9d
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x412e9d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [ebp - 0x1a0]
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x412eba
push str.WSAStartup___error_
jmp 0x412ebf
push str.WSAStartup___succeed._n
call fcn.00413610
add esp, 4
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [edi + 8], eax
test eax, eax
js 0x413171
mov ebx, dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [ebp - 0x1c4]
push 4
push ecx
push 4
push 0xffff
push eax
call ebx
test eax, eax
jne 0x413185
push dword [ebp - 0x1a4]
mov eax, 2
mov dword [edi + 0x10], 0
lea esi, [edi + 0xc]
mov word [esi], ax
call dword [sym.imp.WSOCK32.dll_htons]
push 0x10
push esi
push dword [edi + 8]
mov word [edi + 0xe], ax
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
js 0x413199
push 3
push dword [edi + 8]
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
js 0x4131ad
push 4
lea eax, [ebp - 0x1c8]
mov dword [ebp - 0x1c8], 1
push eax
push 1
push 6
push dword [edi + 8]
call ebx
push str.Server_started_
push 0x5150c8
call fcn.004020e0
push eax
call fcn.004026f0
add esp, 0xc
push dword [ebp - 0x1a4]
push str._Port:
push 0x5150c8
call fcn.004020e0
add esp, 8
mov ecx, eax
call fcn.00403c00
push eax
call fcn.004026f0
push 8
mov byte [edi + 0x30], 1
call fcn.004a20f7
mov ebx, eax
add esp, 8
mov dword [ebp - 0x1d0], ebx
mov byte [ebp - 4], 4
test ebx, ebx
je 0x413144
push 8
call fcn.004a20f7
mov esi, eax
add esp, 4
test esi, esi
je 0x412fde
mov dword [esi], edi
mov dword [esi + 4], 0x4133b0
jmp 0x412fe0
xor esi, esi
mov dword [ebp - 0x1a4], esi
lea eax, [ebp - 0x1bc]
mov byte [ebp - 4], 5
push eax
call fcn.0049f709
add esp, 4
test eax, eax
je 0x413006
push eax
call fcn.0049ecab
add esp, 4
mov eax, dword [ebp - 0x1bc]
mov byte [ebp - 0x1ac], 1
mov dword [ebp - 0x1a8], eax
lea eax, [ebp - 0x1b8]
mov byte [ebp - 4], 6
push 1
push eax
call fcn.0049eb5f
add esp, 8
test eax, eax
je 0x41303b
push eax
call fcn.0049ecab
add esp, 4
mov eax, dword [ebp - 0x1b8]
mov byte [ebp - 0x1d8], 1
mov dword [ebp - 0x1d4], eax
push eax
mov byte [ebp - 4], 7
mov byte [ebp - 0x1b4], 0
call fcn.0049ebb2
add esp, 4
test eax, eax
je 0x41306f
push eax
call fcn.0049ecab
add esp, 4
mov dword [ebp - 0x1c0], 0x4e4b70
mov dword [ebp - 0x1a4], 0
mov dword [ebp - 0x1b0], esi
lea eax, [ebp - 0x1c0]
mov byte [ebp - 4], 8
push eax
push 0x404f90
push ebx
call fcn.0049eef1
add esp, 0xc
mov ecx, 1
cmp eax, 4
cmovne ecx, eax
test ecx, ecx
je 0x4130ba
push ecx
call fcn.0049ecab
add esp, 4
cmp byte [ebp - 0x1b4], 0
jne 0x4130ed
push dword [ebp - 0x1b8]
push dword [ebp - 0x1bc]
call fcn.0049f75b
add esp, 8
test eax, eax
je 0x4130e4
push eax
call fcn.0049ecab
add esp, 4
cmp byte [ebp - 0x1b4], 0
je 0x4130c3
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x413102
push 8
push eax
call fcn.004a2127
add esp, 8
mov esi, dword [ebp - 0x1b8]
mov eax, dword [ebp - 0x1bc]
push esi
mov byte [ebp - 4], 9
mov dword [ebp - 0x1a8], eax
call fcn.0049ebd7
add esp, 4
test eax, eax
je 0x41312e
push eax
call fcn.0049ecab
add esp, 4
push esi
call fcn.0049eb1b
push dword [ebp - 0x1a8]
call fcn.0049f6d2
add esp, 8
jmp 0x413146
xor ebx, ebx
lea ecx, [ebp + 0x10]
mov dword [edi + 0x28], ebx
call fcn.00401720
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a2135
mov esp, ebp
pop ebp
ret 0x10
push str.socket_failed
call fcn.004bf775
add esp, 4
push 1
call fcn.004bf73b
push str.setsockopt
call fcn.004bf775
add esp, 4
push 1
call fcn.004bf73b
push str.bind_failed
call fcn.004bf775
add esp, 4
push 1
call fcn.004bf73b
push str.listen
call fcn.004bf775
add esp, 4
push 1
call fcn.004bf73b
int3