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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10089044
mov eax, dword fs:[0]
push eax
sub esp, 0x200
mov eax, dword [0x100bc1b4]
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 0x100934b0
mov dword [ebp - 0x1fc], eax
call fcn.1000b130
push 0x190
lea eax, [ebp - 0x1ec]
push 0
push eax
call fcn.100592a0
add esp, 0x10
lea eax, [ebp - 0x1ec]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
je 0x1002fb78
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str._:_d_:_u._n
call fcn.1000b130
add esp, 0xc
jmp 0x1002ffbe
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1002fba4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x10093508
call fcn.1000b130
add esp, 8
jmp 0x1002ffb8
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x200], eax
test eax, eax
jne 0x1002fbcd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x10093538
call fcn.1000b130
add esp, 8
jmp 0x1002ffb1
mov ecx, dword [0x100bd5b0]
test ecx, ecx
jne 0x1002fc42
push 0x100b2004
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x100bd5b0], 0
jne 0x1002fc29
push 0x1c
call fcn.10053309
mov esi, eax
add esp, 4
mov dword [ebp - 0x1f0], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x1002fc1a
lea ecx, [esi + 4]
mov dword [esi], vtable._BaseModule::CCriticalSection.0
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x1002fc1c
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov dword [0x100bd5b0], esi
push 0x100b2004
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x100bd5b0]
test ecx, ecx
jne 0x1002fc42
xor eax, eax
jmp 0x1002fca4
mov eax, dword [0x100bd5ac]
test eax, eax
jne 0x1002fca4
mov eax, dword [ecx]
push ecx
call dword [eax]
cmp dword [0x100bd5ac], 0
jne 0x1002fc94
push 0x14
call fcn.10053309
add esp, 4
mov dword [ebp - 0x1f0], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x1002fc7f
mov ecx, eax
call fcn.1001b7a0
mov ecx, eax
jmp 0x1002fc81
xor ecx, ecx
mov dword [ebp - 4], 0xffffffff
xchg dword [ebp - 0x1f4], eax
mov dword [0x100bd5ac], ecx
mov eax, dword [0x100bd5b0]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
mov eax, dword [0x100bd5ac]
mov ecx, eax
call fcn.1001cf50
movzx eax, ax
xorps xmm0, xmm0
movups xmmword [ebp - 0x20], xmm0
mov ecx, 2
mov dword [ebp - 0x1f4], 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 0x1002fd54
mov eax, dword [ebp - 0x1f4]
movzx eax, ax
mov dword [ebp - 0x1f0], eax
lea ecx, [eax + 0xa]
mov dword [ebp - 0x1f4], ecx
inc esi
movzx eax, si
mov dword [ebp - 0x20c], eax
cmp eax, ecx
ja 0x1002fd34
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 - 0x1f4]
test eax, eax
jne 0x1002fd02
jmp 0x1002fd54
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x1f0]
push 0x10093564
call fcn.1000b130
add esp, 0x10
mov ecx, dword [0x100bd5b0]
test ecx, ecx
jne 0x1002fdcc
push 0x100b2004
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x100bd5b0], 0
jne 0x1002fdb3
push 0x1c
call fcn.10053309
add esp, 4
mov dword [ebp - 0x1f0], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x1002fda5
lea ecx, [eax + 4]
mov dword [eax], vtable._BaseModule::CCriticalSection.0
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [ebp - 0x1f0]
jmp 0x1002fda7
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x100bd5b0], eax
push 0x100b2004
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x100bd5b0]
test ecx, ecx
jne 0x1002fdcc
xor eax, eax
jmp 0x1002fe2e
mov eax, dword [0x100bd5ac]
test eax, eax
jne 0x1002fe2e
mov eax, dword [ecx]
push ecx
call dword [eax]
cmp dword [0x100bd5ac], 0
jne 0x1002fe1e
push 0x14
call fcn.10053309
add esp, 4
mov dword [ebp - 0x1f0], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x1002fe09
mov ecx, eax
call fcn.1001b7a0
mov ecx, eax
jmp 0x1002fe0b
xor ecx, ecx
mov dword [ebp - 4], 0xffffffff
xchg dword [ebp - 0x1f0], eax
mov dword [0x100bd5ac], ecx
mov eax, dword [0x100bd5b0]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
mov eax, dword [0x100bd5ac]
lea ecx, [ebp - 0x1f8]
push ecx
mov ecx, eax
call fcn.1001d020
mov dword [ebp - 4], 4
push dword [ebp - 0x1f8]
movzx eax, si
push eax
push str.Port
call fcn.10024340
push 0x10
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1002fe7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._:_u._n
call fcn.1000b130
add esp, 8
jmp 0x1002ff80
mov eax, dword [ebp - 0x1fc]
push 8
mov dword [ebp - 0x208], eax
mov eax, dword [ebp - 0x200]
push eax
push edi
mov dword [ebp - 0x204], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x1002febc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x100935c0
call fcn.1000b130
add esp, 8
jmp 0x1002ff80
push 0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x208]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov esi, eax
cmp esi, 2
jae 0x1002ff6b
mov eax, dword [ebp - 0x1fc]
cmp eax, dword [ebp + esi*4 - 0x208]
je 0x1002ff5c
push 0x2c
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.100592a0
add esp, 0xc
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x200]
push edi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test dword [ebp - 0x5c], 8
je 0x1002ff4d
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 - 0x1fc]
call fcn.1002f940
jmp 0x1002febc
push str.._n
call fcn.1000b130
add esp, 4
jmp 0x1002ff80
push 0x1009363c
call fcn.1000b130
add esp, 4
jmp 0x1002ff80
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push 0x10093604
call fcn.1000b130
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x1f8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002ffa5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x200]
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]
push str...._n
call fcn.1000b130
add esp, 4
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.100536aa
mov esp, ebp
pop ebp
ret 4