Function at 0x140005e18
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry key

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
sub rsp, 0x770
mov rsi, rcx
mov rdi, rdx
mov r13d, 0x104
lea rcx, [rsp + 0x261]
xor ebx, ebx
xor edx, edx
mov r8, r13
mov byte [rsp + 0x260], bl
call sub.msvcrt.dll_memset
xor eax, eax
lea rdx, str.SOFTWAREMozilla
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x7b4], eax
lea rax, [rsp + 0x7b8]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov byte [rdi], bl
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x7b0], ebx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x140006025
lea r8d, [r13 - 5]
lea rcx, [rsp + 0x161]
xor edx, edx
mov byte [rsp + 0x160], bl
call sub.msvcrt.dll_memset
mov ebp, ebx
xor edx, edx
jmp 0x140005fcd
lea rdx, str.mozilla
lea rcx, [rsp + 0x160]
mov r8d, 7
call sub.msvcrt.dll__mbsnbicmp
cmp eax, ebx
jne 0x140005fc8
lea rcx, [rsp + 0x51]
mov r8, r13
xor edx, edx
mov byte [rsp + 0x50], bl
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x371]
xor edx, edx
mov r8d, 0x3ff
mov byte [rsp + 0x370], bl
call sub.msvcrt.dll_memset
lea r9, [rsp + 0x160]
lea r8, str._s_bin
lea rcx, [rsp + 0x370]
mov edx, 0x3ff
call sub.msvcrt.dll__snprintf
mov rcx, qword [rsp + 0x7b8]
lea r9, [rsp + 0x50]
lea r8, str.PathToExe
lea rdx, [rsp + 0x370]
mov dword [rsp + 0x20], r13d
call fcn.14000fbe4
lea rcx, [rsp + 0x50]
mov edx, 0x5c
call sub.msvcrt.dll__mbsrchr
cmp rax, rbx
je 0x140005f6a
mov byte [rax], bl
cmp byte [rsp + 0x50], bl
je 0x140005fc8
lea r8, [rsp + 0x7b0]
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.140005cf8
cmp eax, ebx
je 0x140005fc8
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x7b0]
call qword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, ebx
jg 0x140005fa9
cmp byte [rsp + 0x260], bl
jne 0x140005fc8
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x260]
call fcn.140010a1c
mov r11, qword [rsp + 0x7b0]
mov qword [rsp + 0x40], r11
add ebp, 1
mov edx, ebp
mov rcx, qword [rsp + 0x7b8]
lea rax, [rsp + 0x48]
lea r9, [rsp + 0x7a8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
lea r8, [rsp + 0x160]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x7a8], 0xff
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, ebx
je 0x140005ebc
mov rcx, qword [rsp + 0x7b8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, [rsp + 0x260]
mov rcx, rdi
call fcn.140010a1c
cmp byte [rdi], bl
jne 0x1400060a6
lea rcx, str._programfiles_Mozilla_Firefox
mov r8d, r13d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.140005cf8
cmp eax, ebx
jne 0x140006060
mov byte [rdi], bl
cmp byte [rdi], bl
jne 0x1400060a6
mov rcx, rdi
call fcn.140006620
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.140005cf8
cmp eax, ebx
jne 0x140006080
mov byte [rdi], bl
cmp byte [rdi], bl
jne 0x1400060a6
mov rdx, rdi
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.140005cf8
cmp eax, ebx
jne 0x1400060a4
mov byte [rdi], bl
cmp byte [rdi], bl
setne bl
mov eax, ebx
add rsp, 0x770
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret