Function at 0x407560
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 0x42bb91
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x4340a0]
xor eax, esp
mov dword [esp + 0x1f0], eax
push ebx
push esi
push edi
mov eax, dword [0x4340a0]
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.00408650
mov esi, dword [eax]
call fcn.004033f0
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 0x4075d7
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.00408650
mov eax, dword [eax]
push 1
push 1
push 0x1000000
mov edi, eax
mov esi, 0x4366d8
call fcn.00404680
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 0x40761c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x436774], 0
jne 0x40762f
mov dword [0x436574], 0
lea ecx, [esp + 0x6c]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40764e
push eax
push str.WSAStartup_error__d
jmp 0x407a0d
call fcn.004084c0
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 0x407681
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSASocket___error__d
jmp 0x407a0d
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 0x407801
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind___error__d
mov esi, 0x436548
call fcn.004034c0
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x10]
push ebx
push ecx
call fcn.00408700
add esp, 8
mov dword [esp + 0x210], 0
mov edx, dword [0x435210]
mov eax, dword [edx + 0xc]
mov ecx, 0x435210
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov edx, 0x42e0a0
lea ebx, [esp + 0x14]
mov byte [esp + 0x210], 1
call fcn.00401c70
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
je 0x407795
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x14]
mov edx, 0x42e0bc
call fcn.00408030
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.00404010
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 0x40777e
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, 0x436548
call fcn.004034c0
add esp, 8
mov esi, dword [esp + 0x14]
push 0x10
push 0x42e0d8
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 0x4077cd
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 0x407a1a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x407a1a
movzx ecx, bx
push ecx
push str.bind_port__d
mov esi, 0x436548
call fcn.004034c0
add esp, 8
push 0x14
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x407845
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen___error__d
call fcn.004034c0
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x407a1a
push 0
push 0
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40786c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateIoCompletionPort_error:__d
jmp 0x407a0d
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 0x4078ba
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push 0
push ecx
push 0x407e60
push 0
push 0
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4079de
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, ebx
jl 0x407883
cmp dword [0x436774], 1
jne 0x4078d0
mov dword [0x436574], 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 0x4078ff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAAccept___error__d
mov esi, 0x436548
call fcn.004034c0
add esp, 8
push 0x436140
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
call fcn.00407220
mov ebx, eax
test ebx, ebx
je 0x4079ec
mov edx, dword [0x436778]
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.0041e4d0
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 [0x436140]
push edi
push ecx
push str.__2d___d_connected
mov esi, 0x436548
call fcn.004034c0
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 0x407a01
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 0x4078d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateThread___error__d
jmp 0x407a0d
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 0x407a0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateIoCompletionPort_error__d
mov esi, 0x436548
call fcn.004034c0
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.0041c227
mov esp, ebp
pop ebp
ret