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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10638
call fcn.00406c60
mov eax, dword [0x43a008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
xor edi, edi
mov esi, ebx
mov dl, byte [ebx]
test dl, dl
je 0x4083fa
nop word [eax + eax]
mov ecx, 0x422980
mov al, 0x2f
cmp al, dl
je 0x404667
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x404387
mov dl, byte [esi + 1]
inc esi
test dl, dl
jne 0x404380
test edi, edi
je 0x4083fa
sub edi, ebx
cmp edi, 0xf0
ja 0x404673
push edi
lea eax, [ebp - 0x108]
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [0x422ef8]
mov eax, dword [0x422f08]
lea ebx, [ebp - 0x107]
add esp, 0xc
add ebx, edi
movups xmmword [ebp + edi - 0x108], xmm0
mov dword [ebp + edi - 0xf8], eax
push str.MOZ_RUN_GTEST
mov dword [ebp - 0x10620], ebx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
jne 0x40842b
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x61c]
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0xfde9
call esi
lea eax, [ebp - 0x61c]
push 0x42299c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov edi, eax
add esp, 8
mov dword [ebp - 0x10624], edi
test edi, edi
je 0x404673
push edi
lea eax, [ebp - 0x20c]
mov byte [ebx], 0
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40462e
nop
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404480
sub ecx, edx
je 0x404610
cmp byte [ebp - 0x20c], 0x23
je 0x404610
cmp byte [ebp + ecx - 0x20d], 0xa
jne 0x4044bc
lea eax, [ecx - 1]
cmp eax, 0x104
jae 0x40466e
mov byte [ebp + eax - 0x20c], 0
lea eax, [ebp - 0x108]
sub ecx, eax
add ecx, ebx
cmp ecx, 0x104
ja 0x40844d
lea ecx, [ebp - 0x20c]
mov edx, ebx
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 0x4044e0
mov bl, byte [0x43a5fc]
lea eax, [ebp - 0x414]
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0xfde9
call esi
test bl, bl
je 0x4045cb
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 0x4045c5
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 0x4045be
xor esi, esi
push 0
lea eax, [ebp - 0x10628]
push eax
push 0x10000
lea eax, [ebp - 0x1061c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4045a7
cmp dword [ebp - 0x10628], 0x10000
jne 0x4045a7
add esi, 0x10000
cmp esi, 0xffffffff
jb 0x404570
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]
mov edi, dword [ebp - 0x10624]
push 8
push 0
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
je 0x408448
push 8
call fcn.00405f0d
mov ebx, dword [ebp - 0x10620]
add esp, 4
test eax, eax
je 0x40460a
mov ecx, dword [0x43a58c]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [0x43a58c], eax
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
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 0x404470
mov eax, dword [0x43a58c]
push str.NS_GetFrozenFunctions
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x408448
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405ef7
mov esp, ebp
pop ebp
ret
mov edi, esi
jmp 0x40438f
call fcn.004062d9
xor eax, eax
jmp 0x404656
mov ax, word [0x436078]
lea ebx, [ebp - 0x108]
movups xmm0, xmmword [str.dependentlibs.list]
mov word [ebp - 0xf8], ax
mov al, byte [0x43607a]
movups xmmword [ebp - 0x108], xmm0
mov byte [ebp - 0xf6], al
jmp 0x4043e9
lea edi, [ebp - 0x108]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408432
mov esi, str..gtest
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x404405
call fcn.004216af
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
jmp 0x404673