Function at 0x401fc0
Capabilities:
Get common file path
Stop service

Disassembly:
mov eax, dword [0x40b540]
sub esp, 0x22c
push ebx
push esi
push edi
push str.Checking_server_...
push 0x3eb
push eax
mov ebx, edx
mov esi, ecx
xor edi, edi
call fcn.00401000
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x10]
push edx
mov edx, 0x40a91c
mov ecx, esi
call fcn.00401090
cmp eax, 1
jne 0x40200c
push str.Switching_to_maintenance_mode__CheckSvc:server_
jmp 0x402162
mov eax, dword [esp + 0x23c]
test eax, eax
jne 0x4020bc
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402198
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402134
mov ecx, dword [0x40b540]
push str.Tally_Lock_server_is_already_installed_and_running
push 0x3eb
push ecx
call fcn.00401000
add esp, 0xc
mov edx, 0x40a990
mov ecx, esi
call fcn.00401120
test eax, eax
je 0x40207a
mov edx, dword [0x40b540]
push str.Switching_to_maintenance_mode__StopSvc:server_
push 0x3eb
push edx
call fcn.00401000
add esp, 0xc
mov edi, 1
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0x40a9d0
mov ecx, esi
call fcn.004011d0
test eax, eax
je 0x40209f
push 0x40a9e0
jmp 0x402162
mov ecx, dword [0x40b540]
push str.Tally_Lock_server_service_re_started.
push 0x3eb
push ecx
call fcn.00401000
add esp, 0xc
test edi, edi
je 0x40210d
mov edx, dword [0x40b540]
push str.Stopping_and_removing_server_service_...
push 0x3eb
push edx
call fcn.00401000
add esp, 0xc
push 0xf01ff
push 0x40abe4
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x402101
lea eax, [esp + 0x14]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, str.SuperProServer
mov ecx, esi
call fcn.00401170
mov ecx, dword [0x40b540]
push 0x40b548
push 0x3eb
push ecx
call fcn.00401000
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x22c
ret 4
mov edx, dword [0x40b540]
push str.Tally_Lock_server_is_already_installed_but_NOT_running
push 0x3eb
push edx
call fcn.00401000
add esp, 0xc
mov edx, 0x40aa70
mov ecx, esi
call fcn.004011d0
test eax, eax
je 0x40217a
push str.Switching_to_maintenance_mode__StartSvc:server_
mov eax, dword [0x40b540]
push 0x3eb
push eax
call fcn.00401000
add esp, 0xc
jmp 0x4020bc
mov ecx, dword [0x40b540]
push 0x40aab0
push 0x3eb
push ecx
call fcn.00401000
add esp, 0xc
jmp 0x40210d
mov edx, dword [0x40b540]
push str.Installing_Tally_Lock_server_...
push 0x3eb
push edx
call fcn.00401000
add esp, 0xc
push 0x104
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x4021f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x40b540]
push eax
push 0x40aaf8
push 0x3eb
push ecx
call fcn.00401000
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x22c
ret 4
push 0x40ab1c
lea edx, [esp + 0x34]
push edx
mov edx, 0x40ab2c
mov ecx, ebx
call fcn.004016e0
test eax, eax
jne 0x4021e5
push str.spnsrvnt.exe
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x13c]
push 0x40ab4c
push ecx
call fcn.00402a77
add esp, 0x10
push 2
push 0x110
lea edx, [esp + 0x13c]
push edx
mov edx, 0x40ab54
mov ecx, esi
call fcn.00401260
test eax, eax
jne 0x4021e5
mov eax, dword [0x40b540]
push str.Tally_Lock_server_installed.
push 0x3eb
push eax
call fcn.00401000
add esp, 0xc
mov edx, 0x40ab84
mov ecx, esi
call fcn.004011d0
test eax, eax
jne 0x4021e5
mov ecx, dword [0x40b540]
push str.Tally_Lock_server_service_started.
push 0x3eb
push ecx
call fcn.00401000
add esp, 0xc
jmp 0x40210d