Function at 0x402f20
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x43a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ecx, ecx
mov edx, 4
mov dword [ebp - 0x314], edi
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405f45
mov esi, eax
add esp, 4
mov dword [ebp - 0x320], esi
test esi, esi
je 0x407bfa
mov dword [ebp - 0x324], 0
test edi, edi
jle 0x40303a
mov eax, dword [ebp + 0xc]
mov ebx, esi
sub eax, esi
mov dword [ebp - 0x318], esi
mov dword [ebp + 0xc], eax
nop dword [eax]
mov esi, dword [eax + ebx]
mov edi, esi
lea ecx, [edi + 2]
nop dword [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x402fa0
sub edi, ecx
sar edi, 1
lea eax, [edi*2 + 1]
add eax, edi
push eax
call fcn.00405f45
add esp, 4
mov dword [ebp - 0x328], eax
test eax, eax
je 0x407bf4
lea ebx, [esi + edi*2]
mov edx, eax
cmp esi, ebx
jae 0x403001
nop dword [eax + eax]
movzx ecx, word [esi]
mov edi, esi
test ecx, 0xff80
jne 0x407b01
mov byte [edx], cl
add esi, 2
inc edx
cmp esi, ebx
jb 0x402fe0
mov eax, dword [ebp - 0x328]
mov ebx, dword [ebp - 0x318]
mov edi, dword [ebp - 0x314]
mov byte [edx], 0
mov dword [ebx], eax
add ebx, 4
mov eax, dword [ebp - 0x324]
inc eax
mov dword [ebp - 0x318], ebx
mov dword [ebp - 0x324], eax
cmp eax, edi
jge 0x403034
mov eax, dword [ebp + 0xc]
jmp 0x402f90
mov esi, dword [ebp - 0x320]
xor ecx, ecx
mov dword [esi + edi*4], 0
lea eax, [edi + 1]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405f45
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407c04
test edi, edi
jle 0x403086
mov edx, esi
mov ecx, ebx
sub edx, ebx
mov esi, edi
mov eax, dword [edx + ecx]
mov dword [ecx], eax
add ecx, 4
sub esi, 1
jne 0x403073
mov esi, dword [ebp - 0x320]
push 0x422978
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
push 1
mov eax, dword [eax]
mov dword [ebp - 0x324], eax
lea eax, [ebp - 0x35c]
push eax
call dword [sym.imp.mozglue.dll_private:_static_class_mozilla::TimeStamp___cdecl_mozilla::TimeStamp::Now_bool_]
add esp, 0xc
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_void_]
cmp edi, 1
jle 0x4030d5
mov eax, dword [esi + 4]
mov edx, eax
mov cl, byte [eax]
cmp cl, 0x2d
je 0x407c17
cmp cl, 0x2f
je 0x407c37
push 0x104
lea eax, [ebp - 0x310]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x407cea
push 0
push 0
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x310]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x108]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
mov edi, eax
add esp, 8
mov dword [ebp - 0x31c], edi
test edi, edi
je 0x407c96
mov ecx, edi
lea eax, [ebp - 0x108]
sub ecx, eax
cmp ecx, 0xfb
ja 0x407c96
mov eax, dword [str.xul.dll]
mov dword [edi + 1], eax
mov eax, dword [0x422568]
push 0x104
mov dword [edi + 5], eax
lea eax, [ebp - 0x310]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407c89
lea ecx, [ebp - 0x108]
mov byte [0x43a5fc], 1
mov dword [0x43a4a0], 1
mov dword [0x43a4a4], 0xec
call fcn.00404350
test eax, eax
je 0x407ca6
push 0
push 0x43a4a0
call eax
mov esi, eax
add esp, 8
test esi, esi
js 0x407cad
xor eax, eax
mov esi, 0x422910
mov dword [ebp - 0x318], eax
cmp dword [str.XRE_GetFileFromPath], eax
je 0x403253
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
nop word [eax + eax]
push dword [esi]
lea eax, [ebp - 0x308]
push 0x422560
push eax
call fcn.004033b0
mov eax, dword [0x43a58c]
lea ecx, [ebp - 0x308]
add esp, 0xc
push ecx
push dword [eax]
call edi
mov ecx, dword [esi + 4]
mov dword [ecx], eax
mov eax, dword [esi + 4]
cmp dword [eax], 0
je 0x407cc1
add esi, 8
cmp dword [esi], 0
jne 0x403200
mov esi, dword [ebp - 0x318]
test esi, esi
js 0x407cd1
mov edi, dword [ebp - 0x31c]
mov eax, dword [0x43a53c]
test eax, eax
je 0x40325e
call eax
mov byte [edi], 0
mov eax, dword [0x43a4d8]
test eax, eax
je 0x403276
lea ecx, [ebp - 0x338]
push ecx
call eax
add esp, 4
mov eax, dword [0x43a528]
test eax, eax
je 0x403296
push 2
push 0xffffffffffffffff
lea ecx, [ebp - 0x108]
push ecx
lea ecx, [ebp - 0x344]
push ecx
call eax
add esp, 0x10
mov eax, dword [0x43a508]
test eax, eax
je 0x4032b4
lea ecx, [ebp - 0x338]
push ecx
lea ecx, [ebp - 0x344]
push 1
push ecx
call eax
add esp, 0xc
mov eax, dword [0x43a4f4]
test eax, eax
je 0x4032c9
lea ecx, [ebp - 0x344]
push ecx
call eax
add esp, 4
mov eax, dword [0x43a4c0]
test eax, eax
je 0x407ce0
lea ecx, [ebp - 0x32c]
push ecx
lea ecx, [ebp - 0x338]
push 0
push ecx
call eax
add esp, 0xc
mov esi, eax
mov eax, dword [0x43a4dc]
test eax, eax
je 0x403302
lea ecx, [ebp - 0x338]
push ecx
call eax
add esp, 4
test esi, esi
js 0x407c96
movups xmm0, xmmword [ebp - 0x35c]
sub esp, 0x18
mov eax, esp
push 1
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x34c]
movq qword [eax + 0x10], xmm0
call dword [0x43a460]
call dword [0x43a474]
push dword [ebp - 0x32c]
mov edi, dword [ebp - 0x314]
mov ecx, edi
push dword [ebp - 0x324]
mov edx, dword [ebp - 0x320]
call fcn.004015b0
add esp, 0x24
mov esi, eax
mov eax, dword [0x43a540]
test eax, eax
je 0x403363
call eax
push dword [ebp - 0x320]
call fcn.00405f08
add esp, 4
test edi, edi
je 0x403386
push dword [ebx + edi*4 - 4]
dec edi
call fcn.00405f08
add esp, 4
test edi, edi
jne 0x403375
push ebx
call fcn.00405f08
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405ef7
mov esp, ebp
pop ebp
ret
mov eax, ecx
test ecx, 0xf800
jne 0x407b20
shr eax, 6
and cl, 0x3f
or al, 0xc0
mov byte [edx], al
inc edx
or cl, 0x80
mov byte [edx], cl
jmp 0x402ff3
mov dword [ebp - 0x31c], eax
and eax, 0xfffff800
cmp eax, 0xd800
je 0x407b59
mov ax, cx
shr ax, 0xc
or al, 0xe0
mov byte [edx], al
mov eax, ecx
shr eax, 6
and cl, 0x3f
and al, 0x3f
or al, 0x80
mov byte [edx + 1], al
add edx, 2
or cl, 0x80
mov byte [edx], cl
jmp 0x402ff3
mov eax, dword [ebp - 0x31c]
and eax, 0xfffffc00
cmp eax, 0xd800
jne 0x407bd3
add esi, 2
cmp esi, ebx
je 0x407be3
movzx eax, word [esi]
mov dword [ebp - 0x31c], eax
and eax, 0xfffffc00
cmp eax, 0xdc00
jne 0x407bd1
mov eax, dword [ebp - 0x31c]
and ecx, 0x3ff
and eax, 0x3ff
add ecx, 0x40
shl ecx, 0xa
add ecx, eax
mov eax, ecx
shr eax, 0x12
or al, 0xf0
mov byte [edx], al
mov eax, ecx
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [edx + 1], al
mov eax, ecx
shr eax, 6
and cl, 0x3f
and al, 0x3f
or al, 0x80
mov byte [edx + 2], al
add edx, 3
or cl, 0x80
mov byte [edx], cl
jmp 0x402ff3
mov esi, edi
mov word [edx], 0xbfef
add edx, 2
mov byte [edx], 0xbd
jmp 0x402ff3
mov word [edx], 0xbfef
mov byte [edx + 2], 0xbd
add edx, 3
jmp 0x402ffb
mov dword [ebx], 0
mov eax, 0x7f
jmp 0x403391
mov edx, esi
mov ecx, edi
call fcn.00409804
mov eax, 0x7f
jmp 0x403391
inc eax
push str.contentproc
cmp byte [eax], 0x2d
cmovne eax, edx
inc eax
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x407c4f
jmp 0x4030d5
inc eax
push str.contentproc
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x4030d5
call sym.firefox.exe_IsSandboxedProcess
test al, al
je 0x407c70
call fcn.00421621
test eax, eax
jne 0x407c70
push str.Failed_to_initialize_the_sandbox_target_services.
call fcn.00409994
add esp, 4
jmp 0x407c9c
xor edx, edx
call fcn.00409841
test eax, eax
js 0x407c9c
mov edx, esi
mov ecx, edi
call fcn.00409ad5
jmp 0x403356
push str.Could_not_find_the_Mozilla_runtime._n
call fcn.00409994
add esp, 4
mov edi, dword [ebp - 0x314]
mov esi, 0xff
jmp 0x403363
mov esi, 0x80040111
jmp 0x407cb2
call fcn.004216af
push str.Couldnt_load_XPCOM._n
call fcn.00409994
jmp 0x4032ff
mov eax, 0x80460003
mov dword [ebp - 0x318], eax
jmp 0x403237
push str.Couldnt_load_XRE_functions._n
call fcn.00409994
jmp 0x4032ff
mov esi, 0xc1f30001
jmp 0x4032ed
push str.Couldnt_find_the_application_directory._n
call fcn.00409994
add esp, 4
jmp 0x407c9c