Function at 0x140001000
Capabilities:
Create directory
Delete file
Move file

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x248
mov rdi, rdx
mov ebx, ecx
mov rax, qword [0x140037010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rcx, qword [rdx + 8]
lea rdx, str.forceinstall
mov rsi, qword [sym.imp.KERNEL32.dll_lstrcmpiW]
call rsi
mov ebp, eax
mov rcx, qword [rdi + 8]
lea rdx, [0x14002ffbc]
call rsi
test ebp, ebp
je 0x1400010be
test eax, eax
je 0x1400010be
mov rcx, qword [rdi + 8]
lea rdx, [0x14003019a]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x140001183
mov rcx, qword [rdi + 8]
lea rdx, str.uninstall
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x14000122e
mov rcx, qword [rdi + 8]
lea rdx, str.check_cert
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp ebx, 3
jl 0x14000132a
test eax, eax
jne 0x14000132a
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rdi + 0x18]
xor r8d, r8d
call fcn.14000c6e0
xor esi, esi
test eax, eax
sete sil
jmp 0x1400018a5
lea rdx, [rsp + 0x30]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400010e8
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001399
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000164c
lea rcx, [0x140038fa8]
test ebp, ebp
je 0x14000112b
lea rdx, str.Installing_service...
call fcn.14000d250
mov ecx, 1
jmp 0x14000113c
lea rdx, str.Installing_service_with_force_specified...
call fcn.14000d250
mov ecx, 2
call fcn.140002fc0
mov esi, eax
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000168f
test esi, esi
je 0x1400016d5
lea rcx, [0x140038fa8]
lea rdx, str.The_service_was_installed_successfully
jmp 0x1400012d2
lea rdx, [rsp + 0x30]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400011ad
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001469
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400016ee
lea rcx, [0x140038fa8]
lea rdx, str.Upgrading_service_if_installed...
call fcn.14000d250
xor ecx, ecx
call fcn.140002fc0
mov esi, eax
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001731
test esi, esi
je 0x140001777
lea rcx, [0x140038fa8]
lea rdx, str.The_service_was_upgraded_successfully
jmp 0x1400012d2
lea rdx, [rsp + 0x30]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001258
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140001539
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001790
lea rcx, [0x140038fa8]
lea rdx, str.Uninstalling_service...
call fcn.14000d250
call fcn.140004860
mov esi, eax
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400017d3
test esi, esi
je 0x140001819
lea rcx, [0x140038fa8]
lea rdx, str.The_service_was_uninstalled_successfully
call fcn.14000d250
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001609
mov rcx, qword [0x140038fa8]
test rcx, rcx
je 0x140001392
call fcn.140015da4
mov qword [0x140038fa8], 0
lea rcx, [0x1400391b8]
xor esi, esi
jmp 0x14000187e
movaps xmm0, xmmword [0x14002d6e0]
movaps xmmword [rsp + 0x40], xmm0
movaps xmm0, xmmword [str.MozillaMaintenance]
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140001392
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001906
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.StartServiceCtrlDispatcher_failed.____d_
mov r8d, eax
call fcn.14000d2d0
xor esi, esi
jmp 0x1400018a5
lea rdx, str.logs
lea rcx, [rsp + 0x30]
call int.14000e0c0
test eax, eax
je 0x1400010e8
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001949
cmp qword [0x140038fa8], 0
jne 0x1400010e8
lea rax, str.maintenanceservice_install.log
mov qword [rsp + 0x20], rax
lea rcx, [0x1400391b8]
lea r9, [rsp + 0x30]
call fcn.14000d160
add eax, 0xffffffff
cmp eax, 0x102
ja 0x1400010e8
lea rdx, [0x1400300be]
lea r8, [0x140038fb0]
lea rcx, [rsp + 0x30]
call fcn.14000e110
test eax, eax
je 0x1400010e8
lea rcx, [0x140038fb0]
lea rdx, [0x14002fe6e]
call fcn.140015cd0
mov qword [0x140038fa8], rax
lea rcx, [0x1400391b8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1400010e8
lea rdx, str.logs
lea rcx, [rsp + 0x30]
call int.14000e0c0
test eax, eax
je 0x1400011ad
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000199a
cmp qword [0x140038fa8], 0
jne 0x1400011ad
lea rax, str.maintenanceservice_install.log
mov qword [rsp + 0x20], rax
lea rcx, [0x1400391b8]
lea r9, [rsp + 0x30]
call fcn.14000d160
add eax, 0xffffffff
cmp eax, 0x102
ja 0x1400011ad
lea rdx, [0x1400300be]
lea r8, [0x140038fb0]
lea rcx, [rsp + 0x30]
call fcn.14000e110
test eax, eax
je 0x1400011ad
lea rcx, [0x140038fb0]
lea rdx, [0x14002fe6e]
call fcn.140015cd0
mov qword [0x140038fa8], rax
lea rcx, [0x1400391b8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1400011ad
lea rdx, str.logs
lea rcx, [rsp + 0x30]
call int.14000e0c0
test eax, eax
je 0x140001258
lea rcx, [rsp + 0x30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400019eb
cmp qword [0x140038fa8], 0
jne 0x140001258
lea rax, str.maintenanceservice_uninstall.log
mov qword [rsp + 0x20], rax
lea rcx, [0x1400391b8]
lea r9, [rsp + 0x30]
call fcn.14000d160
add eax, 0xffffffff
cmp eax, 0x102
ja 0x140001258
lea rdx, [0x1400300be]
lea r8, [0x140038fb0]
lea rcx, [rsp + 0x30]
call fcn.14000e110
test eax, eax
je 0x140001258
lea rcx, [0x140038fb0]
lea rdx, [0x14002fe6e]
call fcn.140015cd0
mov qword [0x140038fa8], rax
lea rcx, [0x1400391b8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x140001258
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400012fc
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x1400012fc
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x14000110d
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x14000110d
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140001168
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
test esi, esi
jne 0x140001170
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_install_service.____d_
jmp 0x14000182d
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400011d2
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x1400011d2
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140001213
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
test esi, esi
jne 0x14000121b
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_upgrade_service.____d_
jmp 0x14000182d
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x14000127d
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x14000127d
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400012bc
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
test esi, esi
jne 0x1400012c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140038fa8]
lea rdx, str.Could_not_uninstall_service.____d_
mov r8d, eax
call fcn.14000d2d0
mov eax, dword [0x1400393c0]
mov ecx, dword [0x140037cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400018c3
mov rcx, qword [0x140038fa8]
mov esi, 1
test rcx, rcx
je 0x1400018a5
call fcn.140015da4
mov qword [0x140038fa8], 0
lea rcx, [0x1400391b8]
xor edx, edx
call fcn.1400155f8
lea rcx, [0x140038fb0]
test eax, eax
je 0x14000189f
lea rdx, [0x1400391b8]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x1400018a5
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1400192f0
mov eax, esi
add rsp, 0x248
pop rbx
pop rbp
pop rdi
pop rsi
ret
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140001856
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x140001856
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140001376
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
jmp 0x140001376
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400013e4
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
cmp qword [0x140038fa8], 0
jne 0x1400010e8
jmp 0x1400013f2
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x1400014b4
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
cmp qword [0x140038fa8], 0
jne 0x1400011ad
jmp 0x1400014c2
lea rcx, [0x1400393c0]
call fcn.14000e3b0
mov eax, dword [0x1400393c0]
cmp eax, 0xffffffff
jne 0x140001584
mov qword [0x140038fa8], 0
lea rcx, [0x1400022c0]
call fcn.14000e568
lea rcx, [0x1400393c0]
call fcn.14000e418
cmp qword [0x140038fa8], 0
jne 0x140001258
jmp 0x140001592