Function at 0x40be50
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, 1
push edi
mov dword [ebp - 4], esi
jle 0x40bf1a
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 4]
push 4
push str.__PP
push eax
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
mov eax, dword [edi + 4]
jne 0x40bec1
cmp byte [eax + 4], 0
je 0x40beac
cmp byte [eax + 5], 0
je 0x40beac
add eax, 6
cmp byte [eax], 0
je 0x40beac
push eax
call dword [sym.imp.msvcrt.dll_atoi]
add esp, 4
test eax, eax
jle 0x40beac
mov esi, eax
imul esi, esi, 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, str.pause
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40bee6
test dl, dl
je 0x40bee2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40bee6
add eax, 2
add ecx, 2
test dl, dl
jne 0x40bec6
xor eax, eax
jmp 0x40beeb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40bf1a
cmp ebx, 2
jle 0x40bf1a
mov ecx, dword [edi + 8]
push ecx
call dword [sym.imp.msvcrt.dll_atoi]
add esp, 4
test eax, eax
jle 0x40bf1a
imul eax, eax, 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00402210
push 0
push 0
call fcn.00402290
push 0x413558
push 0x413530
push 0x413580
push eax
mov dword [0x415c40], eax
call fcn.00401000
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x40bf73
push str.Invalid_command_line_arguments
push 0x67f
push str......_appsprunsrvprunsrv.c
push 1
push 3
push eax
call fcn.00404a50
add esp, 0x18
mov dword [ebp - 4], 1
jmp 0x40c264
push edi
call fcn.00401670
add esp, 4
cmp dword [edi + 0x14], 6
mov esi, 5
jae 0x40bfbf
mov eax, edi
call fcn.004093c0
test eax, eax
jne 0x40bfbf
cmp dword [edi + 0x14], esi
jae 0x40bfbf
push str.Load_configuration_failed
push 0x687
push str......_appsprunsrvprunsrv.c
push 1
push 3
push eax
call fcn.00404a50
add esp, 0x18
mov dword [ebp - 4], 2
jmp 0x40c264
mov edx, dword [0x41393c]
mov eax, dword [0x4138a8]
mov ecx, dword [0x413890]
push edx
mov edx, dword [0x415c40]
push eax
push ecx
push edx
call fcn.00405100
mov eax, dword [0x4138c0]
push eax
push 0
call fcn.004049c0
push str.Commons_Daemon_procrun_log_initialized
push 0x68f
push str......_appsprunsrvprunsrv.c
push 1
push 0
push 0
call fcn.00404a50
mov eax, dword [0x41393c]
add esp, 0x30
test eax, eax
je 0x40c030
push eax
push str.Log_will_rotate_each__d_seconds.
push 0x691
push str......_appsprunsrvprunsrv.c
push 1
push 0
push 0
call fcn.00404a50
add esp, 0x1c
push 0x20
push str.1.0.15.0
push str.Commons_Daemon_procrun___s__d_bit__started
push 0x693
push str......_appsprunsrvprunsrv.c
push 1
push 1
push 0
call fcn.00404a50
push 0x14
push 0x415bd4
call fcn.004053d0
mov ecx, dword [edi + 0xc]
mov edx, dword [0x413890]
add esp, 0x28
mov dword [0x415bd4], edx
cmp dword [edi + 0x14], 1
mov dword [0x415c44], ecx
je 0x40c091
mov eax, dword [0x4138f0]
mov ecx, dword [0x4138d8]
mov dword [0x415bd8], eax
mov dword [0x415bdc], ecx
mov ecx, edi
mov ebx, 0x415bd4
call fcn.00408f90
cmp dword [edi + 0x14], 2
jne 0x40c113
lea edx, [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 0xa]
movzx edx, word [ebp - 0xc]
mov ebx, dword [sym.imp.msvcrt.dll_fprintf]
push eax
movzx eax, word [ebp - 0xe]
push ecx
movzx ecx, word [ebp - 0x12]
push edx
movzx edx, word [ebp - 0x14]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ecx
push edx
add eax, 0x20
push str._n_d__02d__02d__02d:_02d:_02d_Commons_Daemon_procrun_stdout_initialized_n
push eax
call ebx
movzx ecx, word [ebp - 8]
movzx edx, word [ebp - 0xa]
movzx eax, word [ebp - 0xc]
push ecx
movzx ecx, word [ebp - 0xe]
push edx
movzx edx, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x14]
push ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
push edx
push eax
add ecx, 0x40
push str._n_d__02d__02d__02d:_02d:_02d_Commons_Daemon_procrun_stderr_initialized_n
push ecx
call ebx
add esp, 0x40
mov eax, dword [edi + 0x14]
dec eax
cmp eax, 8
ja case.default.0x40c120
jmp dword [eax*4 + 0x40c2d0]
push edi
call fcn.0040bcf0
add esp, 4
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 3
jmp 0x40c264
push edi
call fcn.0040bd80
add esp, 4
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 4
jmp 0x40c264
call fcn.00409d90
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], esi
jmp 0x40c264
call fcn.00409c60
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 6
jmp 0x40c264
push edi
call fcn.00409ec0
add esp, 4
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 7
jmp 0x40c264
mov esi, edi
call fcn.00409730
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 8
jmp 0x40c264
mov esi, edi
call fcn.00409ae0
test eax, eax
jne 0x40c1da
mov dword [ebp - 4], 9
jmp 0x40c264
push 1
mov eax, edi
call fcn.00409200
add esp, 4
push str.Commons_Daemon_procrun_finished
push 0x6e4
push str......_appsprunsrvprunsrv.c
push 1
push 1
push 0
call fcn.00404a50
add esp, 0x18
xor esi, esi
cmp edi, esi
je 0x40c206
push edi
call fcn.00401660
add esp, 4
mov dword [0x415c4c], esi
mov dword [0x415c50], esi
call dword [sym.imp.msvcrt.dll__flushall]
push esi
call fcn.00404ed0
add esp, 4
call fcn.00402230
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00409320
jmp 0x40c1da
push str.Unknown_command_line_option
push 0x6d0
push str......_appsprunsrvprunsrv.c
push 1
push 3
push 0
call fcn.00404a50
push 0
mov eax, edi
call fcn.00409200
add esp, 0x1c
mov dword [ebp - 4], 0x63
mov eax, dword [ebp - 4]
lea edx, [eax - 1]
xor esi, esi
cmp edx, 8
ja 0x40c273
mov esi, eax
mov ecx, dword [esi*4 + 0x413960]
push ecx
push eax
push str.Commons_Daemon_procrun_failed_with_exit_value:__d__Failed_to__s_
push 0x6db
push str......_appsprunsrvprunsrv.c
push 1
push 3
push 0
call fcn.00404a50
add esp, 0x20
cmp esi, 2
jle 0x40c1f7
cmp dword [0x415c50], 0
jne 0x40c1f7
mov edx, dword [esi*4 + 0x413960]
push edx
push str.Failed_to__s
push 0
push 0
push 0
call fcn.00404f20
add esp, 0x14
jmp 0x40c1f7