Function at 0x4084b0
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 [0x43700c]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor eax, eax
push eax
push eax
push 0x432bb8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40855e
mov edi, eax
xor ecx, ecx
dec ecx
add eax, edi
cmovb eax, ecx
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
mov esi, edi
dec esi
push edi
push eax
push 0x432bb8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
jne 0x408551
xor eax, eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x408551
mov edi, eax
add eax, edi
mov ecx, 0xffffffff
cmovb eax, ecx
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 0x408547
push esi
push 0x432bb8
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 0x432d5a
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [ebx + 1]
xor ecx, ecx
dec ecx
mov edx, 4
mul edx
mov esi, eax
cmovo esi, ecx
push esi
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
test ebx, ebx
mov dword [ebp - 0x24], eax
jle 0x408614
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 0x408595
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 0x408627
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
push 1
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
test ebx, ebx
jle 0x408734
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
mov esi, dword [ebp - 0x24]
jne 0x408740
lea eax, [ebx - 1]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + ebx*4 - 4]
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 - 0x2c]
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 0x40875b
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 - 0x20]
call ebx
shr eax, 0x1f
mov dword [ebp - 0x20], eax
mov ecx, esi
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x4086ee
mov eax, dword [esi]
mov ebx, dword [eax + 4]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, esi
call ebx
mov ecx, dword [ebp - 0x24]
mov ebx, dword [ebp + 8]
push ecx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
test ebx, ebx
je 0x408715
mov esi, dword [sym.imp.mozglue.dll_free]
mov eax, dword [edi + ebx*4 - 4]
dec ebx
test eax, eax
je 0x408711
push eax
call esi
add esp, 4
test ebx, ebx
jne 0x408702
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a740
mov eax, dword [ebp - 0x20]
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x20], 3
mov ecx, dword [ebp - 0x24]
jmp 0x4086d0
call fcn.0042dc80
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x408768
mov dword [ebp - 0x18], 0x42e990
mov ebx, dword [ebp + 8]
jmp 0x40866b
call fcn.0040c7e0
mov dword [ebp - 0x14], eax
jmp 0x4086a9
xor eax, eax
inc eax
jmp 0x4086c8