Function at 0x10021140
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Start tcp server

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10083410
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x100ac1c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x190
mov dword [ebp - 0x1f8], eax
lea eax, [ebp - 0x1ec]
push 0
push eax
call fcn.100503b0
add esp, 0xc
lea eax, [ebp - 0x1ec]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x100211ad
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x100213bf
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100211cb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x100213b9
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x1fc], eax
test eax, eax
jne 0x100211e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x100213b2
mov ecx, dword [0x100ad9bc]
test ecx, ecx
jne 0x10021252
push 0x100ab084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x100ad9bc], 0
jne 0x10021241
push 0x14
call fcn.1004771c
add esp, 4
mov dword [ebp - 0x1f0], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x10021228
mov ecx, eax
call fcn.10014120
jmp 0x1002122a
xor eax, eax
mov dword [ebp - 4], 0xffffffff
xor edx, edx
lea ecx, [ebp - 0x1f0]
lock or dword [ecx], edx
mov dword [0x100ad9bc], eax
push 0x100ab084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x100ad9bc]
call fcn.10014270
movzx eax, ax
xorps xmm0, xmm0
movups xmmword [ebp - 0x20], xmm0
mov ecx, 2
mov dword [ebp - 0x1f0], eax
push eax
movzx esi, ax
mov word [ebp - 0x20], cx
mov dword [ebp - 0x1c], 0
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x100212da
mov eax, dword [ebp - 0x1f0]
movzx ecx, ax
add ecx, 0xa
mov dword [ebp - 0x1f0], ecx
inc esi
movzx eax, si
cmp eax, ecx
ja 0x100212d4
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
mov ecx, dword [ebp - 0x1f0]
test eax, eax
jne 0x100212a8
jmp 0x100212da
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [0x100ad9bc]
test ecx, ecx
jne 0x10021346
push 0x100ab084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x100ad9bc], 0
jne 0x10021335
push 0x14
call fcn.1004771c
add esp, 4
mov dword [ebp - 0x1f0], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x1002131c
mov ecx, eax
call fcn.10014120
jmp 0x1002131e
xor eax, eax
mov dword [ebp - 4], 0xffffffff
xor edx, edx
lea ecx, [ebp - 0x1f0]
lock or dword [ecx], edx
mov dword [0x100ad9bc], eax
push 0x100ab084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x100ad9bc]
lea eax, [ebp - 0x1f4]
push eax
call fcn.10014360
mov dword [ebp - 4], 2
push dword [ebp - 0x1f4]
movzx eax, si
push eax
push str.Port
call fcn.10019190
push 0x10
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x100213de
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x1f4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100213a5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1fc]
push esi
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10047acb
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp - 0x1fc]
mov eax, dword [ebp - 0x1f8]
push 8
push esi
push edi
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x200], esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x10021434
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x1f4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100213ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x100213ab
push 0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x204]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 2
jae 0x100214ba
mov ecx, dword [ebp - 0x1f8]
cmp ecx, dword [ebp + eax*4 - 0x204]
je 0x100214c0
push 0x2c
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.100503b0
add esp, 0xc
lea eax, [ebp - 0x5c]
push eax
push esi
push edi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test dword [ebp - 0x5c], 8
je 0x100214c0
lea eax, [ebp - 0x1f0]
mov dword [ebp - 0x1f0], 0x10
push eax
lea eax, [ebp - 0x30]
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x30], xmm0
call dword [sym.imp.WS2_32.dll_accept]
lea ecx, [ebp - 0x30]
push ecx
push eax
push dword [ebp - 0x1f8]
call fcn.10020fd0
jmp 0x10021434
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1002140a