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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [0x43500c]
mov edi, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
push 0
push 0x431ae0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4010b0
mov ebx, eax
mov ecx, 0xffffffff
add eax, ebx
cmovae ecx, eax
push ecx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov esi, ebx
mov edi, eax
dec esi
push ebx
push eax
push 0x431ae0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
jne 0x4010a3
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4010a3
mov ebx, eax
mov ecx, 0xffffffff
add eax, ebx
cmovae ecx, eax
push ecx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov esi, eax
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x401099
push esi
push 0x431ae0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov edi, dword [ebp + 8]
push 0x431c7e
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [edi + 1]
mov ecx, 4
mov ebx, 0xffffffff
mul ecx
cmovno ebx, eax
push ebx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov esi, eax
test edi, edi
jle 0x40116e
mov dword [ebp - 0x1c], esi
xor esi, esi
mov dword [ebp - 0x20], ebx
nop dword [eax]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x18], 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 + 2]
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
lea eax, [ebx + ebx*2 + 1]
push 0
push 0
push eax
push edi
push ebx
push dword [ebp - 0x18]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x1c]
mov byte [edi + eax], 0
mov dword [ecx + esi*4], edi
mov edi, dword [ebp + 8]
inc esi
cmp edi, esi
jne 0x4010f0
mov esi, dword [ebp - 0x1c]
mov dword [esi + edi*4], 0
push dword [ebp - 0x20]
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
lea eax, [edi*4]
push eax
push esi
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x401181
mov dword [esi + edi*4], 0
push ebx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
call sub.xul.dll_XRE_GetBootstrap
add esp, 4
cmp dword [ebp - 0x14], 0
jne 0x4011f4
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 2
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
test edi, edi
je 0x4011d5
mov esi, dword [sym.imp.mozglue.dll_free]
jmp 0x4011c4
test edi, edi
je 0x4011d5
mov eax, dword [ebx + edi*4 - 4]
dec edi
test eax, eax
je 0x4011c0
push eax
call esi
add esp, 4
jmp 0x4011c0
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042da80
mov eax, dword [ebp - 0x18]
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
push 1
call dword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
add esp, 4
mov ecx, dword [ebp - 0x14]
mov edx, edi
push esi
call fcn.00401230
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
test ecx, ecx
je 0x4011a8
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4011a8