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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10638
call fcn.004072e0
mov eax, dword [0x43e00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
mov edx, edi
mov bl, byte [edi]
test bl, bl
je 0x4073ca
nop word [eax + eax]
mov ecx, 0x426454
mov al, 0x2f
cmp al, bl
je 0x401413
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x401157
mov bl, byte [edx + 1]
inc edx
test bl, bl
jne 0x401150
test esi, esi
je 0x4073ca
sub esi, edi
cmp esi, 0xf0
ja 0x407446
push esi
lea eax, [ebp - 0x108]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [0x427170]
mov eax, dword [0x427180]
add esp, 0xc
movups xmmword [ebp + esi - 0x108], xmm0
mov dword [ebp + esi - 0xf8], eax
lea esi, [ebp + esi - 0x107]
push str.MOZ_RUN_GTEST
mov dword [ebp - 0x10624], esi
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
jne 0x4073fb
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x61c]
push 0x426458
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
mov dword [ebp - 0x10620], eax
test eax, eax
je 0x407446
push eax
lea eax, [ebp - 0x20c]
mov byte [esi], 0
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
mov edi, dword [ebp - 0x10620]
add esp, 0xc
test eax, eax
je 0x4013f6
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
nop word [eax + eax]
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401260
sub ecx, edx
je 0x4013d8
cmp byte [ebp - 0x20c], 0x23
je 0x4013d8
cmp byte [ebp + ecx - 0x20d], 0xa
jne 0x40129c
lea eax, [ecx - 1]
cmp eax, 0x104
jae 0x40141a
mov byte [ebp + eax - 0x20c], 0
lea eax, [ebp - 0x108]
sub ecx, eax
add ecx, esi
cmp ecx, 0x104
ja 0x40743c
lea ecx, [ebp - 0x20c]
mov edx, esi
mov eax, ecx
sub edx, eax
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4012c0
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x401393
push 1
lea eax, [ebp - 0x10638]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x10630], xmm0
push dword [ebp - 0x1062c]
push dword [ebp - 0x10630]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40138c
xor esi, esi
push 0
lea eax, [ebp - 0x10628]
push eax
push 0x10000
lea eax, [ebp - 0x1061c]
push eax
push edi
call ebx
test eax, eax
je 0x401375
cmp dword [ebp - 0x10628], 0x10000
jne 0x401375
add esi, 0x10000
cmp esi, 0xffffffff
jb 0x401342
push 0
push 0
push dword [ebp - 0x10634]
push dword [ebp - 0x10638]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 8
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
je 0x40741e
push 8
call fcn.004065c1
mov edi, dword [ebp - 0x10620]
add esp, 4
test eax, eax
je 0x4013d2
mov ecx, dword [0x43f2dc]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [0x43f2dc], eax
mov esi, dword [ebp - 0x10624]
push edi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x401250
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406335
mov esp, ebp
pop ebp
ret
mov esi, edx
jmp 0x40115f
call fcn.00406953
int3
mov ax, word [0x43a34c]
lea esi, [ebp - 0x108]
movups xmm0, xmmword [str.dependentlibs.list]
mov word [ebp - 0xf8], ax
mov al, byte [0x43a34e]
movups xmmword [ebp - 0x108], xmm0
mov byte [ebp - 0xf6], al
jmp 0x4011b8
lea edi, [ebp - 0x108]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x407402
mov esi, str..gtest
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x10624]
jmp 0x4011d4
call fcn.00425398
push dword [ebp - 0x10620]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, 0x80004005
jmp 0x401402
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, 0x80004005
jmp 0x401402