Function at 0x140002950
Capabilities:
Check if file exists
Get file attributes
Modify service
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x268
mov rsi, rcx
mov rax, qword [0x140036030]
xor rax, rsp
mov qword [rsp + 0x260], rax
lea rdx, [rsp + 0x50]
xor ecx, ecx
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400029d6
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140002a35
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 0x140002f49
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_remove_file_spec_when_attempting_to_modify_service_description.____lu_
jmp 0x140002a08
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 0x140002f8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_modify_service_description.____lu_
mov r8d, eax
call fcn.14000a030
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.140018740
nop
add rsp, 0x268
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, str.updater.ini
lea rcx, [rsp + 0x50]
call fcn.140025c50
test eax, eax
je 0x140002ae5
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140002b1c
lea rdx, [0x14002fa7c]
lea rcx, [rsp + 0x50]
call fcn.140012448
test rax, rax
je 0x140002a9b
mov rdi, rax
mov rcx, rax
xor edx, edx
mov r8d, 2
call fcn.140012dfc
test eax, eax
je 0x140002b53
mov rcx, rdi
call fcn.140012548
xor r15d, r15d
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 0x14000300c
lea rdx, str.updater.ini_file_does_not_contain_a_maintenance_service_description.
call fcn.14000a030
test r15, r15
je 0x140002a10
mov rcx, r15
call fcn.14000a78c
jmp 0x140002a10
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 0x140002fcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_append_updater.ini_filename_when_attempting_to_modify_service_description.____lu_
jmp 0x140002a08
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 0x14000304d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.updater.ini_file_does_not_exist__will_not_modify_service_description.____lu_
jmp 0x140002a08
mov rcx, rdi
call fcn.14001300c
test eax, eax
jle 0x140002a93
mov r14d, eax
lea rcx, [r14 + 1]
call fcn.14000a784
mov rbx, rax
xor r15d, r15d
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call fcn.140012dfc
test eax, eax
je 0x140002b8e
xor r12d, r12d
jmp 0x140002e02
mov edx, 1
mov rcx, rbx
mov r8, r14
mov r9, rdi
call fcn.140012b68
xor r12d, r12d
cmp rax, r14
jne 0x140002ded
mov byte [rbx + r14], 0
xor eax, eax
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], 0
xor eax, eax
mov r12, rbx
mov dword [rsp + 0x3c], eax
mov rax, r12
movzx ecx, byte [r12]
cmp ecx, 0xa
je 0x140002c0a
cmp ecx, 0xd
je 0x140002c0a
test ecx, ecx
je 0x140002df2
lea r15, [rax + 1]
mov r12, r15
mov edx, ecx
cmp dl, 0xa
je 0x140002c12
movzx edx, dl
cmp edx, 0xd
je 0x140002c12
mov dl, byte [r12]
inc r12
test dl, dl
jne 0x140002bed
xor r12d, r12d
jmp 0x140002c1a
inc rax
mov r12, rax
jmp 0x140002bca
mov byte [r12 - 1], 0
mov cl, byte [rax]
cmp cl, 0x23
je 0x140002d7c
movzx edx, cl
cmp edx, 0x3b
je 0x140002d7c
lea r8, [rax + 2]
lea r9, [rax + 3]
movzx edx, cl
cmp edx, 0x1f
jg 0x140002c46
cmp edx, 9
je 0x140002c4b
jmp 0x140002c5c
cmp edx, 0x20
jne 0x140002c66
mov cl, byte [r15]
inc r15
inc rax
inc r8
inc r9
jmp 0x140002c37
test edx, edx
je 0x140002d7c
jmp 0x140002cb1
cmp edx, 0x5b
jne 0x140002cb1
mov rdx, r8
mov rcx, r9
movzx r10d, byte [rax + 1]
inc rax
inc r8
inc r9
cmp r10d, 0x5d
je 0x140002c6b
test r10d, r10d
jne 0x140002c97
mov dword [rsp + 0x38], 0
jmp 0x140002d7c
cmp r10b, 0x5d
je 0x140002cf0
mov r10b, byte [rax + 1]
inc rax
inc rdx
inc rcx
test r10b, r10b
jne 0x140002c97
jmp 0x140002d0c
cmp byte [rsp + 0x38], 0
je 0x140002d7c
dec r15
mov r13, r15
cmp cl, 0x3d
jne 0x140002cd0
mov cl, byte [r13 + 1]
inc r13
jmp 0x140002cc2
test cl, cl
je 0x140002d7c
inc r13
cmp cl, 0x3d
je 0x140002d40
mov cl, byte [r13]
inc r13
test cl, cl
jne 0x140002cdb
xor r13d, r13d
jmp 0x140002d45
mov byte [rax], 0
movzx eax, byte [rdx]
cmp eax, 9
je 0x140002d00
cmp eax, 0x20
jne 0x140002d08
inc rdx
inc rcx
jmp 0x140002cf3
test eax, eax
jne 0x140002d26
mov rcx, r15
lea rdx, str.Strings
call fcn.140013850
test eax, eax
sete al
mov dword [rsp + 0x38], eax
jmp 0x140002d7c
cmp al, 9
je 0x140002d87
movzx eax, al
cmp eax, 0x20
je 0x140002d87
mov al, byte [rcx]
inc rcx
test al, al
jne 0x140002d26
jmp 0x140002c8a
mov byte [r13 - 1], 0
xor r14d, r14d
lea rbp, str.MozillaMaintenanceDescription
mov rcx, r15
mov rdx, rbp
call fcn.140013850
test eax, eax
je 0x140002d77
mov rcx, rbp
call fcn.140013e50
add rbp, rax
inc rbp
dec r14d
cmp byte [rbp], 0
jne 0x140002d4f
jmp 0x140002d7c
test r14d, r14d
je 0x140002d90
test r12, r12
jne 0x140002bca
jmp 0x140002df2
mov byte [rcx - 1], 0
jmp 0x140002c8a
mov rcx, r13
call fcn.140013e50
lea rbp, [rax + 1]
mov rcx, rbp
call fcn.14000a784
mov r15, rax
mov rcx, rax
xor edx, edx
mov r8, rbp
call fcn.14000bda0
cmp qword [rsp + 0x40], 0
je 0x140002dc6
mov rcx, qword [rsp + 0x40]
call fcn.14000a78c
mov rcx, r15
mov rdx, r13
call fcn.140013970
mov eax, dword [rsp + 0x3c]
inc eax
mov cl, 1
mov dword [rsp + 0x38], ecx
mov qword [rsp + 0x40], r15
test r12, r12
jne 0x140002bc6
jmp 0x140002dfb
xor r15d, r15d
jmp 0x140002e02
mov r15, qword [rsp + 0x40]
mov eax, dword [rsp + 0x3c]
cmp eax, 1
sete r12b
mov rcx, rbx
call fcn.14000a78c
mov rcx, rdi
call fcn.140012548
test r12b, r12b
je 0x140002a9e
cmp byte [r15], 0
je 0x140002a9e
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r12, qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, 0xfde9
xor edx, edx
mov r8, r15
mov r9d, 0xffffffff
call r12
mov ebx, eax
mov eax, eax
add rax, rax
test ebx, ebx
mov r14, 0xffffffffffffffff
cmovns r14, rax
mov rcx, r14
call fcn.14000a784
mov rdi, rax
mov rcx, rax
xor edx, edx
mov r8, r14
call fcn.14000bda0
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
mov ecx, 0xfde9
xor edx, edx
mov r8, r15
mov r9d, 0xffffffff
call r12
test eax, eax
je 0x140002eeb
lea r8, [rsp + 0x48]
mov qword [r8], rdi
mov rcx, rsi
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
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 0x140002f1f
cmp ecx, edx
jg 0x14000308e
lea rdx, str.The_service_description_was_updated_successfully.
call fcn.140009f20
jmp 0x140002f3c
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 0x1400030cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_convert_description_to_wide_string_format.____lu_
jmp 0x140002f34
cmp ecx, edx
jg 0x140003110
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_change_service_config.____lu_
mov r8d, eax
call fcn.14000a030
mov rcx, rdi
call fcn.14000a78c
jmp 0x140002ad8
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x1400029c7
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x1400029c7
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x1400029fb
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x1400029fb
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002b0a
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002b0a
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002ac3
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002ac3
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002b41
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002b41
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002edd
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002edd
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002f10
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002f10
lea rcx, [0x140038330]
call fcn.14000aa40
cmp dword [0x140038330], 0xffffffff
jne 0x140002f27
mov qword [0x140038120], 0
lea rcx, [fcn.140001f60]
call fcn.14000abd8
lea rcx, [0x140038330]
call fcn.14000aaa8
jmp 0x140002f27