Function at 0x404710
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x424
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, dword [0x450010]
xor eax, ebp
mov dword [ebp - 0x10], eax
test esi, esi
je 0x404a7d
push 0x5c
push esi
call sub.VCRUNTIME140.dll_strrchr
add esp, 8
test eax, eax
je 0x404a90
mov ebx, eax
sub ebx, esi
lea edi, [ebx + 1]
lea eax, [ebx + 9]
push eax
call dword [sym.imp.mozglue.dll_malloc]
add esp, 4
mov ecx, esi
mov esi, eax
push edi
push ecx
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
mov dword [esi + ebx + 5], 0x6c6c64
mov dword [esi + ebx + 1], 0x2e6c7578
mov al, byte [esi]
test al, al
mov dword [ebp - 0x42c], esi
je 0x4049c7
mov edi, esi
xor esi, esi
mov ecx, edi
cmp al, 0x2f
cmove esi, ecx
cmp al, 0x5c
cmove esi, ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x404790
test esi, esi
je 0x4049c7
sub esi, edi
cmp esi, 0xf0
ja 0x404a67
lea eax, [ebp - 0x31c]
push esi
push edi
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
movups xmm0, xmmword [str.dependentlibs.list]
lea eax, [esi + ebp]
add eax, 0xfffffce5
movups xmmword [eax - 1], xmm0
mov dword [ebp - 0x424], eax
mov dword [eax + 0xf], 0x747369
push str.MOZ_RUN_GTEST
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
jne 0x404aa3
lea esi, [ebp - 0x218]
lea eax, [ebp - 0x31c]
push 0x104
push esi
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x449a26
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
test eax, eax
je 0x404a67
mov esi, eax
mov eax, dword [ebp - 0x424]
mov byte [eax], 0
lea ebx, [ebp - 0x420]
push esi
push 0x104
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x404947
mov edi, dword [ebp - 0x424]
lea eax, [ebp - 0x31c]
sub edi, eax
mov dword [ebp - 0x430], esi
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x404922
cmp byte [ebp - 0x420], 0x23
je 0x404922
cmp byte [eax + ebx - 1], 0xa
jne 0x4048a2
mov byte [ebp + eax - 0x421], 0
add eax, edi
cmp eax, 0x104
lea esi, [ebp - 0x218]
ja 0x4049dc
push ebx
push dword [ebp - 0x424]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
add esp, 8
push 0x104
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x31c]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp dword [ebp + 0x10], 1
je 0x40493c
push 8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
test eax, eax
je 0x404a1f
mov esi, eax
push 8
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
mov ecx, dword [0x45085c]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [0x45085c], eax
call dword [sym.imp.mozglue.dll_void___cdecl_mozilla::PollPreXULSkeletonUIEvents_void_]
mov esi, dword [ebp - 0x430]
push esi
push 0x104
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x404875
jmp 0x404947
push esi
call fcn.0040fea0
add esp, 4
jmp 0x4048e6
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, dword [0x45085c]
test eax, eax
je 0x404acd
push str.XRE_GetBootstrap
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x42c]
je 0x404ae3
mov ecx, eax
mov dword [ebp - 0x218], 0
call dword [section..00cfg]
lea eax, [ebp - 0x218]
push eax
call ecx
add esp, 4
mov byte [edi + 8], 0
mov eax, dword [ebp - 0x218]
mov dword [edi], eax
push esi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004230e0
mov eax, edi
add esp, 0x424
pop esi
pop edi
pop ebx
pop ebp
ret
movups xmm0, xmmword [0x447865]
lea eax, [ebp - 0x31c]
movups xmmword [eax], xmm0
jmp 0x4047dc
mov dword [ebp - 0x424], 0x80004005
mov dword [ebp - 0x428], 0
push dword [ebp - 0x430]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov edi, dword [ebp + 8]
mov byte [edi + 8], 1
mov eax, dword [ebp - 0x428]
mov byte [edi + 4], al
mov eax, dword [ebp - 0x424]
mov dword [edi], eax
mov esi, dword [ebp - 0x42c]
jmp 0x4049a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x424], eax
mov esi, dword [0x45085c]
mov al, 1
mov dword [ebp - 0x428], eax
test esi, esi
je 0x4049f0
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [sym.imp.mozglue.dll_free]
push dword [esi]
call edi
mov eax, dword [0x45085c]
mov esi, dword [eax + 4]
mov dword [0x45085c], esi
push eax
call ebx
add esp, 4
test esi, esi
jne 0x404a49
jmp 0x4049f0
mov dword [ebp - 0x424], 0x80004005
mov dword [ebp - 0x428], 0
jmp 0x4049ff
mov byte [edi + 8], 1
mov byte [edi + 4], 0
mov dword [edi], 0x80070057
jmp 0x4049b0
mov byte [edi + 8], 1
mov byte [edi + 4], 0
mov dword [edi], 0x80520009
jmp 0x4049b0
lea eax, [ebp - 0x31c]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov dword [ebp + eax - 0x31c], 0x6574672e
mov dword [ebp + eax - 0x319], 0x747365
jmp 0x4047ff
mov edi, dword [ebp + 8]
mov byte [edi + 8], 1
mov byte [edi + 4], 0
mov dword [edi], 0x80040111
jmp 0x404a17
mov byte [edi + 8], 1
mov byte [edi + 4], 0
mov dword [edi], 0x80040111
jmp 0x4049a6