Function at 0x401240
Capabilities:
Query environment variable
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x150
mov eax, dword [0x450010]
xor eax, ebp
mov dword [esp + 0x148], eax
xor eax, eax
push eax
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4012f4
mov edi, eax
add eax, eax
xor ecx, ecx
dec ecx
test edi, edi
cmovns ecx, eax
push ecx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
mov esi, edi
dec esi
push edi
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
mov esi, ebx
jne 0x4012ea
xor eax, eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
dec eax
cmp eax, 0x7ffe
ja 0x4012ea
mov eax, ebx
add eax, ebx
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4012e0
push edi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push 0x44b512
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [ebp + 8]
lea esi, [esp + 0x18]
push 0x445190
mov edi, dword [ebp + 0xc]
push edi
push eax
push esi
call fcn.00401ae0
add esp, 0x10
cmp byte [esi + 4], 0
jne 0x4018bb
mov eax, dword [ebp + 8]
lea ecx, [eax + 1]
xor edx, edx
dec edx
cmp ecx, 0x40000000
lea eax, [eax*4 + 4]
cmovae eax, edx
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 4], ebx
jle 0x4013ab
xor esi, esi
mov eax, dword [edi + esi*4]
mov dword [esp + 8], eax
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
add esp, 4
mov ebx, eax
lea eax, [eax + eax*2]
add eax, 2
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
lea eax, [ebx + ebx*2]
inc eax
xor ecx, ecx
push ecx
push ecx
push eax
push edi
push ebx
mov ebx, dword [esp + 0x18]
push dword [esp + 0x1c]
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [edi + eax], 0
mov dword [ebx + esi*4], edi
mov edi, dword [ebp + 0xc]
inc esi
mov eax, dword [ebp + 8]
cmp esi, eax
jl 0x401355
mov dword [ebx + eax*4], 0
lea ecx, [eax + 1]
cmp ecx, 0x40000000
lea eax, [eax*4 + 4]
mov ecx, 0xffffffff
cmovae eax, ecx
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4013eb
shl eax, 2
push eax
push ebx
push edi
call sub.ntdll.dll_memcpy
add esp, 0xc
mov dword [esp + 0x14], edi
push 0x448e34
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov eax, dword [eax]
mov dword [esp + 8], eax
mov edi, dword [ebp + 8]
lea eax, [esp + 0x28]
push 1
push eax
call dword [sym.imp.mozglue.dll_private:_static_class_mozilla::TimeStamp___cdecl_mozilla::TimeStamp::Now_bool_]
add esp, 8
lea eax, [esp + 0x27]
push eax
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::baseprofiler::profiler_init_void__]
add esp, 4
call dword [sym.imp.mozglue.dll_public:_static_class_mozilla::baseprofiler::ProfilingStack____cdecl_mozilla::baseprofiler::AutoProfilerLabel::GetProfilingStack_void_]
mov dword [esp + 0x20], eax
test eax, eax
je 0x401475
mov ebx, eax
mov esi, dword [eax + 8]
cmp esi, dword [eax]
jb 0x401449
mov ecx, ebx
call dword [sym.imp.mozglue.dll_private:_void___thiscall_mozilla::baseprofiler::ProfilingStack::ensureCapacitySlow_void_]
mov eax, dword [ebx + 4]
shl esi, 5
mov dword [eax + esi], str.nsBrowserApp_main
mov dword [eax + esi + 4], 0
lea ecx, [esp + 0x20]
mov dword [eax + esi + 8], ecx
mov dword [eax + esi + 0x1c], 0x10001
mov eax, dword [ebx + 8]
inc eax
mov dword [ebx + 8], eax
cmp edi, 2
mov esi, dword [esp + 4]
mov dword [esp + 0xc], edi
jl 0x4018fb
mov eax, esi
add esi, 4
mov eax, dword [eax + 4]
movzx ecx, byte [eax]
cmp ecx, 0x2d
jne 0x4016e3
lea ecx, [eax + 1]
lea edx, [eax + 2]
cmp byte [eax + 1], 0x2d
cmove ecx, edx
push str.contentproc
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4016ec
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0xc]
push dword [edi + ebx*4 - 4]
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::SetGeckoProcessType_char_const__]
add esp, 4
call dword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::RegisterRuntimeExceptionModule_void_]
mov edx, dword [edi + 4]
test edx, edx
je 0x4018ec
lea eax, [ebx - 1]
mov dword [esp + 0x10], eax
mov eax, edi
add eax, 8
movzx ecx, byte [edx]
cmp ecx, 0x2d
je 0x401510
cmp ecx, 0x2f
je 0x4018f3
mov edx, dword [esi + 4]
add esi, 4
add eax, 4
test edx, edx
jne 0x4014f0
jmp 0x40158f
lea ebx, [edx + 1]
lea edi, [edx + 2]
cmp byte [edx + 1], 0x2d
cmove ebx, edi
mov dl, 0x77
xor edi, edi
mov dword [esp + 8], ebx
mov bh, byte [ebx + edi]
test bh, bh
je 0x401501
mov ecx, edi
cmp dl, 0x2d
je 0x401547
mov bl, dl
add bl, 0xd0
cmp bl, 0xa
jb 0x401547
mov dh, dl
add dh, 0x9f
cmp dh, 0x19
ja 0x401501
mov dh, bh
add dh, 0xbf
movzx edi, bh
or bh, 0x20
cmp dh, 0x1a
movzx ebx, bh
cmovae ebx, edi
cmp bl, dl
jne 0x401501
mov edi, ecx
mov dl, byte [ecx + 0x447e38]
inc edi
cmp edi, 0x10
mov ebx, dword [esp + 8]
jne 0x401525
cmp byte [ebx + 0x10], 0
jne 0x401501
mov ecx, dword [eax]
mov dword [eax - 4], ecx
add eax, 4
test ecx, ecx
jne 0x401577
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::SetWin32kLockedDownInPolicy_void_]
mov edi, dword [esp + 0x10]
jmp 0x401593
mov edi, dword [esp + 0xc]
mov eax, dword [0x450638]
mov ecx, eax
or ecx, 1
mov edx, dword [sym.imp.mozglue.dll_enum_GeckoProcessType_mozilla::startup::sChildProcessType]
mov edx, dword [edx]
add edx, 0xfffffffc
cmp edx, 7
ja case.0x4015ad.6
jmp dword [edx*4 + 0x4451d4]
push ecx
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
cmp dword [sym.firefox.exe_g_shared_section], 0
jne 0x401915
call dword [sym.imp.mozglue.dll_enum_mozilla::WindowsDpiInitializationResult___cdecl_mozilla::WindowsDpiInitialization_void_]
xor esi, esi
xor ecx, ecx
call fcn.00404560
test eax, eax
js 0x40192f
mov ebx, dword [0x450634]
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
cmp dword [sym.firefox.exe_g_shared_section], esi
jne 0x401940
mov eax, dword [esp + 4]
mov esi, dword [eax + edi*4 - 4]
dec edi
mov dword [esp + 0x10], edi
mov eax, dword [ebx]
mov edi, dword [eax + 0x28]
mov ecx, edi
call dword [section..00cfg]
mov ecx, ebx
push esi
call edi
mov eax, dword [ebx]
mov edi, dword [eax + 0x24]
mov ecx, edi
call dword [section..00cfg]
mov ecx, ebx
call edi
cmp eax, 9
je 0x40195e
mov eax, dword [ebx]
mov edi, dword [eax + 0x2c]
mov ecx, edi
call dword [section..00cfg]
lea eax, [esp + 0x44]
mov ecx, ebx
push eax
mov esi, dword [esp + 8]
push esi
push dword [esp + 0x18]
call edi
shr eax, 0x1f
mov dword [esp + 8], eax
mov edi, dword [0x450634]
mov eax, dword [edi]
mov ebx, dword [eax + 0xc]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
call dword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::UnregisterRuntimeExceptionModule_void_]
mov eax, dword [esp + 0x20]
test eax, eax
mov ebx, dword [esp + 0x14]
je 0x40168f
mov ecx, dword [eax + 8]
dec ecx
mov dword [eax + 8], ecx
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::baseprofiler::profiler_shutdown_void_]
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [ebp + 8]
test esi, esi
je 0x4016bd
mov edi, dword [sym.imp.mozglue.dll_free]
mov eax, dword [ebx + esi*4 - 4]
test eax, eax
je 0x4016ba
push eax
call edi
add esp, 4
dec esi
jne 0x4016ac
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0x148]
xor ecx, ebp
call fcn.004230e0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp ecx, 0x2f
je 0x40197c
call dword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::RegisterRuntimeExceptionModule_void_]
push dword [0x450638]
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
mov eax, dword [esi]
movzx ecx, byte [eax]
cmp ecx, 0x2d
jne 0x4018c4
lea ecx, [eax + 1]
lea edx, [eax + 2]
cmp byte [eax + 1], 0x2d
cmove ecx, edx
mov esi, dword [esp + 4]
mov edi, dword [esp + 0xc]
push str.silentmode
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x401a5d
call dword [sym.imp.mozglue.dll_enum_mozilla::WindowsDpiInitializationResult___cdecl_mozilla::WindowsDpiInitialization_void_]
call fcn.00413270
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push esi
push edi
push eax
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::CreateAndStorePreXULSkeletonUI_struct_HINSTANCE_____int__char___]
add esp, 0xc
xor ecx, ecx
inc ecx
call fcn.00404560
test eax, eax
js 0x401984
mov edi, dword [0x450634]
mov eax, dword [edi]
mov ebx, dword [eax + 0x14]
mov ecx, ebx
call dword [section..00cfg]
sub esp, 0x1c
movsd xmm0, qword [esp + 0x54]
movsd qword [esp + 0x14], xmm0
movups xmm0, xmmword [esp + 0x44]
movups xmmword [esp + 4], xmm0
mov dword [esp], 1
mov ecx, edi
call ebx
mov edi, dword [0x450634]
mov eax, dword [edi]
mov ebx, dword [eax + 0x30]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
push str.XUL_APP_FILE
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
mov ebx, eax
test eax, eax
jne 0x401991
mov edi, dword [esp + 0xc]
cmp edi, 1
jle 0x40180f
mov ecx, dword [esi + 4]
mov edx, 0x447dd1
call fcn.00423b20
test al, al
jne 0x4019af
mov ecx, dword [esi + 4]
mov edx, str.xpcshell
call fcn.00423b20
test al, al
jne 0x4019bf
mov ecx, esi
mov esi, ecx
test ebx, ebx
jne 0x401a12
mov ebx, 0x447b5b
mov ecx, 0x445190
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ebx
call fcn.00443f50
test eax, eax
je 0x401a2b
mov dword [esp + 0x44], eax
mov ecx, edi
mov edx, esi
call fcn.004104e0
test al, al
mov dword [esp + 0xc], edi
je 0x401a45
mov edi, dword [0x450634]
mov eax, dword [edi]
mov ebx, dword [eax + 0x18]
mov ecx, ebx
call dword [section..00cfg]
lea eax, [esp + 0x44]
mov ecx, edi
push eax
push esi
push dword [esp + 0x14]
call ebx
mov dword [esp + 8], eax
mov esi, dword [esp + 4]
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::CleanupProcessRuntime_void_]
mov edi, dword [0x450634]
mov eax, dword [edi]
mov ebx, dword [eax + 0xc]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, edi
call ebx
mov ebx, dword [0x450634]
mov dword [0x450634], 0
test ebx, ebx
je 0x401676
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [section..00cfg]
mov ecx, ebx
call edi
jmp 0x401676
mov esi, dword [esp + 0x18]
jmp 0x4016cb
cmp ecx, 0x2f
mov esi, dword [esp + 4]
mov edi, dword [esp + 0xc]
jne 0x40173b
inc eax
mov ecx, eax
jmp 0x401724
or eax, 9
jmp 0x4018e5
or eax, 0x11
mov ecx, eax
jmp case.0x4015ad.6
mov edi, ebx
jmp 0x401593
inc edx
mov ebx, edx
jmp 0x40151d
call dword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::RegisterRuntimeExceptionModule_void_]
push dword [0x450638]
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
jmp 0x40173b
call fcn.00443e40
test eax, eax
jne 0x4015cb
push str.Failed_to_initialize_the_sandbox_target_services.
call fcn.004257c0
add esp, 4
mov dword [esp + 8], 0xff
mov esi, dword [esp + 4]
jmp 0x401676
call fcn.00443e40
mov dword [esp + 0x44], eax
test eax, eax
je 0x401a4d
mov dword [esp + 0x48], 0x42ba50
jmp 0x401600
call fcn.00443f50
mov dword [esp + 0x4c], eax
jmp 0x401639
or eax, 5
jmp 0x4018e5
or eax, 0x21
jmp 0x4018e5
inc eax
mov ecx, eax
jmp 0x4014a7
mov dword [esp + 8], 0xff
jmp 0x401676
mov al, byte [ebx]
mov edi, dword [esp + 0xc]
cmp edi, 2
jl 0x4019a4
test al, al
je 0x4017d9
cmp edi, 1
jg 0x4017ee
jmp 0x401a18
cmp edi, 2
jne 0x401a7d
push str.Incorrect_number_of_arguments_passed_to__app
jmp 0x401a30
lea eax, [esi + 4]
add esi, 8
lea edx, [edi*4 - 4]
push edx
push esi
push eax
call sub.ntdll.dll_memmove
add esp, 0xc
call fcn.00443f50
lea ecx, [esp + 0x44]
mov dword [ecx], eax
mov esi, dword [0x450634]
dec edi
mov eax, dword [esi]
mov ebx, dword [eax + 0x20]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
lea eax, [esp + 0x44]
push eax
mov esi, dword [esp + 8]
push dword [esp + 0xc]
push esi
push edi
call ebx
mov dword [esp + 8], eax
jmp 0x401870
mov dword [esp + 0xc], edi
mov al, byte [ebx]
xor ecx, ecx
test al, al
mov edi, dword [esp + 0xc]
jne 0x401819
jmp 0x40180f
push str.Couldnt_initialize_the_broker_services._n
call fcn.004257c0
add esp, 4
mov dword [esp + 8], 0xff
jmp 0x40186c
push 0x7f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
xor eax, eax
inc eax
mov dword [esp + 8], eax
mov esi, dword [esp + 4]
jmp 0x40165f
mov esi, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
push str.MOZ_APP_SILENT_START1
call esi
add esp, 4
push str.MOZ_APP_ALLOW_WINDOWLESS1
call esi
mov esi, dword [esp + 8]
jmp 0x40190d
mov eax, dword [esp + 4]
mov ebx, dword [eax + 8]
sub esp, 0xc
mov dword [esp + 8], ebx
lea esi, [esp + 0x50]
mov dword [esp], esi
call fcn.00425890
add esp, 0xc
push esi
call dword [sym.imp.mozglue.dll_strdup]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
add esp, 4
test eax, eax
jne 0x401acc
mov esi, dword [esp + 4]
mov ecx, esi
add ecx, 8
mov eax, dword [esi]
mov dword [esi + 8], eax
mov edi, dword [esp + 0xc]
add edi, 0xfffffffe
jmp 0x401805
push esi
push str.Couldnt_set__s._n
call fcn.004257c0
add esp, 8
jmp 0x401a38