Function at 0x407870
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x58ff44
mov eax, dword fs:[0]
push eax
sub esp, 0x370
mov eax, dword [0x5f4760]
xor eax, esp
mov dword [esp + 0x368], eax
push ebx
push esi
push edi
mov eax, dword [0x5f4760]
xor eax, esp
push eax
lea eax, [esp + 0x380]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.00499fc0
call fcn.0049a9e0
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x388], 0
push 0x103
lea eax, [esp + 0x170]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x16c]
call fcn.00401bc0
mov ecx, str._main__MainProxyRoutine_Begin
call fcn.004930a0
mov edi, str.360EntPublish.log
lea esi, [esp + 0x18]
call fcn.004065f0
mov byte [esp + 0x388], 1
mov eax, dword [eax]
push 0
mov edi, eax
mov esi, 0x602250
call fcn.00409d40
mov byte [esp + 0x388], 0
lea ecx, [esp + 0x18]
push ecx
call fcn.00403090
mov edx, dword [0x601e4c]
push edx
push str.EntPublish__start_ServiceMode_d
call fcn.00409e30
add esp, 8
test ebx, ebx
je 0x407989
lea eax, [esp + 0x18]
push eax
mov esi, ebx
call fcn.00496eb0
mov byte [esp + 0x388], 2
mov ecx, dword [eax]
push ecx
push str.start_server_err_s
mov esi, 0x602250
call fcn.00409e30
add esp, 8
mov byte [esp + 0x388], 0
lea edx, [esp + 0x18]
push edx
call fcn.00403090
call fcn.00407670
cmp dword [0x601e4c], 0
mov edi, dword [sym.imp.KERNEL32.dll_CreateThread]
jne 0x4079b9
push 0
push 0
push 0
push 0x406aa0
push 0
push 0
call edi
test eax, eax
je 0x4079b9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004089d0
push str.GlobalEntPublish_360_v1.0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebx, eax
xor eax, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x407e51
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x407e51
call fcn.0042e960
test eax, eax
je 0x407a29
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
push eax
push str._InitLibCurl__u
mov esi, 0x602250
call fcn.00409e30
add esp, 8
call ebx
push eax
push str._main___InitLibCurl__u
call fcn.004916b0
add esp, 8
jmp 0x407e72
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
call fcn.00420f70
mov ebx, eax
call fcn.004215d0
test eax, eax
jne 0x407a8a
mov ecx, str._main__g_bDisableHttpsProxyByInitTRUE
mov dword [0x601e48], 1
call fcn.004930a0
call fcn.00493130
push 0
push 0
push 0
push 0x490470
push 0
push 0
call edi
mov ebx, eax
test ebx, ebx
jne 0x407ad9
call esi
push eax
push str._hThread_tcpfw_err_u
mov esi, 0x602250
call fcn.00409e30
add esp, 8
jmp 0x407af2
call fcn.0042e6a0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
mov byte [eax + 0x194], 1
call fcn.0042a120
test eax, eax
jne 0x407a57
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
push edi
push ebx
push str._AfxGetHttpsProxyMgr__u__u
mov esi, 0x602250
call fcn.00409e30
add esp, 0xc
push edi
push ebx
push str._main___AfxGetHttpsProxyMgr__u__u
call fcn.004916b0
add esp, 0xc
jmp 0x407e72
push str.Create__360TcpFwThreadPrc_OK
mov esi, 0x602250
call fcn.00409e30
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00440d20
mov byte [esp + 0x17], al
mov eax, dword [0x603e14]
push eax
push str._main__wan_limit:_u
call fcn.004916b0
mov ecx, dword [0x603e20]
push ecx
push str._main__lan_limit:_u
call fcn.004916b0
mov edx, dword [0x603e90]
push edx
push str.http_forwards_dir_count_d
call fcn.004916b0
xor esi, esi
add esp, 0x18
cmp dword [0x603e90], esi
jle 0x407bfe
mov bl, 4
cmp esi, 0xa
jae 0x407bfe
mov eax, dword [esi*8 + 0x603e44]
push 3
lea ecx, [esp + 0x174]
push eax
lea eax, [esp + 0x174]
mov dword [esp + 0x174], ecx
call fcn.004084d0
mov byte [esp + 0x388], 3
mov eax, dword [esi*8 + 0x603e40]
push 3
lea edx, [esp + 0x70]
push eax
lea eax, [esp + 0x70]
mov dword [esp + 0x70], edx
call fcn.004084d0
mov byte [esp + 0x388], bl
mov eax, dword [esp + 0x16c]
mov ecx, dword [esp + 0x68]
push eax
push ecx
push str._httpfwd_dir___s____s
call fcn.004916b0
add esp, 0xc
mov byte [esp + 0x388], 3
mov eax, dword [esp + 0x68]
lea edx, [esp + 0x6c]
cmp eax, edx
je 0x407bce
push eax
call fcn.004a4132
add esp, 4
mov byte [esp + 0x388], 0
mov eax, dword [esp + 0x16c]
lea ecx, [esp + 0x170]
cmp eax, ecx
je 0x407bf1
push eax
call fcn.004a4132
add esp, 4
inc esi
cmp esi, dword [0x603e90]
jl 0x407b40
mov edx, dword [0x603f34]
push edx
push str.http_forwards_page_count_d
call fcn.004916b0
xor esi, esi
add esp, 8
cmp dword [0x603f34], esi
jle 0x407cdf
mov bl, 5
cmp esi, 0x14
jae 0x407cdf
mov eax, dword [esi*8 + 0x603e98]
push 3
lea ecx, [esp + 0x70]
push eax
lea eax, [esp + 0x70]
mov dword [esp + 0x70], ecx
call fcn.004084d0
mov byte [esp + 0x388], bl
mov eax, dword [esi*8 + 0x603e94]
push 3
lea edx, [esp + 0x174]
push eax
lea eax, [esp + 0x174]
mov dword [esp + 0x174], edx
call fcn.004084d0
mov byte [esp + 0x388], 6
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x16c]
push eax
push ecx
push str._httpfwd_page___s____s
call fcn.004916b0
add esp, 0xc
mov byte [esp + 0x388], bl
mov eax, dword [esp + 0x16c]
lea edx, [esp + 0x170]
cmp eax, edx
je 0x407cb5
push eax
call fcn.004a4132
add esp, 4
mov byte [esp + 0x388], 0
mov eax, dword [esp + 0x68]
lea ecx, [esp + 0x6c]
cmp eax, ecx
je 0x407cd2
push eax
call fcn.004a4132
add esp, 4
inc esi
cmp esi, dword [0x603f34]
jl 0x407c22
mov eax, 0x603a08
call fcn.004577d0
cmp byte [esp + 0x17], 0
je 0x407df7
lea edx, [esp + 0x44]
push edx
call fcn.00450a50
mov byte [esp + 0x388], 7
lea eax, [esp + 0x44]
call fcn.00450b10
call fcn.004089d0
lea eax, [esp + 0x34]
push eax
call fcn.00496560
mov bl, 8
mov byte [esp + 0x388], bl
lea eax, [esp + 0x34]
call fcn.004577d0
lea eax, [esp + 0x28]
call fcn.0044f720
mov byte [esp + 0x388], 9
mov esi, 2
cmp dword [0x6041a4], esi
je 0x407d57
mov edi, eax
call fcn.0044fc60
jmp 0x407d61
mov dword [0x6041a0], 0
cmp dword [0x604348], esi
je 0x407d6e
call fcn.00432ee0
movzx ecx, word [0x603db0]
push ecx
call fcn.00410120
add esp, 4
test eax, eax
je 0x407d9d
mov ecx, str._main__MainProxyRoutine:_run_iocp_FAIL_exit
call fcn.004930a0
cmp dword [0x601e4c], 0
je 0x407d9d
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x6041a4], 0
jne 0x407daf
lea esi, [esp + 0x28]
call fcn.0044fcd0
lea eax, [esp + 0x34]
call fcn.00457800
mov ecx, str._main__MainProxyRoutine:_run_iocp_succeed_exit
call fcn.004930a0
mov byte [esp + 0x388], bl
lea esi, [esp + 0x28]
call fcn.0044f730
mov byte [esp + 0x388], 7
lea edx, [esp + 0x34]
push edx
call fcn.004965e0
mov byte [esp + 0x388], 0
lea ecx, [esp + 0x44]
call fcn.00450ac0
jmp 0x407e01
mov ecx, str._main__MainProxyRoutine:_ent_load_config__bok
call fcn.004930a0
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x603a08
call fcn.00457800
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.EntPublish__end
mov esi, 0x602250
call fcn.00409e30
add esp, 4
mov dword [esp + 0x388], 0xffffffff
cmp dword [esp + 0x1c], 0
jl 0x407e4d
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
jmp 0x407e8d
push eax
push ebx
push str._main__MainProxyRoutine_hMu_x__err_u_ALREADY_EXISTS_
call fcn.004916b0
add esp, 0xc
push str.EntPublish_360_v1_ERROR_ALREADY_EXISTS
mov esi, 0x602250
call fcn.00409e30
add esp, 4
mov dword [esp + 0x388], 0xffffffff
cmp dword [esp + 0x1c], 0
jl 0x407e8a
call dword [sym.imp.ole32.dll_CoUninitialize]
or eax, 0xffffffff
mov ecx, dword [esp + 0x380]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x368]
xor ecx, esp
call fcn.004a314d
mov esp, ebp
pop ebp
ret