Function at 0x140003a30
Capabilities:
Copy file
Create service
Delete file
Get file version info
Get installed programs
Move file
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f0]
mov eax, 0x3f0
call fcn.1400100f0
sub rsp, rax
mov rax, qword [0x14001b018]
xor rax, rsp
mov qword [rbp + 0x2e0], rax
mov esi, ecx
mov dword [rbp - 0x60], ecx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
mov qword [rbp - 0x48], rax
test rax, rax
jne 0x140003a9d
call fcn.1400010f0
lea rsi, str.Could_not_open_service_manager.____lu_
jmp 0x140003abf
mov r8d, 0x105
lea rdx, [rbp - 0x30]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140003ade
call fcn.1400010f0
lea rsi, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____lu_
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rsi
mov rcx, rbx
call fcn.140007b80
xor r14d, r14d
jmp 0x1400042e3
mov r8d, 0xf01ff
lea rdx, str.LibreOfficeMaintenance
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
mov qword [rbp - 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rbx, rbx
jne 0x140003c17
cmp eax, 0x424
je 0x140003b39
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____lu_
mov r8d, eax
mov rcx, rsi
call fcn.140007b80
xor r14d, r14d
jmp 0x1400042d4
test esi, esi
jne 0x140003b46
lea r15d, [rsi + 1]
jmp 0x1400042d1
lea rcx, [rbp - 0x30]
call qword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xor r14d, r14d
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
lea rax, [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov r15d, 1
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, str.LibreOffice_Maintenance_Service
lea rdx, str.LibreOfficeMaintenance
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
mov qword [rbp - 0x50], rax
test rax, rax
jne 0x140003bde
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_create_Windows_service._This_error_should_never_happen_since_a_service_install_should_only_be_called_when_elevated.____lu_
mov rcx, rsi
call fcn.140007b80
jmp 0x1400042d4
mov rcx, rbx
call fcn.140004740
test eax, eax
jne 0x140003c0a
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_set_security_ACE_on_service_handle__the_service_will_not_be_able_to_be_started_from_unelevated_processes._This_error_should_never_happen.____lu_
mov rcx, rsi
call fcn.140007b80
mov rcx, rbx
call fcn.140003510
jmp 0x1400042d1
mov rcx, rbx
call fcn.140004740
test eax, eax
jne 0x140003c46
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_reset_security_ACE_on_service_handle._It_might_not_be_possible_to_start_the_service._This_error_should_never_happen.____lu_
mov rcx, rsi
call fcn.140007b80
mov esi, dword [rbp - 0x60]
lea r9, [rsp + 0x78]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140003c90
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140003c90
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_determine_buffer_size_for_query_service_config.____lu_
mov r8d, eax
mov rcx, rsi
call fcn.140007b80
xor r14d, r14d
jmp 0x1400042d4
mov ecx, dword [rsp + 0x78]
call fcn.14000ef7c
mov r13, rax
mov qword [rbp - 0x40], rax
lea r9, [rsp + 0x78]
mov r8d, dword [rsp + 0x78]
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140003cce
call fcn.1400010f0
xor r14d, r14d
mov r15d, r14d
lea r14, str.Could_open_service_but_could_not_query_service_config.____lu_
jmp 0x140003cfe
cmp dword [0x14001bca4], 0
jne 0x140003d54
lea r8, [rsp + 0x70]
mov rdx, qword [r13 + 0x10]
mov rcx, rbx
call fcn.140003820
test eax, eax
jne 0x140003d1a
call fcn.1400010f0
mov r15d, 1
lea r14, str.Could_not_fix_service_path._This_should_never_happen.____lu_
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, r14
mov rcx, rsi
call fcn.140007b80
jmp 0x1400042c9
cmp dword [rsp + 0x70], 0
je 0x140003d54
mov r15d, 1
mov dword [0x14001bca4], r15d
call fcn.1400010f0
mov r8d, esi
lea rdx, str.Restarting_install_action:__d
mov rcx, rax
call fcn.140007a50
mov ecx, esi
call fcn.140003a30
mov r15d, eax
jmp 0x1400042c9
mov rcx, qword [r13 + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov r14, qword [r13 + 0x10]
xor edx, edx
mov rcx, r14
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
mov ecx, eax
call fcn.14000ef7c
mov r12, rax
mov qword [rbp - 0x68], rax
mov r9, rax
mov r8d, esi
xor edx, edx
mov rcx, r14
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
mov r15d, 1
xor r14d, r14d
test eax, eax
jne 0x140003ddf
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_obtain_file_info_of_old_service.____lu_
mov r8d, eax
mov rcx, rsi
call fcn.140007b80
nop
mov dword [rsp + 0x7c], r14d
mov eax, dword [rsp + 0x70]
mov dword [rbp - 0x74], eax
mov eax, dword [rsp + 0x70]
mov dword [rbp - 0x78], eax
mov ecx, dword [rsp + 0x70]
mov dword [rbp - 0x7c], ecx
mov eax, dword [rsp + 0x70]
mov dword [rbp - 0x80], eax
jmp 0x140003e42
mov qword [rbp - 0x58], r12
lea r9, [rsp + 0x70]
lea r8, [rbp - 0x58]
lea rdx, [0x140013704]
mov rcx, r12
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x140003e17
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_query_file_version_info_of_old_service.____lu_
jmp 0x140003db0
mov rdx, qword [rbp - 0x58]
mov eax, dword [rdx + 8]
mov ecx, eax
shr ecx, 0x10
mov dword [rbp - 0x80], ecx
movzx ecx, ax
mov dword [rbp - 0x7c], ecx
mov eax, dword [rdx + 0xc]
mov ecx, eax
shr ecx, 0x10
mov dword [rbp - 0x78], ecx
movzx eax, ax
mov dword [rbp - 0x74], eax
mov dword [rsp + 0x7c], r15d
mov rcx, r12
call fcn.14000ef74
xor edx, edx
lea rcx, [rbp - 0x30]
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov esi, eax
mov ecx, eax
call fcn.14000ef7c
mov r12, rax
mov qword [rsp + 0x70], rax
mov r9, rax
mov r8d, esi
xor edx, edx
lea rcx, [rbp - 0x30]
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x140003e94
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_obtain_file_info_of_old_service.____lu_
jmp 0x140003ec9
mov qword [rbp - 0x68], r12
lea r9, [rbp - 0x58]
lea r8, [rbp - 0x68]
lea rdx, [0x140013704]
mov rcx, r12
call qword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x140003ef9
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_query_file_version_info_of_old_service.____lu_
mov r8d, eax
mov rcx, rsi
call fcn.140007b80
nop
mov rcx, r12
call fcn.14000ef74
call fcn.1400010f0
lea rdx, str.Could_not_obtain_version_number_from_new_path
mov rcx, rax
call fcn.140007b80
mov r15d, r14d
jmp 0x1400042c9
mov rcx, qword [rbp - 0x68]
mov eax, dword [rcx + 8]
mov edx, eax
shr edx, 0x10
mov dword [rbp - 0x70], edx
movzx eax, ax
mov dword [rsp + 0x70], eax
mov eax, dword [rcx + 0xc]
mov esi, eax
shr esi, 0x10
movzx eax, ax
mov dword [rbp - 0x5c], eax
mov rcx, r12
call fcn.14000ef74
mov r12d, dword [rbp - 0x70]
cmp dword [rbp - 0x60], 2
je 0x140003f6d
cmp dword [rsp + 0x7c], 0
je 0x140003f6d
cmp dword [rbp - 0x80], r12d
jb 0x140003f6d
jne 0x140003f58
mov eax, dword [rbp - 0x7c]
cmp eax, dword [rsp + 0x70]
jb 0x140003f6d
jne 0x140003f58
cmp dword [rbp - 0x78], esi
jb 0x140003f6d
jne 0x140003f58
mov eax, dword [rbp - 0x5c]
cmp dword [rbp - 0x74], eax
jb 0x140003f6d
xor edx, edx
lea r8d, [rdx + 4]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x1400042c9
mov rcx, rbx
call fcn.140003510
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, r14
mov qword [rbp - 0x50], rbx
call fcn.140004360
test eax, eax
jne 0x140003f96
mov r15d, r14d
jmp 0x1400042c9
mov r9, qword [r13 + 0x10]
lea rax, [rbp - 0x30]
mov r8, r9
sub r8, rax
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140003fb8
add rax, 2
test ecx, ecx
jne 0x140003fa4
test edx, edx
jne 0x140003fd9
call fcn.1400010f0
lea r8, [rbp - 0x30]
lea rdx, str.File_is_already_in_the_correct_location__no_action_needed_for_upgrade.__The_path_is:___ls_
mov rcx, rax
call fcn.140007a50
jmp 0x1400042c9
xor r8d, r8d
mov rdx, r9
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x14000418e
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_overwrite_old_service_binary_file._This_should_never_happen__but_if_it_does_the_next_upgrade_will_fix_it__the_service_is_not_a_critical_component_that_needs_to_be_installed_for_upgrades_to_work.____lu_
mov rcx, rsi
call fcn.140007b80
mov rax, qword [r13 + 0x10]
mov r8, 0xffffffffffffffff
mov rsi, r8
nop
inc rsi
cmp word [rax + rsi*2], bx
jne 0x140004020
cmp rsi, 3
jbe 0x140004172
lea rcx, [rsi + 1]
mov eax, 2
mul rcx
cmovo rax, r8
mov rcx, rax
call fcn.14000ef7c
mov r12, rax
lea r8, [rsi*2 + 2]
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rsi
mov rdx, qword [r13 + 0x10]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rcx, [rsi - 3]
lea rcx, [r12 + rcx*2]
mov r8d, 3
lea rdx, [0x140013e98]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov r8d, 9
mov rdx, r12
mov rcx, qword [r13 + 0x10]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x14000413a
xor r8d, r8d
mov rdx, qword [r13 + 0x10]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1400040d4
call fcn.1400010f0
lea rdx, str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
mov rcx, rax
call fcn.140007b80
mov r15d, r14d
jmp 0x1400040e8
call fcn.1400010f0
lea rdx, str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
mov rcx, rax
call fcn.140007a50
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x140004119
call fcn.1400010f0
mov r8, r12
lea rdx, str.The_old_temp_service_path_was_deleted:__ls.
mov rcx, rax
call fcn.140007a50
mov rcx, r12
call fcn.14000ef74
jmp 0x140004282
call fcn.1400010f0
lea rdx, str.The_old_temp_service_path_was_not_deleted.
mov rcx, rax
call fcn.140007b80
mov rcx, r12
call fcn.14000ef74
jmp 0x140004282
call fcn.1400010f0
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov r9, r12
mov r8, qword [r13 + 0x10]
lea rdx, str.Could_not_move_old_service_file_out_of_the_way_from:___ls__to___ls_._Service_will_not_be_upgraded.____lu_
mov rcx, rsi
call fcn.140007b80
mov r15d, r14d
mov rcx, r12
call fcn.14000ef74
jmp 0x140004282
call fcn.1400010f0
lea rdx, str.Service_binary_path_was_less_than_3__service_will_not_be_updated.__This_should_never_happen.
mov rcx, rax
call fcn.140007b80
mov r15d, r14d
jmp 0x140004282
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x1e0]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [rbp - 0x5c]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], esi
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x20], eax
mov r9d, r12d
lea r8, str._d._d._d._d
mov edx, 0x80
lea rcx, [rbp + 0x1e0]
call fcn.140001080
lea rax, [rbp - 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0x20206
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionUninstallLibreOfficeMaintenanceService
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000425a
lea rax, [rbp + 0x1e0]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
lea r8, [r8 + 1]
cmp word [rax + r8*2], bx
jne 0x140004210
lea eax, [r8*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x1e0]
mov qword [rsp + 0x20], rax
mov r9d, r15d
xor r8d, r8d
lea rdx, str.DisplayVersion
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x14000426e
call fcn.1400010f0
lea rdx, str.The_uninstaller_version_string_could_not_be_updated.
mov rcx, rax
call fcn.140007a50
call fcn.1400010f0
lea rdx, str.The_new_service_binary_was_copied_in.
mov rcx, rax
call fcn.140007a50
xor edx, edx
lea r8d, [rdx + 4]
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x1400042b0
call fcn.1400010f0
lea r8, [rbp - 0x30]
lea rdx, str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
mov rcx, rax
call fcn.140007a50
jmp 0x1400042c9
call fcn.1400010f0
lea r8, [rbp - 0x30]
lea rdx, str.Call_to_delete_the_old_file_path_failed:__ls.
mov rcx, rax
call fcn.140007b80
nop
mov rcx, r13
call fcn.14000ef74
mov r14d, r15d
test rbx, rbx
je 0x1400042e3
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
test rdi, rdi
je 0x1400042f2
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov eax, r14d
mov rcx, qword [rbp + 0x2e0]
xor rcx, rsp
call fcn.14000e7a0
lea r11, [rsp + 0x3f0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret