Function at 0x4016c0
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
push esi
push edi
push str._nSimple_Windows_Service_Manager_n
xor ebx, ebx
call fcn.0040456b
add esp, 4
push str._______________________________n_n
call fcn.0040456b
mov edi, dword [ebp + 0xc]
mov edx, dword [edi]
add esp, 4
mov ecx, edx
nop
mov al, byte [ecx]
cmp al, 0x3a
jne 0x4016ff
mov ebx, 1
add ecx, ebx
jmp 0x4016f0
test al, al
je 0x401708
add ecx, 1
jmp 0x4016f0
cmp byte [edx], 0x5c
jne 0x401718
cmp byte [edx + 1], 0x5c
jne 0x401718
mov ebx, 1
push 0x1f41
call fcn.00403ffc
mov esi, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x14], esi
mov byte [esi], 0x22
mov byte [esi + 1], 0
jne 0x4017a6
push 0x1f41
mov edi, 0x1f40
call fcn.00403ffc
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
add esp, 4
mov esi, eax
push esi
push 0x1b58
call ebx
test eax, eax
jne 0x40177c
lea esp, [esp]
add edi, edi
push edi
push esi
call fcn.004048e9
add esp, 8
mov esi, eax
push esi
lea eax, [edi - 0x3e8]
push eax
call ebx
test eax, eax
je 0x401760
cmp byte [esi + eax - 1], 0x5c
je 0x40178c
mov byte [esi + eax], 0x5c
mov byte [esi + eax + 1], 0
mov ecx, dword [esp + 0x14]
push esi
push 0x1f41
push ecx
call fcn.00404b04
mov esi, dword [esp + 0x20]
mov edi, dword [ebp + 0xc]
add esp, 0xc
mov edx, dword [edi]
push edx
push 0x1f41
push esi
call fcn.00404b04
add esp, 0xc
push 0x411958
push 0x1f41
push esi
call fcn.00404b04
add esp, 0xc
push esi
push str.Service_executable_path:__s_n
call fcn.0040456b
mov eax, dword [ebp + 8]
add esp, 8
cmp eax, 2
jle 0x401cec
mov eax, dword [edi + 4]
mov esi, dword [edi + 8]
push str._uninstallbyname
push eax
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x401830
push str.Uninstalling_Service_by_name..._n
call fcn.0040456b
mov eax, dword [edi + 8]
add esp, 4
call fcn.00402cd0
test eax, eax
je 0x40181c
push str._n_nService_Uninstalled_Sucessfully_n
jmp 0x401821
push str._n_nError_Uninstalling_Service_n
call fcn.0040456b
add esp, 4
push 0
call fcn.00404ee0
push esi
push str._nProcessing_configuration_file:__s_n
call fcn.0040456b
push esi
mov ecx, str.NAME
call fcn.00401520
add esp, 0xc
mov ebx, eax
push esi
mov ecx, str.DISPLAYNAME
mov dword [esp + 0x38], ebx
call fcn.00401520
add esp, 4
push esi
mov ecx, str.DESCRIPTION
mov dword [esp + 0x30], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.WORKINGDIR
mov dword [esp + 0x2c], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.CMDLINE
mov dword [esp + 0x34], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.STOP_WORKINGDIR
mov dword [esp + 0x28], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.LIVENESS_FILE
mov dword [esp + 0x24], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.STOP_CMDLINE
mov dword [esp + 0x1c], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.AUTORESTART
mov dword [esp + 0x20], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.INTERACTIVE
mov edi, eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.RUNONCE
mov dword [esp + 0x10], eax
call fcn.00401520
add esp, 4
push esi
mov ecx, str.DOCAD
mov dword [esp + 0x14], eax
call fcn.00401520
add esp, 4
test ebx, ebx
mov esi, eax
jne 0x401929
push str.Config_file_must_contain_a_SERVICENAME_entry_n
call fcn.0040456b
add esp, 4
push 0xffffffffffffffff
call fcn.00404ee0
push ebx
push str._t_tNAME___s_n
call fcn.0040456b
mov eax, dword [esp + 0x34]
add esp, 8
test eax, eax
jne 0x401953
push str.Config_file_must_contain_a_DISPLAYNAME_entry_n
call fcn.0040456b
add esp, 4
push 0xffffffffffffffff
call fcn.00404ee0
push eax
push str._t_tDISPLAYNAME___s_n
call fcn.0040456b
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
jne 0x40197d
push str.Config_file_must_contain_a_SERVICE_DESCRIPTION_entry_n
call fcn.0040456b
add esp, 4
push 0xffffffffffffffff
call fcn.00404ee0
push eax
push str._t_tSERVICE_DESCRIPTION___s_n
call fcn.0040456b
mov eax, dword [esp + 0x38]
add esp, 8
test eax, eax
jne 0x4019a2
push str.Config_file_contains_no_WORKINGDIR_entry___process_will_always_be_launched_using_services_current_directory_n
call fcn.0040456b
add esp, 4
jmp 0x4019b0
push eax
push str._t_tWORKINGDIR___s_n
call fcn.0040456b
add esp, 8
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4019c7
push str.Config_file_contains_no_STOP_WORKINGDIR_entry___stop_process_will_always_be_launched_using_services_current_directory_n
call fcn.0040456b
add esp, 4
jmp 0x4019d5
push eax
push str._t_tSTOP_WORKINGDIR___s_n
call fcn.0040456b
add esp, 8
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4019ec
push str.Config_file_contains_no_LIVENESS_FILE_entry___service_will_not_restart_child_process._n
call fcn.0040456b
add esp, 4
jmp 0x4019fa
push eax
push str._t_tLIVENESS_FILE___s_n
call fcn.0040456b
add esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x401a11
push str.Config_file_contains_no_STOP_CMDLINE_entry___stop_process_will_not_be_launched_and_child_process_will_be_simply_killed_n
call fcn.0040456b
add esp, 4
jmp 0x401a1f
push eax
push str._t_tSTOP_CMDLINE___s_n
call fcn.0040456b
add esp, 8
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x401a3b
push str.Config_file_must_contain_a_RUN_CMDLINE_entry_n
call fcn.0040456b
add esp, 4
push 0xffffffffffffffff
call fcn.00404ee0
push eax
push str._t_tRUN_CMDLINE___s_n
call fcn.0040456b
add esp, 8
test edi, edi
jne 0x401a61
push str.Config_file_contains_no_AUTORESTART_entry_n
mov edi, 0x411ddc
call fcn.0040456b
add esp, 4
jmp 0x401a6f
push edi
push str._t_tAUTORESTART___s_n
call fcn.0040456b
add esp, 8
mov ebx, dword [esp + 0xc]
test ebx, ebx
jne 0x401a90
push str.Config_file_contains_no_HAS_UI_entry_n
mov dword [esp + 0x10], 0x411ddc
call fcn.0040456b
mov ebx, dword [esp + 0x10]
add esp, 4
cmp dword [esp + 0x10], 0
jne 0x401aac
push str.Config_file_contains_no_RUN_ONCE_entry_n
mov dword [esp + 0x14], 0x411ddc
call fcn.0040456b
add esp, 4
test esi, esi
jne 0x401ac2
push str.Config_file_contains_no_cad_entry_n
mov esi, 0x411ddc
call fcn.0040456b
add esp, 4
push 0x411e94
push edi
call fcn.00403c1a
add esp, 8
test eax, eax
je 0x401b00
push 0x411e98
push edi
call fcn.00403c1a
add esp, 8
test eax, eax
je 0x401b00
push str.true
push edi
call fcn.00403c1a
add esp, 8
test eax, eax
mov dword [esp + 0xc], 0x411ddc
jne 0x401b08
mov dword [esp + 0xc], 0x411e94
mov eax, dword [esp + 0xc]
push eax
push str._t_tAUTO_RESTART___s_n
call fcn.0040456b
push 0x411e94
push ebx
call fcn.00403c1a
add esp, 0x10
test eax, eax
je 0x401b52
push 0x411e98
push ebx
call fcn.00403c1a
add esp, 8
test eax, eax
je 0x401b52
push str.true
push ebx
call fcn.00403c1a
add esp, 8
test eax, eax
mov ebx, 0x411ddc
jne 0x401b57
mov ebx, 0x411e94
push ebx
push str._t_tHAS_UI___s_n_n
call fcn.0040456b
mov edi, dword [esp + 0x18]
push 0x411e94
push edi
call fcn.00403c1a
add esp, 0x10
test eax, eax
je 0x401ba1
push 0x411e98
push edi
call fcn.00403c1a
add esp, 8
test eax, eax
je 0x401ba1
push str.true
push edi
call fcn.00403c1a
add esp, 8
test eax, eax
mov edi, 0x411ddc
jne 0x401ba6
mov edi, 0x411e94
push edi
push str._t_tRUN_ONCE___s_n_n
call fcn.0040456b
push 0x411e94
push esi
call fcn.00403c1a
add esp, 0x10
test eax, eax
je 0x401bec
push 0x411e98
push esi
call fcn.00403c1a
add esp, 8
test eax, eax
je 0x401bec
push str.true
push esi
call fcn.00403c1a
add esp, 8
test eax, eax
mov esi, 0x411ddc
jne 0x401bf1
mov esi, 0x411e94
push esi
push str._t_tCAD___s_n_n
call fcn.0040456b
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
push str._install
push eax
call fcn.00403c1a
add esp, 0x10
test eax, eax
jne 0x401c82
push str.Installing_Service..._n
call fcn.0040456b
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
add esp, 4
push edx
mov edx, dword [esp + 0x24]
push esi
push edi
push eax
mov eax, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x58]
push eax
mov eax, ebx
call fcn.004027e0
add esp, 0x28
test eax, eax
je 0x401c6d
push str._n_nService_Installed_Sucessfully_n
call fcn.0040456b
jmp 0x401c7f
push str._n_nError_Installing_Service_n
call fcn.0040456b
mov dword [esp + 0x34], 0x35
add esp, 4
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
push str._uninstall
push eax
call fcn.00403c1a
add esp, 8
test eax, eax
jne 0x401d13
push str.Uninstalling_Service..._n
call fcn.0040456b
mov eax, dword [esp + 0x38]
add esp, 4
call fcn.00402cd0
test eax, eax
je 0x401ccc
push str._n_nService_Uninstalled_Sucessfully_n
call fcn.0040456b
mov eax, dword [esp + 0x34]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str._n_nError_Uninstalling_Service_n
call fcn.0040456b
mov dword [esp + 0x34], 0x35
mov eax, dword [esp + 0x34]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
je 0x401d13
xor eax, eax
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], str.Unknown_Service
mov dword [esp + 0x40], 0x402000
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
push str.Usage:_SimpleService___install_uninstall___config_file_
call fcn.0040456b
mov eax, dword [esp + 0x34]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret