Function at 0x414de0
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov ebx, dword [ebp + 8]
mov eax, dword [0x438014]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
push eax
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x414e8e
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
jne 0x414e81
xor eax, eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
dec eax
cmp eax, 0x7ffe
ja 0x414e81
mov eax, edi
add eax, edi
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov esi, eax
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x414e77
push esi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ebx, dword [ebp + 8]
push 0x433db0
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [ebx + 1]
xor ecx, ecx
dec ecx
cmp eax, 0x40000000
lea esi, [ebx*4 + 4]
cmovae esi, ecx
push esi
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
test ebx, ebx
mov dword [ebp - 0x24], eax
jle 0x414f47
mov dword [ebp - 0x20], esi
xor esi, esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x28], 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 [ebp + 8]
push dword [ebp - 0x28]
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [edi + eax], 0
mov eax, dword [ebp - 0x24]
mov dword [eax + esi*4], edi
inc esi
cmp ebx, esi
jne 0x414ec8
mov esi, dword [ebp - 0x24]
mov dword [esi + ebx*4], 0
push dword [ebp - 0x20]
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
lea eax, [ebx*4]
push eax
push esi
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x414f5a
mov dword [eax + ebx*4], 0
push esi
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
lea esi, [ebp - 0x1c]
mov dword [esi], 0
push esi
call sub.xul.dll_XRE_GetBootstrap
add esp, 4
mov eax, dword [esi]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + ebx*4 - 4]
mov dword [ebp - 0x20], eax
push eax
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 eax, dword [sym.imp.mozglue.dll_enum_GeckoProcessType_mozilla::startup::sChildProcessType]
mov eax, dword [eax]
lea ecx, [eax - 4]
cmp ecx, 7
ja 0x414fa3
mov eax, dword [eax*4 + 0x4310bc]
jmp 0x414fa6
xor eax, eax
inc eax
push eax
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
test ebx, ebx
jle 0x415094
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
cmp dword [sym.plugin_container.exe_g_shared_section], eax
jne 0x41509d
lea eax, [ebx - 1]
mov dword [ebp - 0x2c], eax
mov esi, dword [ebp - 0x28]
mov eax, dword [esi]
mov ebx, dword [eax + 0x28]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
push dword [ebp - 0x20]
call ebx
mov eax, dword [esi]
mov ebx, dword [eax + 0x24]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
cmp eax, 9
je 0x4150b5
mov eax, dword [esi]
mov ebx, dword [eax + 0x2c]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
lea eax, [ebp - 0x1c]
push eax
mov esi, dword [ebp - 0x24]
push esi
push dword [ebp - 0x2c]
call ebx
shr eax, 0x1f
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp + 8]
call dword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::UnregisterRuntimeExceptionModule_void_]
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x41504c
mov eax, dword [esi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
mov ebx, dword [ebp + 8]
push dword [ebp - 0x24]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
test ebx, ebx
je 0x415075
mov esi, dword [sym.imp.mozglue.dll_free]
mov eax, dword [edi + ebx*4 - 4]
dec ebx
test eax, eax
je 0x415071
push eax
call esi
add esp, 4
test ebx, ebx
jne 0x415062
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00417da0
mov eax, dword [ebp - 0x20]
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x20], 3
jmp 0x41502b
call fcn.0042fed0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4150c2
mov dword [ebp - 0x18], 0x41c410
jmp 0x414fcf
call fcn.0041a5b0
mov dword [ebp - 0x14], eax
jmp 0x415006
xor eax, eax
inc eax
jmp 0x415025