Function at 0x42f598
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor edi, edi
test byte [ebp + 0x10], 1
push 0x40
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
pop ebx
je 0x42f6b3
push ebx
lea eax, [ebp - 4]
push eax
mov dword [ebp - 8], ebx
call fcn.0042dc6e
mov esi, eax
cmp esi, edi
jl 0x42f7d5
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 4]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x42f60f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x42f5f9
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x42f604
mov esi, 0x80004005
push esi
push 0xf2
jmp 0x42f793
cmp dword [ebp - 8], eax
jae 0x42f679
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
call fcn.0042dc6e
mov esi, eax
test esi, esi
js 0x42f7d5
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x42f664
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x42f64e
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x42f659
mov esi, 0x80004005
push esi
push 0xfd
jmp 0x42f793
cmp dword [ebp - 8], eax
jae 0x42f679
mov esi, 0x8007007a
push esi
push 0x102
jmp 0x42f793
cmp eax, 0x104
jbe 0x42f6b3
lea eax, [ebp - 4]
push eax
call fcn.0042f457
mov esi, eax
cmp esi, 0x80070057
jne 0x42f695
xor esi, esi
test esi, esi
js 0x42f7d5
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
call fcn.0042dd24
mov esi, eax
test esi, esi
js 0x42f7d5
test byte [ebp + 0x10], 2
mov eax, dword [ebp - 4]
je 0x42f7b7
and dword [ebp - 0x10], 0
test eax, eax
jne 0x42f6cb
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
cmp dword [ebp - 8], ebx
jbe 0x42f6d6
mov ebx, dword [ebp - 8]
push ebx
lea eax, [ebp - 0xc]
push eax
call fcn.0042dc6e
mov esi, eax
test esi, esi
js 0x42f7d5
mov edi, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push ebx
push dword [ebp + 0x10]
call edi
test eax, eax
jne 0x42f728
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x42f715
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x42f720
mov esi, 0x80004005
push esi
push 0x123
jmp 0x42f793
cmp ebx, eax
jae 0x42f79f
mov ebx, eax
cmp eax, 0x104
jb 0x42f738
lea ebx, [eax + 7]
push ebx
lea eax, [ebp - 0xc]
push eax
call fcn.0042dc6e
mov esi, eax
test esi, esi
js 0x42f7d5
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0xc]
push ebx
push dword [ebp + 0x10]
call edi
test eax, eax
jne 0x42f784
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x42f771
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
js 0x42f77c
mov esi, 0x80004005
push esi
push 0x12e
jmp 0x42f793
cmp ebx, eax
jae 0x42f79f
mov esi, 0x8007007a
push esi
push 0x133
push str.pathutil.cpp
call fcn.0042fdc3
jmp 0x42f7d5
cmp eax, 0x104
jbe 0x42f7be
lea eax, [ebp - 0xc]
push eax
call fcn.0042f457
mov esi, eax
test esi, esi
js 0x42f7d5
jmp 0x42f7be
and dword [ebp - 4], 0
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x42f7c8
mov eax, dword [ebp + 0xc]
push 0
push eax
push dword [ebp + 8]
call fcn.0042ecb2
mov esi, eax
cmp dword [ebp - 0xc], 0
je 0x42f7e3
push dword [ebp - 0xc]
call fcn.0042dd7e
cmp dword [ebp - 4], 0
je 0x42f7f1
push dword [ebp - 4]
call fcn.0042dd7e
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc