Function at 0x40b650
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x48
mov edi, edx
mov ebx, ecx
mov eax, dword [0x450010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push str.MOZ_DISABLE_NONLOCAL_CONNECTIONS
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x40b682
cmp byte [eax], 0
jne 0x40ba49
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
je 0x40b69f
cmp byte [eax], 0
setne al
mov dword [ebp - 0x34], eax
jmp 0x40b6a6
mov dword [ebp - 0x34], 0
sub esp, 0x1c
movaps xmm0, xmmword [0x4452d0]
movups xmmword [esp + 4], xmm0
mov dword [esp], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov edi, eax
inc edi
cmp edi, 1
ja 0x40b772
cmp byte [ebp - 0x34], 0
je 0x40ba2b
mov eax, 0x70
mov dword [ebx], eax
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movups xmmword [eax + 0x10], xmm0
movups xmmword [eax + 0x20], xmm0
movups xmmword [eax + 0x30], xmm0
movups xmmword [eax + 0x40], xmm0
movups xmmword [eax + 0x50], xmm0
movups xmmword [eax + 0x60], xmm0
mov ecx, dword [ebx + 4]
mov dword [ebx + 4], eax
test ecx, ecx
je 0x40b72c
push ecx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, dword [ebx + 4]
movaps xmm0, xmmword [0x4452e0]
movups xmmword [eax], xmm0
xor ecx, ecx
mov dword [eax + 0x10], ecx
mov edx, dword [ebx + 4]
movups xmm0, xmmword [0x445408]
movups xmmword [edx + 0x60], xmm0
movups xmm0, xmmword [0x4453f8]
movups xmmword [edx + 0x50], xmm0
movups xmm0, xmmword [0x4453e8]
movups xmmword [edx + 0x40], xmm0
movups xmm0, xmmword [0x4453d8]
movups xmmword [edx + 0x30], xmm0
mov dword [eax + 0x18], ecx
jmp 0x40ba2b
xor eax, eax
mov edx, esi
lea esi, [ebp - 0x14]
mov dword [esi], eax
lea ecx, [ebp - 0x20]
push eax
push esi
push 0xc
push ecx
mov dword [ebp - 0x4c], edx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b8eb
cmp dword [ebp - 0x14], 0xc
jne 0x40ba28
cmp dword [ebp - 0x20], 0x4646424c
jne 0x40ba28
cmp dword [ebp - 0x1c], 1
jne 0x40ba28
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0x18]
lea eax, [ebx + 0x58]
cmp byte [ebp - 0x34], 0
mov dword [ebp - 0x50], eax
cmovne ebx, eax
push ebx
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x40], ebx
push ebx
push ecx
mov ebx, eax
push eax
call sub.ntdll.dll_memset
add esp, 0xc
xor eax, eax
push eax
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x38], ebx
push ebx
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b981
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x18]
jne 0x40b981
mov dword [ebp - 0x24], 0x4453d8
mov dword [ebp - 0x28], 0x400040
test ecx, ecx
je 0x40b9cd
mov eax, dword [ebp - 0x40]
add eax, 0xffffffc0
mov dword [ebp - 0x48], eax
xor esi, esi
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x38]
lea ebx, [eax + esi]
movzx eax, word [eax + esi]
test eax, eax
je 0x40b989
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebx + 4]
lea edx, [ecx + eax]
cmp edx, dword [ebp - 0x18]
ja 0x40b9c8
mov word [ebx + 2], ax
test byte [ebp - 0x44], 1
sete dl
and dl, byte [ebp - 0x34]
cmp dl, 1
jne 0x40b8cf
add ecx, dword [ebp - 0x38]
mov dword [ebp - 0x2c], ecx
mov word [ebp - 0x30], ax
mov word [ebp - 0x2e], ax
push 1
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
call sub.ntdll.dll_RtlCompareUnicodeString
test eax, eax
jle 0x40b8d4
lea ecx, [ebx + 0x18]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x18]
sub eax, esi
push eax
push ebx
push ecx
call sub.ntdll.dll_memmove
add esp, 0xc
mov dword [ebx], 0x400040
mov eax, dword [ebp - 0x48]
mov dword [ebx + 4], eax
xor eax, eax
dec eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], 0
add esi, 0x18
mov al, 1
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
jmp 0x40b8d7
mov ecx, dword [ebp - 0x3c]
jmp 0x40b8db
mov ecx, dword [ebp - 0x3c]
add dword [ebx + 4], 0x18
add esi, 0x18
cmp esi, ecx
jb 0x40b835
jmp 0x40b9cd
cmp byte [ebp - 0x34], 0
je 0x40ba28
mov eax, 0x70
mov dword [ebx], eax
push eax
call dword [sym.imp.mozglue.dll_moz_xmalloc]
add esp, 4
xorps xmm0, xmm0
movups xmmword [eax], xmm0
movups xmmword [eax + 0x10], xmm0
movups xmmword [eax + 0x20], xmm0
movups xmmword [eax + 0x30], xmm0
movups xmmword [eax + 0x40], xmm0
movups xmmword [eax + 0x50], xmm0
movups xmmword [eax + 0x60], xmm0
mov ecx, dword [ebx + 4]
mov dword [ebx + 4], eax
test ecx, ecx
je 0x40b93b
push ecx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov eax, dword [ebx + 4]
movaps xmm0, xmmword [0x4452e0]
movups xmmword [eax], xmm0
xor ecx, ecx
mov dword [eax + 0x10], ecx
mov edx, dword [ebx + 4]
movups xmm0, xmmword [0x445408]
movups xmmword [edx + 0x60], xmm0
movups xmm0, xmmword [0x4453f8]
movups xmmword [edx + 0x50], xmm0
movups xmm0, xmmword [0x4453e8]
movups xmmword [edx + 0x40], xmm0
movups xmm0, xmmword [0x4453d8]
movups xmmword [edx + 0x30], xmm0
mov dword [eax + 0x18], ecx
jmp 0x40ba28
push dword [ebp - 0x38]
jmp 0x40ba1f
test byte [ebp - 0x44], 1
sete al
and al, byte [ebp - 0x34]
cmp al, 1
jne 0x40b9cd
lea eax, [ebx + 0x18]
mov ecx, dword [ebp - 0x18]
sub ecx, esi
push ecx
push ebx
push eax
call sub.ntdll.dll_memmove
add esp, 0xc
mov dword [ebx], 0x400040
mov eax, dword [ebp - 0x48]
mov dword [ebx + 4], eax
xor eax, eax
dec eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], 0
jmp 0x40b9cd
mov word [ebx], 0
cmp byte [ebp - 0x34], 0
je 0x40ba09
movups xmm0, xmmword [0x445408]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x38]
movups xmmword [ecx + eax - 0x10], xmm0
movups xmm0, xmmword [0x4453f8]
movups xmmword [ecx + eax - 0x20], xmm0
movups xmm0, xmmword [0x4453e8]
movups xmmword [ecx + eax - 0x30], xmm0
movups xmm0, xmmword [0x4453d8]
movups xmmword [ecx + eax - 0x40], xmm0
mov ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x40]
mov dword [ecx], eax
mov eax, dword [ecx + 4]
mov edx, dword [ebp - 0x38]
mov dword [ecx + 4], edx
test eax, eax
je 0x40ba28
push eax
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [ebp - 0x4c]
cmp edi, 2
jb 0x40ba37
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004230e0
add esp, 0x48
pop esi
pop edi
pop ebx
pop ebp
ret
mov al, 1
jmp 0x40b69a