Function at 0x406f70
Capabilities:
Create tcp socket
Create thread
Create udp socket
Get system information on windows
Initialize winsock library
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x429b91
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x431040]
xor eax, esp
mov dword [esp + 0x1f0], eax
push ebx
push esi
push edi
mov eax, dword [0x431040]
xor eax, esp
push eax
lea eax, [esp + 0x208]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, str.360EntPublish.log
lea esi, [esp + 0x2c]
call fcn.00408040
mov esi, dword [eax]
call fcn.00402da0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fe7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, str.logscache.log
lea esi, [esp + 0x34]
call fcn.00408040
mov eax, dword [eax]
push 1
push 1
push 0x1000000
mov edi, eax
mov esi, 0x433658
call fcn.004040f0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40702c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x4336f4], 0
jne 0x40703f
mov dword [0x4334f4], 0
lea ecx, [esp + 0x6c]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40705e
push eax
push str.WSAStartup_error__d
jmp 0x40741d
call fcn.00407eb0
push 1
push 0
push 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov edi, eax
mov dword [esp + 0x28], edi
cmp edi, 0xffffffff
jne 0x407091
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSASocket___error__d
jmp 0x40741d
mov edx, 2
push 0
mov word [esp + 0x60], dx
call dword [sym.imp.WS2_32.dll_htonl]
push ebx
mov dword [esp + 0x64], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x5e], ax
push 0x10
lea eax, [esp + 0x60]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x407211
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind___error__d
mov esi, 0x4334c8
call fcn.00402e70
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
push ebx
push ecx
call fcn.004080f0
add esp, 8
mov dword [esp + 0x210], 0
mov edx, dword [0x4321e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x4321e8
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov edx, 0x42bf6c
lea ebx, [esp + 0x14]
mov byte [esp + 0x210], 1
call fcn.00401640
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
je 0x4071a5
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x14]
mov edx, 0x42bf88
call fcn.00407a40
add esp, 4
mov byte [esp + 0x210], 2
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
push eax
mov eax, ebx
push eax
call fcn.004039c0
mov byte [esp + 0x210], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40718e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push ecx
push str.bind_use_by__s
mov esi, 0x4334c8
call fcn.00402e70
add esp, 8
mov esi, dword [esp + 0x14]
push 0x10
push 0x42bfa4
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [esi - 0x10]
mov byte [esp + 0x210], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4071dd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x210], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40742a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40742a
movzx ecx, bx
push ecx
push str.bind_port__d
mov esi, 0x4334c8
call fcn.00402e70
add esp, 8
push 0x14
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x407255
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen___error__d
call fcn.00402e70
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40742a
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40727c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateIoCompletionPort_error:__d
jmp 0x40741d
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ebx, dword [esp + 0x4c]
add ebx, ebx
xor esi, esi
test ebx, ebx
jle 0x4072ca
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push 0
push ecx
push 0x407870
push 0
push 0
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4073ee
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, ebx
jl 0x407293
cmp dword [0x4336f4], 1
jne 0x4072e0
mov dword [0x4334f4], 0
lea ecx, [ecx]
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_WSAAccept]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40730f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAAccept___error__d
mov esi, 0x4334c8
call fcn.00402e70
add esp, 8
push 0x4330c0
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
call fcn.00406c30
mov ebx, eax
test ebx, ebx
je 0x4073fc
mov edx, dword [0x4336f8]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x1c]
push eax
push 0x1002
push 0xffff
push edi
mov dword [esp + 0x2c], edx
call esi
push 4
lea ecx, [esp + 0x1c]
push ecx
push 0x1001
push 0xffff
push edi
call esi
push 0x4180
push 0
push ebx
call fcn.0041c570
add esp, 0xc
lea edx, [esp + 0x24]
push edx
lea eax, [ebx + 8]
push eax
mov dword [ebx + 4], edi
push edi
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_getpeername]
mov ecx, dword [0x4330c0]
push edi
push ecx
push str.__2d___d_connected
mov esi, 0x4334c8
call fcn.00402e70
mov esi, dword [esp + 0x28]
add esp, 0xc
push 0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x407411
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea edx, [ebx + 0x134]
push edx
push ebx
push 0x12345678
push esi
mov dword [ebx + 0x4170], eax
mov dword [ebx + 0x4158], 3
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov edi, dword [esp + 0x28]
jmp 0x4072e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateThread___error__d
jmp 0x40741d
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GlobalAlloc___error__d
jmp 0x40741d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateIoCompletionPort_error__d
mov esi, 0x4334c8
call fcn.00402e70
add esp, 8
mov ecx, dword [esp + 0x208]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.0041a2c9
mov esp, ebp
pop ebp
ret