Function at 0x140001010
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 [0x140036030]
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, [0x14002f76a]
call r14
test eax, eax
je 0x1400010d2
test esi, esi
je 0x1400010d2
mov rcx, qword [rdi + 8]
lea rdx, [0x14002f948]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400011a9
mov rcx, qword [rdi + 8]
lea rdx, str.uninstall
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140001246
mov rcx, qword [rdi + 8]
lea rdx, [0x14002f630]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp ebx, 3
jl 0x140001368
test eax, eax
jne 0x140001368
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
xor r8d, r8d
call fcn.1400090a0
mov esi, eax
xor esi, 1
jmp 0x140001560
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400010fc
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001583
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov ecx, dword [rcx + 4]
test esi, esi
je 0x140001135
cmp eax, ecx
jg 0x140001806
mov esi, 1
lea rdi, str.Installing_service...
jmp 0x140001149
cmp eax, ecx
jg 0x140001861
mov esi, 2
lea rdi, str.Installing_service_with_force_specified...
mov rdx, rdi
call fcn.140008b50
mov ecx, esi
call fcn.140002c00
mov ecx, dword [0x140038330]
mov edx, dword [0x140036d60]
mov r8, qword gs:[0x58]
mov rdx, qword [r8 + rdx*8]
mov edx, dword [rdx + 4]
test eax, eax
je 0x14000118f
cmp ecx, edx
jg 0x140001820
lea rdx, str.The_service_was_installed_successfully
jmp 0x1400014c2
cmp ecx, edx
jg 0x1400018ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_install_service.____lu_
jmp 0x140001512
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400011d3
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001642
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400018ef
lea rdx, str.Upgrading_service_if_installed...
call fcn.140008b50
xor ecx, ecx
call fcn.140002c00
mov ecx, dword [0x140038330]
mov edx, dword [0x140036d60]
mov r8, qword gs:[0x58]
mov rdx, qword [r8 + rdx*8]
mov edx, dword [rdx + 4]
test eax, eax
je 0x1400013cd
cmp ecx, edx
jg 0x140001930
lea rdx, str.The_service_was_upgraded_successfully
jmp 0x1400014c2
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001270
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001701
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001971
lea rdx, str.Uninstalling_service...
call fcn.140008b50
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x1400013e7
mov rsi, rax
lea rdx, str.MozillaMaintenance
mov rcx, rax
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x14000144b
mov rdi, rax
lea r8, [rsp + 0x24]
mov rcx, rax
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14000133b
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 0x14000133b
mov eax, dword [rsp + 0x3c]
add r14d, eax
add r14d, 0xa
cmp r14d, 0xea60
ja 0x14000133b
mov rcx, rdi
mov rdx, rbx
call r12
test eax, eax
jne 0x14000130c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test eax, eax
jne 0x14000135a
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x430
sete bl
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140001487
movaps xmm0, xmmword [0x14002ce80]
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 0x1400013c6
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001ab6
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.StartServiceCtrlDispatcher_failed.____lu_
mov r8d, eax
call fcn.140008c60
xor esi, esi
jmp 0x140001560
cmp ecx, edx
jg 0x1400019f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_upgrade_service.____lu_
jmp 0x140001512
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001a75
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service_manager.____lu_
mov r8d, eax
call fcn.140008c60
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jle 0x140001505
jmp 0x1400019b2
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001af7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____lu_
mov r8d, eax
call fcn.140008c60
xor ebx, ebx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov ecx, dword [rcx + 4]
test ebx, ebx
je 0x1400014fd
cmp eax, ecx
jg 0x140001a34
lea rdx, str.The_service_was_uninstalled_successfully
call fcn.140008b50
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
xor esi, esi
cmp eax, dword [rcx + 4]
jle 0x140001544
lea rcx, [0x140038330]
call fcn.14000a550
xor esi, esi
jmp 0x1400017d1
cmp eax, ecx
jg 0x1400019b2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_uninstall_service.____lu_
mov r8d, eax
call fcn.140008c60
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov esi, 1
cmp eax, dword [rcx + 4]
jg 0x1400017c0
mov rcx, qword [0x140038120]
test rcx, rcx
je 0x140001560
call fcn.140012090
mov qword [0x140038120], 0
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140018400
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.1400258a0
test eax, eax
je 0x1400010fc
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.1400258a0
test eax, eax
je 0x1400010fc
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001b38
cmp qword [0x140038120], 0
jne 0x1400010fc
lea rcx, [rsp + 0x40]
call fcn.140013abc
dec eax
cmp eax, 0x101
ja 0x1400010fc
lea rdi, [0x140038128]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rdi
call fcn.140013f84
lea rdx, [0x14002f62c]
mov rcx, rdi
call fcn.140011f90
mov qword [0x140038120], rax
jmp 0x1400010fc
lea rdx, str.logs
lea rcx, [rsp + 0x40]
call fcn.1400258a0
test eax, eax
je 0x1400011d3
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.1400258a0
test eax, eax
je 0x1400011d3
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001b79
cmp qword [0x140038120], 0
jne 0x1400011d3
lea rcx, [rsp + 0x40]
call fcn.140013abc
dec eax
cmp eax, 0x101
ja 0x1400011d3
lea rsi, [0x140038128]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rsi
call fcn.140013f84
lea rdx, [0x14002f62c]
mov rcx, rsi
call fcn.140011f90
mov qword [0x140038120], rax
jmp 0x1400011d3
lea rdx, str.logs
lea rcx, [rsp + 0x40]
call fcn.1400258a0
test eax, eax
je 0x140001270
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.1400258a0
test eax, eax
je 0x140001270
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001bba
cmp qword [0x140038120], 0
jne 0x140001270
lea rcx, [rsp + 0x40]
call fcn.140013abc
dec eax
cmp eax, 0x101
ja 0x140001270
lea rsi, [0x140038128]
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, rsi
call fcn.140013f84
lea rdx, [0x14002f62c]
mov rcx, rsi
call fcn.140011f90
mov qword [0x140038120], rax
jmp 0x140001270
lea rcx, [0x140038330]
call fcn.14000a550
mov esi, 1
cmp dword [0x140038330], 0xffffffff
jne 0x140001544
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001544
lea rcx, [0x140038330]
call fcn.14000a550
mov esi, 1
lea rdi, str.Installing_service...
jmp 0x140001879
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001183
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001183
lea rcx, [0x140038330]
call fcn.14000a550
mov esi, 2
lea rdi, str.Installing_service_with_force_specified...
cmp dword [0x140038330], 0xffffffff
jne 0x140001149
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001149
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001197
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001197
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400011f8
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400011f8
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x14000123a
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x14000123a
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001295
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001295
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001505
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001505
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400013d5
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400013d5
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400014bb
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400014bb
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x14000140c
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x14000140c
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400013b1
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400013b1
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001470
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001470
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400015e8
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400015e8
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x1400016a7
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x1400016a7
lea rcx, [0x140038330]
call fcn.14000a550
cmp dword [0x140038330], 0xffffffff
jne 0x140001766
mov qword [0x140038120], 0
lea rcx, [fcn.140001d00]
call fcn.14000a6e8
lea rcx, [0x140038330]
call fcn.14000a5b8
jmp 0x140001766