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 [0x448010]
mov ebx, dword [ebp + 0xc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
push 0
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4010a8
mov edi, eax
add eax, edi
jb 0x4011f9
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, edi
mov esi, eax
dec ebx
push edi
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp ebx, eax
jne 0x40109b
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40109b
mov edi, eax
add eax, edi
jb 0x401203
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x401091
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ebx, dword [ebp + 0xc]
push 0x4431ba
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [ebp + 8]
lea ecx, [ebp - 0x18]
push 0x43e160
push ebx
push eax
push ecx
call fcn.00403c00
add esp, 0x10
cmp byte [ebp - 0x14], 0
jne 0x4011f4
mov eax, dword [ebp + 8]
mov ecx, 4
inc eax
mul ecx
jo 0x40120d
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
mov eax, dword [ebp + 8]
test eax, eax
jle 0x401152
xor esi, esi
mov dword [ebp - 0x20], edi
nop dword [eax]
mov eax, dword [ebx + esi*4]
mov dword [ebp - 0x1c], eax
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
add esp, 4
mov edi, eax
lea eax, [eax + eax*2 + 2]
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ebx, eax
lea eax, [edi + edi*2 + 1]
push 0
push 0
push eax
push ebx
push edi
mov edi, dword [ebp - 0x20]
push dword [ebp - 0x1c]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [ebx + eax], 0
mov eax, dword [ebp + 8]
mov dword [edi + esi*4], ebx
mov ebx, dword [ebp + 0xc]
inc esi
cmp esi, eax
jl 0x401100
mov dword [edi + eax*4], 0
inc eax
mov ecx, 4
mov esi, edi
mul ecx
jo 0x401217
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov edi, eax
mov eax, dword [ebp + 8]
test eax, eax
jle 0x40118a
shl eax, 2
push eax
push esi
push edi
call sub.ntdll.dll_memcpy
add esp, 0xc
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov ecx, dword [ebp + 8]
mov edx, esi
push dword [eax]
call fcn.00401230
add esp, 4
mov dword [ebp - 0x1c], eax
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [ebp + 8]
test esi, esi
je 0x4011d3
mov ebx, dword [sym.imp.mozglue.dll_free]
nop dword [eax]
mov eax, dword [edi + esi*4 - 4]
dec esi
test eax, eax
je 0x4011cf
push eax
call ebx
add esp, 4
test esi, esi
jne 0x4011c0
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043c380
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [ebp - 0x18]
jmp 0x4011e0
mov eax, 0xffffffff
jmp 0x401033
mov eax, 0xffffffff
jmp 0x40106c
mov eax, 0xffffffff
jmp 0x4010e4
mov eax, 0xffffffff
jmp 0x401169