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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r14
lea rbp, [rsp - 0x105a0]
mov eax, 0x106a0
call fcn.140006eb0
sub rsp, rax
mov rax, qword [0x140036018]
xor rax, rsp
mov qword [rbp + 0x10590], rax
movzx r8d, byte [rcx]
xor ebx, ebx
mov r9, rcx
mov rdx, rcx
mov edi, ebx
test r8b, r8b
je 0x1400071da
nop word [rax + rax]
lea rcx, [0x14002c8ac]
mov al, 0x2f
cmp al, r8b
je 0x14000164f
movzx eax, byte [rcx + 1]
inc rcx
test al, al
jne 0x140001369
movzx r8d, byte [rdx + 1]
inc rdx
test r8b, r8b
jne 0x140001360
test rdi, rdi
je 0x1400071da
sub rdi, r9
cmp rdi, 0xf0
ja 0x1400071d0
mov r8, rdi
lea rcx, [rsp + 0x50]
mov rdx, r9
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [0x14002d8a0]
mov eax, dword [0x14002d8b0]
lea r14, [rsp + 0x51]
add r14, rdi
movups xmmword [rsp + rdi + 0x50], xmm0
mov dword [rsp + rdi + 0x60], eax
lea rcx, str.MOZ_RUN_GTEST
mov qword [rsp + 0x106d0], r15
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
jne 0x140007207
lea rax, [rbp + 0x380]
mov dword [rsp + 0x28], 0x104
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x50]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rdx, [0x14002c8b0]
lea rcx, [rbp + 0x380]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov r15, rax
test rax, rax
je 0x14000723a
mov r8, rax
mov qword [rsp + 0x106c8], rsi
mov edx, 0x104
mov byte [r14], bl
lea rcx, [rbp + 0x60]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
je 0x140001611
nop
lea rax, [rbp + 0x60]
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rax + rcx], bl
jne 0x140001468
test ecx, ecx
je 0x1400015f6
cmp byte [rbp + 0x60], 0x23
je 0x1400015f6
lea eax, [rcx - 1]
movsxd rdx, eax
cmp byte [rbp + rdx + 0x60], 0xa
jne 0x1400014a0
cmp rdx, 0x104
jae 0x140001657
mov byte [rbp + rdx + 0x60], bl
movsxd rax, ecx
lea rcx, [rsp + 0x50]
sub rax, rcx
add rax, r14
cmp rax, 0x104
ja 0x14000727c
lea rax, [rbp + 0x60]
mov rdx, r14
sub rdx, rax
lea rcx, [rbp + 0x60]
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400014d0
lea rax, [rbp + 0x170]
mov dword [rsp + 0x28], 0x104
or r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x50]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x8000000
lea rcx, [rbp + 0x170]
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400015b8
mov r9d, 1
lea r8, [rsp + 0x48]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400015af
mov rdi, rbx
nop dword [rax]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, 0x10000
lea rdx, [rbp + 0x590]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000159b
cmp dword [rsp + 0x40], 0x10000
jne 0x14000159b
add rdi, 0x10000
cmp rdi, 0xffffffffffffffff
jb 0x140001560
mov rdx, qword [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea rcx, [rbp + 0x170]
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
test rax, rax
je 0x140007244
mov ecx, 0x10
call fcn.140005f80
mov rcx, qword [0x140038258]
mov qword [0x140038258], rax
mov qword [rax + 8], rcx
mov qword [rax], rdi
mov r8, r15
lea rcx, [rbp + 0x60]
mov edx, 0x104
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
test rax, rax
jne 0x140001460
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
mov rsi, qword [rsp + 0x106c8]
mov r15, qword [rsp + 0x106d0]
mov rcx, qword [rbp + 0x10590]
xor rcx, rsp
call fcn.140005c90
mov rbx, qword [rsp + 0x106d8]
add rsp, 0x106a0
pop r14
pop rdi
pop rbp
ret
mov rdi, rdx
jmp 0x140001372
call fcn.1400063e8
int3
mov eax, 0x80004005
jmp 0x14000162c
movzx eax, word [0x14002f470]
lea r14, [rsp + 0x50]
movups xmm0, xmmword [str.dependentlibs.list]
mov word [rsp + 0x60], ax
movzx eax, byte [0x14002f472]
mov byte [rsp + 0x62], al
movaps xmmword [rsp + 0x50], xmm0
jmp 0x1400013d1
lea rcx, [rsp + 0x50]
dec rcx
cmp byte [rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x14000720f
mov eax, dword [str..gtest]
mov dword [rcx], eax
movzx eax, word [0x14002f478]
mov word [rcx + 4], ax
movzx eax, byte [0x14002f47a]
mov byte [rcx + 6], al
jmp 0x1400013ef
mov eax, 0x80004005
jmp 0x140001624
mov rax, qword [0x140038258]
test rax, rax
je 0x14000727c
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, qword [0x140038258]
mov rax, qword [rcx + 8]
mov qword [0x140038258], rax
call fcn.140005f78
mov rax, qword [0x140038258]
test rax, rax
jne 0x140007250
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, 0x80004005
jmp 0x14000161c