Function at 0x140019690
Capabilities:
Get common file path
Get system information on windows
Query environment variable
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x328
movaps xmmword [rsp + 0x310], xmm6
mov r12, rdx
mov rax, qword [0x14005f018]
xor rax, rsp
mov qword [rsp + 0x308], rax
mov dword [rsp + 0x6c], ecx
lea rsi, [rsp + 0xfc]
mov r8d, 0x110
mov rcx, rsi
xor edx, edx
call sub.ntdll.dll_memset
mov dword [rsi - 0xc], 0x11c
mov rdi, qword [sym.imp.ntdll.dll_VerSetConditionMask]
xor ecx, ecx
mov edx, 2
mov r8b, 3
call rdi
mov rcx, rax
mov edx, 1
mov r8b, 3
call rdi
mov rcx, rax
mov edx, 0x20
mov r8b, 3
call rdi
movabs rcx, 0x200000006
mov qword [rsi - 8], rcx
mov word [rsi + 0x108], 0
lea rcx, [rsp + 0xf0]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x140019f38
lea rcx, [0x140056d04]
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400197e7
mov edi, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov ebp, edi
dec ebp
lea rcx, [0x140056d04]
mov rdx, rax
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp ebp, eax
jne 0x1400197de
mov rcx, rsi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebp, eax
lea eax, [rbp - 1]
cmp eax, 0x7ffe
ja 0x1400197de
mov ecx, ebp
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov rcx, rsi
mov rdx, rax
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400197d5
lea rcx, [0x140056d04]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rdi
call qword [sym.imp.mozglue.dll_free]
mov rcx, rsi
call qword [sym.imp.mozglue.dll_free]
lea rcx, [0x140056efc]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea rdi, str.Mozilla
lea rsi, [rsp + 0x60]
lea rdx, [rsp + 0x6c]
mov rcx, rsi
mov r8, r12
mov r9, rdi
call fcn.14001b420
cmp byte [rsi + 4], 0
jne 0x140019f1a
mov qword [rsp + 0x58], rdi
movsxd rax, dword [rsp + 0x6c]
inc rax
mov edi, 8
mul rdi
mov rsi, 0xffffffffffffffff
cmovo rax, rsi
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbp, rax
mov eax, dword [rsp + 0x6c]
test eax, eax
mov qword [rsp + 0x40], rbp
jle 0x1400198d5
xor r13d, r13d
mov r14, qword [sym.imp.mozglue.dll_moz_xmalloc]
xorps xmm6, xmm6
mov r15, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rbp, qword [r12 + r13*8]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov rsi, rax
lea rbx, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call r14
mov rdi, rax
inc ebx
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, rbp
mov rbp, qword [rsp + 0x40]
mov r9d, esi
call r15
cdqe
mov byte [rdi + rax], 0
mov qword [rbp + r13*8], rdi
inc r13
movsxd rax, dword [rsp + 0x6c]
cmp r13, rax
jl 0x14001986a
mov rsi, 0xffffffffffffffff
mov edi, 8
cdqe
mov qword [rbp + rax*8], 0
inc eax
cdqe
mul rdi
cmovno rsi, rax
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r13, rax
mov r8d, dword [rsp + 0x6c]
test r8d, r8d
jle 0x140019910
shl r8, 3
mov rcx, r13
mov rdx, rbp
call sub.ntdll.dll_memcpy
lea rcx, str.PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov r12, qword [rax]
mov r14d, dword [rsp + 0x6c]
lea rcx, [rsp + 0xa0]
mov dl, 1
call qword [sym.imp.mozglue.dll_private:_static_class_mozilla::TimeStamp___cdecl_mozilla::TimeStamp::Now_bool_]
lea rcx, [rsp + 0x98]
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::baseprofiler::profiler_init_void____ptr64_]
call qword [sym.imp.mozglue.dll_public:_static_class_mozilla::baseprofiler::ProfilingStack____ptr64___cdecl_mozilla::baseprofiler::AutoProfilerLabel::GetProfilingStack_void_]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x1400199a8
mov rdi, rax
mov esi, dword [rax + 0x10]
cmp esi, dword [rax]
jb 0x14001996f
mov rcx, rdi
call qword [sym.imp.mozglue.dll_private:_void___cdecl_mozilla::baseprofiler::ProfilingStack::ensureCapacitySlow_void____ptr64]
mov rax, qword [rdi + 8]
lea rcx, [rsi + rsi*4]
lea rdx, str.nsBrowserApp_main
mov qword [rax + rcx*8], rdx
mov qword [rax + rcx*8 + 8], 0
lea rdx, [rsp + 0x90]
mov qword [rax + rcx*8 + 0x10], rdx
mov dword [rax + rcx*8 + 0x24], 0x10001
mov eax, dword [rdi + 0x10]
inc eax
mov dword [rdi + 0x10], eax
cmp r14d, 2
mov qword [rsp + 0x50], r14
jl 0x140019fa3
lea rsi, [rbp + 8]
mov rax, qword [rbp + 8]
mov cl, byte [rax]
cmp cl, 0x2d
jne 0x140019d11
lea rcx, [rax + 1]
lea rdx, [rax + 2]
cmp byte [rax + 1], 0x2d
cmove rcx, rdx
lea rdx, str.contentproc
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
jne 0x140019d1a
mov edx, dword [0x14005fc78]
mov rax, qword [rsi]
mov ecx, 1
test rax, rax
je 0x140019b0c
mov dword [rsp + 0x4c], edx
mov qword [rsp + 0x58], r13
mov rbx, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
lea r14, str.sandboxingkind
mov rcx, rsi
mov rdi, rbp
mov r12, rdi
mov rdi, rcx
mov cl, byte [rax]
or cl, 2
cmp cl, 0x2f
jne 0x140019a75
lea rbp, [rax + 1]
lea rcx, [rax + 2]
cmp byte [rax + 1], 0x2d
cmove rbp, rcx
mov r13b, 0x73
xor r15d, r15d
movsx ecx, byte [rbp + r15]
test ecx, ecx
je 0x140019a75
call rbx
movsx eax, al
movsx ecx, r13b
cmp eax, ecx
jne 0x140019a75
mov r13b, byte [r15 + r14 + 1]
inc r15
test r13b, r13b
jne 0x140019a49
cmp byte [rbp + r15], 0
je 0x140019a9c
lea rcx, [rdi + 8]
mov rax, qword [rdi + 8]
test rax, rax
jne 0x140019a23
mov rbp, qword [rsp + 0x40]
mov r13, qword [rsp + 0x58]
mov r14, qword [rsp + 0x50]
mov edx, dword [rsp + 0x4c]
mov ecx, 1
jmp 0x140019b0c
mov rbx, qword [r12 + 0x10]
test rbx, rbx
je 0x140019a82
mov al, byte [rbx]
or al, 2
cmp al, 0x2f
je 0x140019a82
mov rdi, qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call rdi
mov dword [rax], 0
lea rdx, [rsp + 0xf0]
mov qword [rdx], 0
mov rcx, rbx
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoull]
call rdi
cmp dword [rax], 0
mov rbp, qword [rsp + 0x40]
mov r13, qword [rsp + 0x58]
mov r14, qword [rsp + 0x50]
jne 0x140019a91
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x140019a91
cmp byte [rax], 0
jne 0x140019a91
mov ecx, 5
mov edx, dword [rsp + 0x4c]
or ecx, edx
call qword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
mov rax, qword [rsi]
test rax, rax
je 0x140019bb7
mov rdi, rbp
add rdi, 0x10
mov r14, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov cl, byte [rax]
or cl, 2
cmp cl, 0x2f
je 0x140019b4b
mov rax, qword [rsi + 8]
add rsi, 8
add rdi, 8
test rax, rax
jne 0x140019b2e
jmp 0x140019bb2
lea rbp, [rax + 1]
lea rcx, [rax + 2]
cmp byte [rax + 1], 0x2d
cmove rbp, rcx
mov bl, 0x77
xor r15d, r15d
movsx ecx, byte [rbp + r15]
test ecx, ecx
je 0x140019b38
call r14
movsx eax, al
movsx ecx, bl
cmp eax, ecx
jne 0x140019b38
lea rax, str.win32klockeddown
mov bl, byte [r15 + rax + 1]
inc r15
cmp r15, 0x10
jne 0x140019b60
cmp byte [rbp + 0x10], 0
jne 0x140019b38
mov rax, qword [rdi]
mov qword [rdi - 8], rax
add rdi, 8
test rax, rax
jne 0x140019b92
mov r14, qword [rsp + 0x50]
dec r14d
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::SetWin32kLockedDownInPolicy_void_]
jmp 0x140019bb7
mov r14, qword [rsp + 0x50]
cmp qword [sym.firefox.exe_g_shared_section], 0
jne 0x140019fb4
call qword [sym.imp.mozglue.dll_enum_mozilla::WindowsDpiInitializationResult___cdecl_mozilla::WindowsDpiInitialization_void_]
xor ecx, ecx
call fcn.14001a210
test eax, eax
js 0x140019fce
mov rbx, qword [0x14005fa50]
test r14d, r14d
mov rbp, qword [rsp + 0x40]
jle 0x140019fde
xorps xmm0, xmm0
movaps xmmword [rsp + 0xf0], xmm0
mov qword [rsp + 0x100], 0
cmp qword [sym.firefox.exe_g_shared_section], 0
jne 0x140019fe9
dec r14d
mov rdx, qword [rbp + r14*8]
mov rax, qword [rbx]
mov rax, qword [rax + 0x50]
mov rcx, rbx
call qword [case.0x14002713e.0]
mov rax, qword [rbx]
mov rax, qword [rax + 0x48]
mov rcx, rbx
call qword [case.0x14002713e.0]
cmp eax, 9
je 0x14001a018
mov rax, qword [rbx]
mov rax, qword [rax + 0x58]
lea r9, [rsp + 0xf0]
mov rcx, rbx
mov edx, r14d
mov r8, rbp
call qword [case.0x14002713e.0]
mov r14d, eax
shr r14d, 0x1f
mov rbx, qword [0x14005fa50]
mov rax, qword [rbx]
mov rax, qword [rax + 0x18]
mov rcx, rbx
call qword [case.0x14002713e.0]
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x140019c96
mov ecx, dword [rax + 0x10]
dec ecx
mov dword [rax + 0x10], ecx
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::baseprofiler::profiler_shutdown_void_]
mov rcx, rbp
call qword [sym.imp.mozglue.dll_free]
movsxd rax, dword [rsp + 0x6c]
test rax, rax
je 0x140019cd9
mov esi, eax
neg esi
lea rbx, [rax*8 - 8]
add rbx, r13
xor ebp, ebp
mov rdi, qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rbx + rbp*8]
test rcx, rcx
je 0x140019cd2
call rdi
dec rbp
cmp esi, ebp
jne 0x140019cc7
mov rcx, r13
call qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rsp + 0x308]
xor rcx, rsp
call fcn.140027a90
mov eax, r14d
movaps xmm6, xmmword [rsp + 0x310]
add rsp, 0x328
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp cl, 0x2f
je 0x14001a02a
mov ecx, dword [0x14005fc78]
call qword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
mov rax, qword [rsi]
mov cl, byte [rax]
cmp cl, 0x2d
jne 0x140019f24
lea rcx, [rax + 1]
lea rdx, [rax + 2]
cmp byte [rax + 1], 0x2d
cmove rcx, rdx
lea rdx, str.silentmode
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x14001a169
call qword [sym.imp.mozglue.dll_enum_mozilla::WindowsDpiInitializationResult___cdecl_mozilla::WindowsDpiInitialization_void_]
call fcn.14001a3e0
lea rcx, [0x14005fdb0]
call sub.ntdll.dll_RtlRunOnceInitialize
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
mov edx, r14d
mov r8, rbp
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::CreateAndStorePreXULSkeletonUI_struct_HINSTANCE______ptr64__int__char____ptr64____ptr64_]
mov ecx, 1
call fcn.14001a210
test eax, eax
js 0x14001a035
mov rcx, qword [0x14005fa50]
movups xmm0, xmmword [rsp + 0xa0]
lea r8, [rsp + 0x70]
movaps xmmword [r8], xmm0
mov rax, qword [rsp + 0xb0]
mov qword [r8 + 0x10], rax
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
mov edx, 1
call qword [case.0x14002713e.0]
mov rcx, qword [0x14005fa50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x60]
call qword [case.0x14002713e.0]
mov dword [rsp + 0xbc], r14d
lea rcx, str.XUL_APP_FILE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
jne 0x14001a040
cmp r14d, 1
jle 0x14001a062
mov rcx, qword [rbp + 8]
lea rdx, [0x140053e1e]
call fcn.14002d3f0
test al, al
jne 0x14001a06a
mov rcx, qword [rbp + 8]
lea rdx, str.xpcshell
call fcn.14002d3f0
test al, al
jne 0x14001a090
mov rsi, rbp
test rdi, rdi
jne 0x14001a0e1
lea rdi, str.browser
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x100], rax
mov qword [rsp + 0x108], rdi
call fcn.14002d4a0
mov rdi, rax
call fcn.14002d430
test rdi, rdi
je 0x14001a106
lea rbx, [rsp + 0xf0]
mov qword [rbx], rdi
mov qword [rbx + 8], rax
mov rax, qword [0x1400512b0]
lea r8, [rsp + 0xc0]
mov qword [r8 + 0x10], rax
movaps xmm0, xmmword [0x1400512a0]
movaps xmmword [r8], xmm0
lea rcx, [rsp + 0xbc]
mov rdx, rsi
call fcn.14001b220
mov rcx, qword [0x14005fa50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x30]
mov edx, r14d
mov r8, rsi
mov r9, rbx
call qword [case.0x14002713e.0]
mov r14d, eax
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::CleanupProcessRuntime_void_]
mov rcx, qword [0x14005fa50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x14002713e.0]
mov rcx, qword [0x14005fa50]
mov qword [0x14005fa50], 0
test rcx, rcx
je 0x140019c81
mov rax, qword [rcx]
mov rax, qword [rax + 8]
jmp 0x140019c7b
mov r14d, dword [rsp + 0x60]
jmp 0x140019ce2
cmp cl, 0x2f
jne 0x140019d59
inc rax
mov rcx, rax
jmp 0x140019d44
lea rsi, [rsp + 0xc0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rsi], 0
jne 0x140019745
lea rcx, [rsp + 0xf0]
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [rax - 1]
cmp ecx, 0xf9
ja 0x14001a12d
mov eax, eax
cmp word [rsp + rax*2 + 0xee], 0x5c
je 0x14001a12f
cmp eax, 0xf9
ja 0x14001a12d
mov word [rsp + rax*2 + 0xf0], 0x5c
inc rax
jmp 0x14001a12f
mov ecx, dword [0x14005fc78]
call qword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
jmp 0x140019d59
call fcn.14004eeb0
test rax, rax
jne 0x140019bc5
lea rcx, str.Failed_to_initialize_the_sandbox_target_services.
call fcn.14002d9a0
mov r14d, 0xff
mov rbp, qword [rsp + 0x40]
jmp 0x140019c81
mov r14d, 3
jmp 0x140019c71
call fcn.14004eeb0
mov qword [rsp + 0xf0], rax
test rax, rax
je 0x14001a11d
lea rax, [0x1400368c0]
mov qword [rsp + 0xf8], rax
mov rbp, qword [rsp + 0x40]
jmp 0x140019c14
call fcn.14002d4a0
mov qword [rsp + 0x100], rax
jmp 0x140019c45
inc rax
mov rcx, rax
jmp 0x1400199da
mov r14d, 0xff
jmp 0x140019c81
mov al, byte [rdi]
cmp r14d, 2
jl 0x14001a050
test al, al
je 0x140019e0e
cmp r14d, 1
jg 0x140019e26
mov rsi, rbp
jmp 0x14001a0e8
mov rsi, rbp
jmp 0x140019e4a
cmp r14d, 2
jne 0x14001a187
lea rcx, str.Incorrect_number_of_arguments_passed_to__app
call fcn.14002d9a0
mov r14d, 0xff
mov rbp, qword [rsp + 0x40]
jmp 0x140019ed9
lea rcx, [rbp + 8]
mov rdx, rbp
add rdx, 0x10
dec r14d
lea r8, [r14*8]
call sub.ntdll.dll_memmove
call fcn.14002d4a0
mov qword [rsp + 0xf0], rax
mov rcx, qword [0x14005fa50]
mov rax, qword [rcx]
mov rax, qword [rax + 0x40]
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x20], rdx
mov edx, r14d
mov r8, rbp
mov r9, r12
jmp 0x140019ed0
mov qword [rsp + 0x50], r14
mov al, byte [rdi]
test al, al
je 0x14001a1e3
xor eax, eax
mov qword [rsp + 0x58], rax
mov rbp, qword [rsp + 0x40]
mov r14, qword [rsp + 0x50]
jmp 0x140019e51
lea rcx, str.Couldnt_initialize_the_broker_services._n
call fcn.14002d9a0
mov r14d, 0xff
jmp 0x140019ed9
mov r14d, 1
mov rbp, qword [rsp + 0x40]
jmp 0x140019c6a
xor eax, eax
lea rsi, [rsp + rax*2]
add rsi, 0xf0
lea rdx, str.user32.dll
mov r8d, 0xa
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [rsi + 0x14], 0
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x140019745
lea rcx, str.MOZ_APP_SILENT_START1
mov rsi, qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
call rsi
lea rcx, str.MOZ_APP_ALLOW_WINDOWLESS1
call rsi
jmp 0x140019d59
mov rax, qword [rsp + 0x40]
mov rdi, qword [rax + 0x10]
lea rsi, [rsp + 0xf0]
mov rcx, rsi
mov r8, rdi
call fcn.14002ee20
mov rcx, rsi
call qword [sym.imp.mozglue.dll_strdup]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
test eax, eax
jne 0x14001a1f2
mov rbp, qword [rsp + 0x40]
mov rsi, rbp
add rsi, 0x10
mov rax, qword [rbp]
mov qword [rbp + 0x10], rax
mov r14, qword [rsp + 0x50]
add r14d, 0xfffffffe
mov dword [rsp + 0xbc], r14d
jmp 0x140019e41
mov rbp, qword [rsp + 0x40]
mov r14, qword [rsp + 0x50]
jmp 0x140019e4a
lea rcx, str.Couldnt_set__s._n
lea rdx, [rsp + 0xf0]
call fcn.14002d9a0
jmp 0x14001a080