Function at 0x405100
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a6bec
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4c3518]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push esi
push edi
mov eax, dword [0x4c3518]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_DefWindowProcW]
push 0x4ab3d0
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
je 0x40517c
push str.ChangeWindowMessageFilter
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40517c
push 1
push 0x4a
call eax
push 0x208
lea eax, [esp + 0x48]
push ebx
push eax
call fcn.0048ab30
add esp, 0xc
push 0x104
lea ecx, [esp + 0x48]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x44]
push edx
call esi
lea eax, [esp + 0x44]
push eax
call esi
push str.360base.dll
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp dword [0x4c8240], ebx
jne 0x405207
push 0x4c8228
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x4c8240], ebx
jne 0x4051fc
push 0x4c7e18
lea ecx, [esp + 0x48]
call fcn.0040b870
mov dword [0x4c8244], eax
mov dword [0x4c8240], 1
push 0x4c8228
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x4c8244], ebx
je 0x4054a0
call fcn.00405af0
mov eax, dword [0x4c6ec4]
mov dword [esp + 0x14], ebx
cmp eax, ebx
jne 0x40525c
push 0xc
call fcn.00485c0f
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x405255
push str.Instance_6DC1DF25_1A79_4f40_80A0_2B1FA4E97F74
push ebx
mov dword [esi], vtable.CInstanceMutex.0
mov dword [esi + 4], ebx
push ebx
mov dword [esi + 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 8], eax
mov eax, esi
jmp 0x405257
xor eax, eax
mov dword [0x4c6ec4], eax
push eax
lea edi, [esp + 0x18]
call fcn.00404740
cmp eax, ebx
jne 0x40529b
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.__pid:_d__RunClient_cmdline:_s
call fcn.0040bde0
mov edx, dword [esp + 0x20]
add esp, 0xc
push edx
call fcn.00404cf0
add esp, 4
mov dword [esp + 0x18], eax
jmp 0x405444
mov eax, dword [0x4c602c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4c602c
mov dword [esp + 0x1c], vtable.CCommandParser.0
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x264], ebx
call fcn.004021e0
mov dword [esp + 0x260], 1
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call esi
lea ecx, [esp + 0x10]
push ecx
mov ecx, eax
call fcn.00401bc0
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 2
call fcn.00401450
mov edi, eax
mov byte [esp + 0x260], 1
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 0x405329
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, ebx
je 0x405430
lea ecx, [esp + 0x10]
push ecx
mov ecx, str.fork_server
call fcn.00401bc0
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x268], 3
call fcn.00401830
mov edi, eax
mov byte [esp + 0x260], 1
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 0x405381
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call esi
push eax
cmp edi, ebx
je 0x4053aa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.__pid:_d__RunServer_cmdline:_s
call fcn.0040bde0
add esp, 0xc
call fcn.00404ad0
mov dword [esp + 0x18], eax
jmp 0x405430
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call ebx
push eax
push str.__pid:_d__LaunchServer_cmdline:_s
call fcn.0040bde0
add esp, 0xc
call fcn.00404f00
test eax, eax
je 0x405418
push str._daemon_started_successfully__n
call fcn.0048633a
add eax, 0x20
push eax
call fcn.0048621e
add esp, 8
call fcn.004054d0
push eax
lea edi, [esp + 0x18]
call fcn.00404740
test eax, eax
jne 0x40542e
call esi
push eax
call ebx
push eax
push str.__pid:_d__RunClient_cmdline:_s
call fcn.0040bde0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push ecx
call fcn.00404cf0
add esp, 4
mov dword [esp + 0x18], eax
jmp 0x40542e
push str._daemon_started_failed__n
call fcn.0048633a
add eax, 0x20
push eax
call fcn.0048621e
add esp, 8
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x260], 0xffffffff
call fcn.004013d0
mov ecx, dword [0x4c6ec4]
cmp ecx, ebx
je 0x405456
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [0x4c6ec4], ebx
call fcn.00405990
mov esi, dword [0x4c75b0]
cmp esi, ebx
je 0x40549b
mov eax, dword [esi]
cmp eax, ebx
je 0x40547c
push eax
call fcn.0048556b
add esp, 4
mov dword [esi], ebx
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40548f
push eax
call fcn.0048556b
add esp, 4
mov dword [esi + 4], ebx
push esi
mov dword [esi + 8], ebx
call fcn.00485321
add esp, 4
call fcn.00405a10
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.0048532c
mov esp, ebp
pop ebp
ret