Function at 0x401788
Capabilities:
Query environment variable

Disassembly:
je 0x401970
push dword [0x518b60]
call dword [sym.imp.mozglue.dll_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
call dword [method.mozilla.WindowsDpiInitialization__]
call fcn.00410c80
mov eax, dword [0x4f62cc]
push eax
call sub.ntdll.dll_RtlRunOnceInitialize
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push ebx
push edi
push eax
call dword [method.mozilla.CreateAndStorePreXULSkeletonUI_HINSTANCE____int__char_]
add esp, 0xc
mov ecx, 1
call fcn.00401de0
test eax, eax
js 0x401be9
mov ecx, dword [0x518b64]
movups xmm0, xmmword [esp + 0x38]
movaps xmmword [esp + 0x20], xmm0
movsd xmm0, qword [esp + 0x48]
movsd qword [esp + 0x30], xmm0
mov eax, dword [ecx]
sub esp, 0x1c
movsd xmm0, qword [esp + 0x4c]
movsd qword [esp + 0x14], xmm0
movaps xmm0, xmmword [esp + 0x3c]
movups xmmword [esp + 4], xmm0
mov dword [esp], 1
call dword [eax + 0x18]
mov ecx, dword [0x518b64]
mov eax, dword [ecx]
call dword [eax + 0x34]
mov dword [esp + 0x1c], edi
push str.XUL_APP_FILE
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
mov esi, eax
test eax, eax
je 0x401857
mov al, byte [esi]
cmp edi, 2
jl 0x401847
test al, al
je 0x40185c
cmp edi, 1
jg 0x4018a2
cmp edi, 1
jle 0x401880
mov eax, dword [ebx + 4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x401888
cmp cl, 0x2d
jne 0x4018a2
lea ecx, [eax + 1]
lea edx, [eax + 2]
cmp byte [eax + 1], 0x2d
cmove ecx, edx
push 0x4f621d
push ecx
jmp 0x401891
mov edi, dword [0x4f62d0]
jmp 0x4018f2
add eax, 1
push 0x4f621d
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x401b27
mov eax, dword [ebx + 4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x4018c6
cmp cl, 0x2d
jne 0x4018e0
lea ecx, [eax + 1]
lea edx, [eax + 2]
cmp byte [eax + 1], 0x2d
cmove ecx, edx
push str.xpcshell
push ecx
jmp 0x4018cf
add eax, 1
push str.xpcshell
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x401a39
test esi, esi
mov edi, dword [0x4f62d0]
je 0x4018f2
mov al, byte [esi]
mov eax, dword [0x518b60]
or eax, 1
push eax
call dword [sym.imp.mozglue.dll_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
call dword [method.mozilla.WindowsDpiInitialization__]
call sym.firefox.exe_IsSandboxedProcess
test al, al
je 0x40199e
call fcn.004649f0
test eax, eax
je 0x401bdc
xor ecx, ecx
call fcn.00401de0
test eax, eax
js 0x401be9
mov esi, dword [0x518b64]
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
add byte [eax], al
add bh, al
inc esp
and al, 0x5c
add byte [eax], al
add byte [eax], al
call sym.firefox.exe_IsSandboxedProcess
test al, al
je 0x4019ed
call fcn.004649f0
mov dword [esp + 0x54], eax
test eax, eax
je 0x401c1d
mov dword [esp + 0x58], 0x417060
mov eax, dword [esi]
mov ecx, esi
int1
push dword [ebx + edi*4 - 4]
add edi, 0xffffffff
call dword [eax + 0x2c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x28]
cmp eax, 9
jne 0x401a10
call fcn.00464b60
mov dword [esp + 0x5c], eax
mov eax, dword [esi]
lea edx, [esp + 0x54]
mov ecx, esi
push edx
push ebx
push edi
call dword [eax + 0x30]
mov esi, eax
shr esi, 0x1f
mov ecx, dword [0x518b64]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov edi, dword [0x4f62d0]
jmp 0x401bae
cmp edi, 2
cmp edi, 2
jne 0x401b3b
push str.Incorrect_number_of_arguments_passed_to__app
call fcn.00401d20
add esp, 4
jmp 0x401b79
mov esi, dword [ebx + 8]
lea edi, [esp + 0x54]
push esi
push str.XUL_APP_FILE_s
push edi
call fcn.00401f60
add esp, 0xc
push edi
call sub.mozglue.dll_strdup
add esp, 4
push eax
call sub.api_ms_win_crt_environment_l1_1_0.dll__putenv
add esp, 4
test eax, eax
je 0x401c0b
push edi
push str.Couldnt_set__s._n
call fcn.00401d20
add esp, 8
mov esi, 0xff
mov edi, dword [0x4f62d0]
push str.Failed_to_initialize_the_sandbox_target_services.
call fcn.00401d20
add esp, 4
mov esi, 0xff
mov edi, dword [0x4f62d0]
jmp 0x401bae
mov dword [ebx + 4], eax
mov dword [ebx], edx
mov dword [eax], ebx
mov dword [edx + 4], ebx
pop edi
pop esi
pop ebx
ret
cmp eax, 0x40a604
add byte [esi + 0x40], bh
cmp dword [0x40a604], 0xc
jge 0x401c3a
mov dword [0x40a5b0], 7
jmp 0x401c65
mov eax, dword [0x40a604]