Function at 0x401550
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x35c
mov eax, dword [0x43e00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edx, 4
mov dword [ebp - 0x31c], esi
push edi
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004065b3
add esp, 4
mov dword [ebp - 0x318], eax
test eax, eax
je 0x4076d0
mov dword [ebp - 0x320], 0
test esi, esi
jle 0x40166c
mov edx, dword [ebp + 0xc]
mov ecx, eax
sub edx, eax
mov dword [ebp - 0x324], eax
mov dword [ebp + 0xc], edx
nop word [eax + eax]
mov esi, dword [edx + ecx]
mov edi, esi
lea ecx, [edi + 2]
nop dword [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4015d0
sub edi, ecx
sar edi, 1
lea eax, [edi*2 + 1]
add eax, edi
push eax
call fcn.004065b3
mov ecx, eax
add esp, 4
mov dword [ebp - 0x330], ecx
test ecx, ecx
je 0x4076c4
mov edx, ecx
lea ecx, [esi + edi*2]
mov dword [ebp - 0x314], ecx
cmp esi, ecx
jae 0x40162d
mov eax, ecx
movzx ecx, word [esi]
mov edi, esi
test ecx, 0xff80
jne 0x4075ca
mov byte [edx], cl
add esi, 2
inc edx
cmp esi, eax
jb 0x401612
mov ecx, dword [ebp - 0x324]
mov eax, dword [ebp - 0x330]
mov esi, dword [ebp - 0x31c]
mov byte [edx], 0
mov dword [ecx], eax
add ecx, 4
mov eax, dword [ebp - 0x320]
inc eax
mov dword [ebp - 0x324], ecx
mov dword [ebp - 0x320], eax
cmp eax, esi
jge 0x401666
mov edx, dword [ebp + 0xc]
jmp 0x4015c0
mov eax, dword [ebp - 0x318]
mov dword [eax + esi*4], 0
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004065b3
mov edi, eax
add esp, 4
mov dword [ebp - 0x324], edi
test edi, edi
je 0x4076da
test esi, esi
jle 0x4016c6
mov esi, dword [ebp - 0x318]
mov ecx, edi
mov edx, dword [ebp - 0x31c]
sub esi, edi
mov eax, dword [esi + ecx]
mov dword [ecx], eax
add ecx, 4
sub edx, 1
jne 0x4016b3
mov esi, dword [ebp - 0x31c]
push 0x426470
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 - 0x328], 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
cmp esi, 1
jle 0x401715
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + 4]
mov edx, eax
mov cl, byte [eax]
cmp cl, 0x2d
je 0x4076f1
cmp cl, 0x2f
je 0x407711
push 0
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
cmp byte [0x43e6a0], 0
jne 0x40174a
push 0x104
push 0x43e490
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4079d1
mov byte [0x43e6a0], 1
push 0x43e490
lea eax, [ebp - 0x310]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
test eax, eax
jne 0x4079d1
push eax
push eax
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 eax
call dword [sym.imp.mozglue.dll_strdup]
mov esi, eax
add esp, 4
test esi, esi
je 0x4079d1
mov edx, esi
lea ecx, [ebp - 0x320]
call fcn.00401060
mov ecx, dword [eax]
mov dword [eax], 0
mov edx, dword [0x43f330]
mov dword [0x43f330], ecx
test edx, edx
jne 0x40778b
mov edx, dword [ebp - 0x320]
mov dword [ebp - 0x320], 0
test edx, edx
jne 0x40779d
test ecx, ecx
je 0x4077af
mov eax, dword [ecx]
call dword [eax + 8]
push esi
call dword [sym.imp.mozglue.dll_free]
mov ecx, dword [0x43f330]
sub esp, 0x14
movups xmm0, xmmword [ebp - 0x35c]
mov eax, esp
mov edx, dword [ecx]
push 1
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x34c]
movq qword [eax + 0x10], xmm0
call dword [edx + 0x14]
mov ecx, dword [0x43f330]
mov eax, dword [ecx]
call dword [eax + 0x30]
mov eax, dword [ebp - 0x318]
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x31c]
push str.XUL_APP_FILE
mov dword [ebp - 0x32c], eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov esi, eax
add esp, 4
test esi, esi
jne 0x4077c8
cmp dword [ebp - 0x31c], 1
jle 0x4018b3
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + 4]
mov edx, eax
mov cl, byte [eax]
cmp cl, 0x2d
je 0x4077d6
cmp cl, 0x2f
je 0x4077f6
cmp dword [ebp - 0x31c], 1
jle 0x4018b3
mov eax, dword [ebp - 0x318]
mov eax, dword [eax + 4]
mov edx, eax
mov cl, byte [eax]
cmp cl, 0x2d
je 0x4078c1
cmp cl, 0x2f
je 0x4078e1
test esi, esi
jne 0x40795b
mov dword [ebp - str.Mozilla], 0x426488
mov dword [ebp - 0x338], str.browser
mov eax, dword fs:[0x2c]
mov esi, dword [eax]
mov eax, dword [0x43f39c]
mov dword [ebp - 0x328], esi
cmp eax, dword [esi + 4]
jle 0x401a3e
push 0x43f39c
call fcn.0040672c
add esp, 4
cmp dword [0x43f39c], 0xffffffff
jne 0x401a3e
cmp dword [sym.firefox.exe_g_shared_section], 0
jne 0x407979
mov edi, dword [0x43f2ec]
test edi, edi
jne 0x4019fa
push 0x44
call fcn.004065c1
mov esi, eax
push 0xc
mov dword [esi], 0x426500
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
call fcn.004065c1
add esp, 8
test eax, eax
je 0x401954
mov dword [eax], eax
lea ecx, [eax + 4]
test ecx, ecx
je 0x40195d
mov dword [ecx], eax
mov dword [esi + 0x2c], eax
push 0x18
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
call fcn.004065c1
add esp, 4
test eax, eax
je 0x40197e
mov dword [eax], eax
lea ecx, [eax + 4]
test ecx, ecx
je 0x401987
mov dword [ecx], eax
lea ecx, [eax + 8]
test ecx, ecx
je 0x401990
mov dword [ecx], eax
mov edx, 0x14
mov word [eax + 0xc], 0x101
mov dword [esi + 0x34], eax
push ecx
mov dword [esi + 0x3c], 0
lea ecx, [edx - 0x13]
mov dword [esi + 0x40], 0
call fcn.00405950
add esp, 4
test eax, eax
je 0x4019be
mov dword [eax], eax
lea ecx, [eax + 4]
test ecx, ecx
je 0x4019c7
mov dword [ecx], eax
lea ecx, [eax + 8]
test ecx, ecx
je 0x4019d0
mov dword [ecx], eax
mov word [eax + 0xc], 0x101
push 0x401c62
mov dword [esi + 0x3c], eax
mov dword [0x43f2ec], esi
call fcn.00406563
mov edi, dword [0x43f2ec]
add esp, 4
test edi, edi
je 0x407979
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax]
call eax
test eax, eax
jne 0x407979
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 4]
call eax
mov esi, eax
push 1
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x2c]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
push 0x43f39c
mov dword [0x43f328], edi
call fcn.004066ed
mov edi, dword [ebp - 0x324]
add esp, 4
mov ecx, dword [ebp - 0x328]
mov eax, dword [0x43f398]
mov esi, dword [0x43f328]
mov dword [ebp - 0x334], esi
cmp eax, dword [ecx + 4]
jle 0x401bae
push 0x43f398
call fcn.0040672c
add esp, 4
cmp dword [0x43f398], 0xffffffff
jne 0x401bae
push 0x2c
mov dword [0x43f300], 0x4264c4
mov dword [0x43f304], 0
mov dword [0x43f308], 0
mov dword [0x43f30c], 0
call fcn.004065c1
add esp, 4
test eax, eax
je 0x401ab3
mov dword [eax], eax
lea ecx, [eax + 4]
test ecx, ecx
je 0x401abc
mov dword [ecx], eax
push 0x40
mov dword [0x43f308], eax
mov dword [0x43f310], 0
mov dword [0x43f314], 0
mov dword [0x43f318], 0
mov dword [0x43f304], 0x3f800000
call fcn.004065c1
mov edx, dword [0x43f314]
mov esi, eax
mov eax, dword [0x43f310]
add esp, 4
sub edx, eax
mov dword [ebp - 0x328], 0
add edx, 3
mov dword [ebp - 0x320], 0
shr edx, 2
cmp eax, dword [0x43f314]
cmova edx, dword [ebp - 0x328]
test edx, edx
jne 0x407980
test eax, eax
jne 0x4079b5
lea eax, [esi + 0x40]
mov dword [0x43f310], esi
mov dword [0x43f318], eax
mov ecx, 0x43f310
mov eax, dword [0x43f308]
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x328]
push eax
push 0x10
push esi
lea eax, [ebp - 0x330]
mov dword [0x43f314], esi
push eax
call fcn.00401470
push 0x407395
mov dword [0x43f31c], 7
mov dword [0x43f320], 8
mov dword [0x43f324], 0
call fcn.0040659e
push 0x43f398
call fcn.004066ed
mov esi, dword [ebp - 0x334]
add esp, 8
test esi, esi
je 0x40781e
mov ecx, dword [0x43f330]
lea edx, [ebp - 0x344]
push edx
push dword [ebp - 0x314]
mov dword [ebp - 0x344], esi
push dword [ebp - 0x32c]
mov dword [ebp - 0x340], 0x43f300
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
call eax
mov esi, eax
mov dword [ebp - 0x314], eax
mov ecx, dword [0x43f330]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [0x43f330]
mov dword [0x43f330], 0
test ecx, ecx
je 0x401c12
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x318]
call fcn.00406346
add esp, 4
cmp dword [ebp - 0x31c], 0
je 0x401c47
mov esi, dword [ebp - 0x31c]
nop
push dword [edi + esi*4 - 4]
dec esi
call fcn.00406346
add esp, 4
test esi, esi
jne 0x401c30
mov esi, dword [ebp - 0x314]
push edi
call fcn.00406346
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00406335
mov esp, ebp
pop ebp
ret
mov eax, ecx
test ecx, 0xf800
jne 0x4075e9
shr eax, 6
and cl, 0x3f
or al, 0xc0
mov byte [edx], al
inc edx
or cl, 0x80
mov byte [edx], cl
jmp 0x4076a8
mov dword [ebp - 0x32c], eax
and eax, 0xfffff800
cmp eax, 0xd800
je 0x407622
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 0x4076a8
mov eax, dword [ebp - 0x32c]
and eax, 0xfffffc00
cmp eax, 0xd800
jne 0x40769d
add esi, 2
cmp esi, dword [ebp - 0x314]
je 0x4076b3
movzx eax, word [esi]
mov dword [ebp - 0x32c], eax
and eax, 0xfffffc00
cmp eax, 0xdc00
jne 0x40769b
mov eax, dword [ebp - 0x32c]
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 0x4076a8
mov esi, edi
mov word [edx], 0xbfef
add edx, 2
mov byte [edx], 0xbd
mov eax, dword [ebp - 0x314]
jmp 0x401625
mov word [edx], 0xbfef
mov byte [edx + 2], 0xbd
add edx, 3
jmp 0x40162d
mov eax, dword [ebp - 0x324]
mov dword [eax], 0
mov eax, 0x7f
jmp 0x401c52
mov edx, dword [ebp - 0x318]
mov ecx, esi
call fcn.0040aa69
mov eax, 0x7f
jmp 0x401c52
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 0x407729
jmp 0x401715
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 0x401715
push 1
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
call sym.firefox.exe_IsSandboxedProcess
test al, al
je 0x407750
call fcn.004252e9
test eax, eax
jne 0x407750
push str.Failed_to_initialize_the_sandbox_target_services.
jmp 0x4079d6
call fcn.0040ab68
test eax, eax
js 0x4079de
push dword [ebp - 0x318]
mov ecx, dword [0x43f330]
mov edx, esi
call fcn.0040ad1e
mov ecx, dword [0x43f330]
mov esi, eax
add esp, 4
mov dword [ebp - 0x314], esi
mov eax, dword [ecx]
call dword [eax + 0xc]
jmp 0x401c12
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 4]
mov ecx, dword [0x43f330]
jmp 0x4017d3
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 4]
mov ecx, dword [0x43f330]
jmp 0x4017eb
push str.Couldnt_load_XPCOM._n
call fcn.0040abdd
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 8
jmp 0x4079de
cmp byte [esi], 0
jne 0x40188b
jmp 0x401863
inc eax
push 0x426cb4
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 0x40780e
jmp 0x40188b
inc eax
push 0x426cb4
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x40188b
cmp dword [ebp - 0x31c], 2
jne 0x40783b
push str.Incorrect_number_of_arguments_passed_to__app
jmp 0x407823
push str.Couldnt_initialize_the_broker_services._n
call fcn.0040abdd
mov esi, 0xff
add esp, 4
mov dword [ebp - 0x314], esi
jmp 0x401bee
mov eax, dword [ebp - 0x318]
add eax, 8
mov dword [ebp - 0x314], eax
mov esi, dword [eax]
lea eax, [ebp - 0x108]
push esi
push str.XUL_APP_FILE_s
push eax
call fcn.0040aa19
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.mozglue.dll_strdup]
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__putenv]
add esp, 0x14
test eax, eax
je 0x40789d
lea eax, [ebp - 0x108]
push eax
push str.Couldnt_set__s._n
call fcn.0040abdd
mov esi, 0xff
add esp, 8
mov dword [ebp - 0x314], esi
jmp 0x401bee
mov eax, dword [ebp - 0x318]
mov ecx, dword [ebp - 0x314]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebp - 0x31c]
add eax, 0xfffffffe
mov dword [ebp - 0x32c], eax
jmp 0x4018b3
inc eax
push str.xpcshell
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 0x4078f9
jmp 0x4018b3
inc eax
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
jne 0x4018b3
mov eax, dword [ebp - 0x31c]
cmp eax, 1
jle 0x40791b
mov edx, dword [ebp - 0x318]
lea ecx, [eax - 1]
lea esi, [edx + 8]
lea edi, [edx + 4]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x324]
call fcn.004252a6
mov ecx, dword [0x43f330]
mov dword [ebp - 0x330], eax
lea eax, [ebp - 0x330]
push eax
push dword [ebp - 0x328]
mov edx, dword [ecx]
push dword [ebp - 0x318]
mov eax, dword [ebp - 0x31c]
dec eax
push eax
mov eax, dword [edx + 0x20]
call eax
mov esi, eax
mov dword [ebp - 0x314], esi
jmp 0x401bee
cmp byte [esi], 0
je 0x4018bb
mov dword [ebp - 0x33c], 0
mov dword [ebp - 0x338], esi
jmp 0x4018cf
xor edi, edi
jmp 0x401a25
mov edi, eax
mov ecx, esi
xor eax, eax
test ecx, ecx
je 0x407994
mov eax, dword [edi]
mov dword [ecx], eax
mov eax, dword [ebp - 0x320]
inc eax
add ecx, 4
add edi, 4
mov dword [ebp - 0x320], eax
cmp eax, edx
jne 0x407986
mov eax, dword [0x43f310]
mov edi, dword [ebp - 0x324]
jmp 0x401b31
mov edx, dword [0x43f318]
mov ecx, eax
sub edx, eax
push 4
sar edx, 2
call fcn.00405910
add esp, 4
jmp 0x401b39
push str.Couldnt_find_the_application_directory._n
call fcn.0040abdd
add esp, 4
mov esi, 0xff
mov dword [ebp - 0x314], esi
jmp 0x401c12