Function at 0x140001000
Capabilities:
Create directory
Delete service
Query service status
Stop service

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x258
mov rdi, rdx
mov ebx, ecx
mov rax, qword [0x14003c040]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rcx, qword [rdx + 8]
lea rdx, str.forceinstall
mov r14, qword [sym.imp.KERNEL32.dll_lstrcmpiW]
call r14
mov esi, eax
mov rcx, qword [rdi + 8]
lea rdx, [0x1400357ca]
call r14
test eax, eax
je 0x1400010c2
test esi, esi
je 0x1400010c2
mov rcx, qword [rdi + 8]
lea rdx, [0x1400359a8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140001196
mov rcx, qword [rdi + 8]
lea rdx, str.uninstall
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140001233
mov rcx, qword [rdi + 8]
lea rdx, [0x140035690]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp ebx, 3
jl 0x140001340
test eax, eax
jne 0x140001340
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
xor r8d, r8d
call fcn.140009340
mov esi, eax
xor esi, 1
jmp 0x140001616
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400010ec
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001464
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov ecx, dword [rcx + 4]
test esi, esi
je 0x140001125
cmp eax, ecx
jg 0x1400017fa
mov esi, 1
lea rdx, str.Installing_service...
jmp 0x140001139
cmp eax, ecx
jg 0x140001855
mov esi, 2
lea rdx, str.Installing_service_with_force_specified...
call fcn.140008de0
mov ecx, esi
call fcn.140002ef0
mov ecx, dword [0x14003e370]
mov edx, dword [0x14003cda0]
mov r8, qword gs:[0x58]
mov rdx, qword [r8 + rdx*8]
mov edx, dword [rdx + 4]
test eax, eax
je 0x14000117c
cmp ecx, edx
jg 0x140001814
lea rdx, str.The_service_was_installed_successfully
jmp 0x1400015ce
cmp ecx, edx
jg 0x1400018a8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_install_service.____lu_
jmp 0x14000157b
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400011c0
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001639
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400018e9
lea rdx, str.Upgrading_service_if_installed...
call fcn.140008de0
xor ecx, ecx
call fcn.140002ef0
mov ecx, dword [0x14003e370]
mov edx, dword [0x14003cda0]
mov r8, qword gs:[0x58]
mov rdx, qword [r8 + rdx*8]
mov edx, dword [rdx + 4]
test eax, eax
je 0x1400013a5
cmp ecx, edx
jg 0x14000192a
lea rdx, str.The_service_was_upgraded_successfully
jmp 0x1400015ce
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000125d
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x1400016f8
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000196b
lea rdx, str.Uninstalling_service...
call fcn.140008de0
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x1400013bf
mov rsi, rax
lea rdx, str.MozillaMaintenance
mov rcx, rax
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x140001423
mov rdi, rax
lea r8, [rsp + 0x24]
mov rcx, rax
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140001328
xor r14d, r14d
mov r15, qword [sym.imp.KERNEL32.dll_Sleep]
lea rbx, [rsp + 0x24]
mov r12, qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ecx, dword [rsp + 0x3c]
call r15
cmp dword [rsp + 0x28], 1
je 0x140001328
mov eax, dword [rsp + 0x3c]
add r14d, eax
add r14d, 0xa
cmp r14d, 0xea60
ja 0x140001328
mov rcx, rdi
mov rdx, rbx
call r12
test eax, eax
jne 0x1400012f9
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140001523
xor ebx, ebx
jmp 0x140001531
movaps xmm0, xmmword [0x140032d10]
lea rcx, [rsp + 0x40]
movaps xmmword [rcx + 0x10], xmm0
movaps xmm0, xmmword [str.MozillaMaintenance]
movaps xmmword [rcx], xmm0
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x14000139e
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001a6f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.StartServiceCtrlDispatcher_failed.____lu_
mov r8d, eax
call fcn.140008f00
xor esi, esi
jmp 0x140001616
cmp ecx, edx
jg 0x1400019ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_upgrade_service.____lu_
jmp 0x14000157b
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001a2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service_manager.____lu_
mov r8d, eax
call fcn.140008f00
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jle 0x14000156e
jmp 0x1400019ac
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001af1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____lu_
mov r8d, eax
call fcn.140008f00
mov bl, 1
jmp 0x14000153a
lea rdx, str.logs
lea rcx, [rsp + 0x40]
call fcn.14002c160
test eax, eax
je 0x1400010ec
lea rdi, [rsp + 0x40]
mov rcx, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdx, str.maintenanceservice_install.log
mov rcx, rdi
call fcn.14002c160
test eax, eax
je 0x1400010ec
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001b32
cmp qword [0x14003e160], 0
jne 0x1400010ec
lea rcx, [rsp + 0x40]
call fcn.140016e68
dec eax
cmp eax, 0x101
ja 0x1400010ec
lea rdi, [0x14003e168]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rdi
call fcn.140017330
lea rdx, [0x14003568c]
mov rcx, rdi
call fcn.140014e28
mov qword [0x14003e160], rax
jmp 0x1400010ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
setne bl
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov ecx, dword [rcx + 4]
test bl, bl
je 0x1400015bf
cmp eax, ecx
jg 0x1400019ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_uninstall_service.____lu_
mov r8d, eax
call fcn.140008f00
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov esi, 1
cmp eax, dword [rcx + 4]
jle 0x1400015fa
lea rcx, [0x14003e370]
call fcn.14000a75c
mov esi, 1
jmp 0x1400017c5
cmp eax, ecx
jg 0x140001ab0
lea rdx, str.The_service_was_uninstalled_successfully
call fcn.140008de0
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
xor esi, esi
cmp eax, dword [rcx + 4]
jg 0x1400017b7
mov rcx, qword [0x14003e160]
test rcx, rcx
je 0x140001616
call fcn.140014f28
mov qword [0x14003e160], 0
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14001af60
mov eax, esi
add rsp, 0x258
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rdx, str.logs
lea rcx, [rsp + 0x40]
call fcn.14002c160
test eax, eax
je 0x1400011c0
lea rsi, [rsp + 0x40]
mov rcx, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdx, str.maintenanceservice_install.log
mov rcx, rsi
call fcn.14002c160
test eax, eax
je 0x1400011c0
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001b73
cmp qword [0x14003e160], 0
jne 0x1400011c0
lea rcx, [rsp + 0x40]
call fcn.140016e68
dec eax
cmp eax, 0x101
ja 0x1400011c0
lea rsi, [0x14003e168]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rsi
call fcn.140017330
lea rdx, [0x14003568c]
mov rcx, rsi
call fcn.140014e28
mov qword [0x14003e160], rax
jmp 0x1400011c0
lea rdx, str.logs
lea rcx, [rsp + 0x40]
call fcn.14002c160
test eax, eax
je 0x14000125d
lea rsi, [rsp + 0x40]
mov rcx, rsi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdx, str.maintenanceservice_uninstall.log
mov rcx, rsi
call fcn.14002c160
test eax, eax
je 0x14000125d
mov eax, dword [0x14003e370]
mov ecx, dword [0x14003cda0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001bb4
cmp qword [0x14003e160], 0
jne 0x14000125d
lea rcx, [rsp + 0x40]
call fcn.140016e68
dec eax
cmp eax, 0x101
ja 0x14000125d
lea rsi, [0x14003e168]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rsi
call fcn.140017330
lea rdx, [0x14003568c]
mov rcx, rsi
call fcn.140014e28
mov qword [0x14003e160], rax
jmp 0x14000125d
lea rcx, [0x14003e370]
call fcn.14000a75c
xor esi, esi
cmp dword [0x14003e370], 0xffffffff
jne 0x1400015fa
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400015fa
lea rcx, [0x14003e370]
call fcn.14000a75c
mov esi, 1
lea rdx, str.Installing_service...
jmp 0x14000186d
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001170
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001170
lea rcx, [0x14003e370]
call fcn.14000a75c
mov esi, 2
lea rdx, str.Installing_service_with_force_specified...
cmp dword [0x14003e370], 0xffffffff
jne 0x140001139
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
mov rdi, rdx
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
mov rdx, rdi
jmp 0x140001139
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001184
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001184
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x1400011e5
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400011e5
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001227
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001227
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001282
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001282
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x14000156e
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x14000156e
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x1400013ad
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400013ad
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x1400013e4
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400013e4
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001389
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001389
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x1400015c7
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400015c7
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x140001448
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x140001448
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x1400014c9
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x1400014c9
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x14000169e
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x14000169e
lea rcx, [0x14003e370]
call fcn.14000a75c
cmp dword [0x14003e370], 0xffffffff
jne 0x14000175d
mov qword [0x14003e160], 0
lea rcx, [fcn.140001d10]
call fcn.14000a840
lea rcx, [0x14003e370]
call fcn.14000a7d4
jmp 0x14000175d