Function at 0x406fc0
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x42b040]
xor eax, ebp
mov dword [ebp - 8], eax
mov ax, word [ebp + 8]
push ebx
push esi
push edi
push 1
push 0
push 0
push 0
push 1
push 2
mov word [0x42d314], ax
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov dword [0x42d30c], eax
cmp eax, 0xffffffff
jne 0x407000
mov esi, str._SocketTCP__WSASocket___failed_with_error:__d
jmp 0x40705c
mov eax, 2
push 0
mov word [ebp - 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x14], eax
movzx eax, word [0x42d314]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x18]
push 0x10
push eax
push dword [0x42d30c]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x407044
mov esi, str._SocketTCP__bind___failed_with_error:__d
jmp 0x40705c
push 5
push dword [0x42d30c]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40708d
mov esi, str._SocketTCP__listen___failed_with_error:__d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push 1
call fcn.00408230
add esp, 0xc
mov ecx, 0x42d308
call fcn.00407280
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00408618
mov esp, ebp
pop ebp
ret 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4070d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketTCP__socket___failed_with_error:__d
push 1
call fcn.00408230
add esp, 0xc
mov ecx, 0x42d308
call fcn.00407280
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00408618
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [0x42d310], eax
test eax, eax
jne 0x407127
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketTCP__CreateIoCompletionPort___failed_with_error:__d
push 1
call fcn.00408230
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 0x42d308
call fcn.00407280
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00408618
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push 0x42d308
push 0x407b20
push 0
push 0
call ebx
mov dword [0x42d318], eax
test eax, eax
jne 0x407161
mov esi, str._SocketTCP__CreateThread___failed_with_error:__d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407062
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 2
push eax
call edi
test eax, eax
jne 0x407180
mov esi, str._SocketTCP__SetThreadPriority___failed_with_error:__d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407062
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x28]
mov ecx, 8
cmp eax, ecx
cmova eax, ecx
xor esi, esi
mov dword [0x42d33c], eax
test eax, eax
je 0x4071d3
push 0
push 0
push 0x42d308
push 0x407ee0
push 0
push 0
call ebx
mov dword [esi*4 + 0x42d31c], eax
test eax, eax
je 0x40720d
push 2
push eax
call edi
test eax, eax
je 0x4071fd
inc esi
cmp esi, dword [0x42d33c]
jb 0x4071a2
push 0
push 0x800
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov dword [0x42d374], eax
test eax, eax
jne 0x40721d
mov esi, str._SocketTCP__CreateSemaphore___failed_with_error:__d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407062
mov esi, str._SocketTCP__SetThreadPriority___failed_with_error:__d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407062
mov esi, str._SocketTCP__CreateThread___failed_with_error:__d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x407062
push 0
push 0
push 0x42d308
push 0x408080
push 0
push 0
call ebx
mov dword [0x42d378], eax
test eax, eax
je 0x407151
push 2
push eax
call edi
test eax, eax
je 0x407170
movzx eax, word [0x42d314]
push eax
push str._SocketTCP__Server_started_at_port___d_
push 0
call fcn.00408230
mov ecx, dword [ebp - 8]
add esp, 0xc
xor ecx, ebp
mov al, 1
pop edi
pop esi
pop ebx
call fcn.00408618
mov esp, ebp
pop ebp
ret 4