Function at 0x407d20
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0xc220
call sym.__alloca
mov edi, dword [ebp + 0x14]
mov eax, dword [0x418754]
push 0x4177d8
push eax
call dword [sym.imp.ucrtbase.dll_wcsstr]
add esp, 8
mov esi, eax
mov ebx, dword [0x4162c8]
push 0x4177de
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
xor ecx, ecx
test eax, eax
sete cl
mov dword [edi], ecx
jne 0x407d6c
mov ebx, dword [0x418750]
xor eax, eax
nop
movzx ecx, word [ebx + eax]
mov word [ebp + eax - 0x22c], cx
add eax, 2
test cx, cx
jne 0x407d70
xor ebx, ebx
mov dword [ebp - 0x18], esi
test esi, esi
setne byte [ebp - 0x10]
test byte [0x41d010], 8
je 0x407dc9
lea ecx, [ebp - 0x22c]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Condition:__s_n
mov dword [esp + 8], str.evaluate_if_condition
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
lea esi, [ebp - 0x22c]
push str.errorlevel
push esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x407ee4
push str.exist
push esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x407f27
push str.defined
push esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x407fa7
movzx eax, byte [ebp - 0x10]
mov bl, al
add ebx, dword [edi]
lea edi, [ebp - 0x1c]
xor esi, esi
push 0
push 1
push edi
push ebx
push dword [ebp + 8]
call sym._WCMD_parameter
add esp, 0x14
nop dword [eax]
movzx ecx, word [eax + esi]
mov word [ebp + esi - 0x822c], cx
add esi, 2
test cx, cx
jne 0x407e30
cmp word [ebp - 0x822c], 0
je 0x407f1d
xor eax, eax
mov ebx, dword [ebp - 0x1c]
nop word [eax + eax]
cmp word [ebp + eax - 0x822a], 0
lea eax, [eax + 2]
jne 0x407e60
add ebx, eax
jmp 0x407e83
add ebx, 2
movzx eax, word [ebx]
cmp eax, 9
je 0x407e80
cmp eax, 0x20
je 0x407e80
push 2
push 0x41783e
push ebx
call dword [sym.imp.ucrtbase.dll_wcsncmp]
add esp, 0xc
test eax, eax
je 0x408019
xor esi, esi
push 0
push 0
push edi
push 0
push ebx
call sym._WCMD_parameter
add esp, 0x14
nop dword [eax + eax]
movzx ecx, word [eax + esi]
mov word [ebp + esi - 0xc22c], cx
add esi, 2
test cx, cx
jne 0x407ec0
cmp word [ebp - 0xc22c], 0
jne 0x40802c
jmp 0x407f1d
mov eax, dword [edi]
inc eax
push 0
push 0
push 0
push eax
mov esi, dword [ebp + 8]
push esi
call sym._WCMD_parameter
add esp, 0x14
lea ecx, [ebp - 0x822c]
push 0xa
push ecx
push eax
call dword [sym.imp.ucrtbase.dll_wcstol]
add esp, 0xc
mov ecx, dword [ebp - 0x822c]
cmp word [ecx], 0
je 0x407fd6
mov eax, 0xffffffff
jmp 0x408428
mov eax, dword [edi]
inc eax
mov ebx, 0xfffffffe
push 0
push 0
push 0
push eax
push dword [ebp + 8]
call sym._WCMD_parameter
add esp, 0x14
mov esi, eax
nop word cs:[eax + eax]
cmp word [esi + ebx + 2], 0
lea ebx, [ebx + 2]
jne 0x407f50
test ebx, ebx
je 0x407ffb
movzx eax, word [esi + ebx - 2]
cmp eax, 0x5c
je 0x407f72
cmp eax, 0x2f
jne 0x407f81
push 0x417264
push esi
call dword [sym.imp.ucrtbase.dll_wcscat]
add esp, 8
lea eax, [ebp - 0x822c]
push eax
push esi
call dword [sym.imp.kernel32.dll_FindFirstFileW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
je 0x408004
push eax
call dword [sym.imp.kernel32.dll_FindClose]
jmp 0x408004
mov eax, dword [edi]
inc eax
push 0
push 0
push 0
push eax
mov esi, dword [ebp + 8]
push esi
call sym._WCMD_parameter
add esp, 0x14
push 0
push 0
push eax
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
xor ecx, ecx
test eax, eax
setne cl
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
jmp 0x407fe8
mov ecx, dword [0x4162c0]
xor edx, edx
cmp dword [ecx], eax
setge dl
mov eax, dword [ebp + 0x10]
mov dword [eax], edx
mov eax, dword [edi]
add eax, 2
push 0
push 0
push dword [ebp + 0xc]
push eax
push esi
jmp 0x40841b
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov eax, dword [edi]
add eax, 2
push 0
push 0
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
jmp 0x40841b
mov word [ebp - 0xc228], 0
mov dword [ebp - 0xc22c], 0x3d003d
mov eax, 0xfffffffe
nop word cs:[eax + eax]
cmp word [ebp + eax - 0xc22a], 0
lea eax, [eax + 2]
jne 0x408040
add ebx, eax
xor esi, esi
push 0
push 1
push edi
push 0
push ebx
call sym._WCMD_parameter
add esp, 0x14
nop word cs:[eax + eax]
movzx ecx, word [eax + esi]
mov word [ebp + esi - 0x422c], cx
add esi, 2
test cx, cx
jne 0x408070
cmp word [ebp - 0x422c], 0
je 0x407f1d
lea eax, [ebp - 0xc22c]
push 0x41783e
push eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x40816b
lea eax, [ebp - 0x24]
lea ebx, [ebp - 0x822c]
mov esi, dword [sym.imp.ucrtbase.dll_wcstol]
push 0
push eax
push ebx
call esi
add esp, 0xc
mov edi, eax
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x422c]
push 0
push eax
push ecx
call esi
add esp, 0xc
mov ecx, dword [ebp - 0x24]
cmp word [ecx], 0
je 0x40818e
push 0x418444
lea edi, [ebp - 0xc22c]
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
mov esi, dword [ebp - 0x18]
je 0x40825d
push 0x41844c
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408296
push 0x418454
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x4082d2
push 0x41845c
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408309
push 0x418464
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408351
push 0x41846c
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
jne 0x40821b
jmp 0x408389
cmp dword [ebp - 0x18], 0
je 0x408229
lea eax, [ebp - 0x422c]
lea ecx, [ebp - 0x822c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
jmp 0x40823d
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
movzx edi, word [eax]
push 0x418444
lea ebx, [ebp - 0xc22c]
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
mov esi, dword [ebp - 0x18]
je 0x40824e
push 0x41844c
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408287
push 0x418454
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x4082c3
push 0x41845c
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x4082fa
push 0x418464
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408346
push 0x41846c
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408384
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffff
jmp 0x407f1d
lea eax, [ebp - 0x422c]
lea ecx, [ebp - 0x822c]
push eax
push ecx
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov ecx, eax
mov edx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
sete al
jmp 0x4083e7
test di, di
lea ebx, [ebp - 0x822c]
je 0x4082e3
lea eax, [ebp - 0x422c]
test esi, esi
je 0x408277
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
shr eax, 0x1f
jmp 0x4083e4
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpW]
shr eax, 0x1f
jmp 0x4083e4
test di, di
lea ebx, [ebp - 0x822c]
je 0x40831d
lea eax, [ebp - 0x422c]
test esi, esi
je 0x4082aa
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
jmp 0x4082b2
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov ecx, eax
mov edx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
setle al
jmp 0x4083e7
test di, di
lea ebx, [ebp - 0x822c]
je 0x408365
lea eax, [ebp - 0x422c]
test esi, esi
je 0x4082f3
push eax
push ebx
jmp 0x408183
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
setl al
jmp 0x4083e4
push eax
push ebx
jmp 0x408237
test di, di
lea ebx, [ebp - 0x822c]
je 0x4083a3
lea eax, [ebp - 0x422c]
test esi, esi
je 0x40832d
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
jmp 0x408335
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
setle al
jmp 0x4083e4
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov ecx, eax
mov edx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
setne al
jmp 0x4083e7
test di, di
lea ebx, [ebp - 0x822c]
je 0x4083cc
lea eax, [ebp - 0x422c]
test esi, esi
je 0x408372
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
jmp 0x40837a
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
sete al
jmp 0x4083e4
push eax
push ebx
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov edx, dword [ebp + 0xc]
not eax
shr eax, 0x1f
jmp 0x4083e7
test di, di
je 0x4083d9
lea eax, [ebp - 0x422c]
test esi, esi
je 0x4083b0
push eax
lea eax, [ebp - 0x822c]
push eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
jmp 0x4083be
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
setne al
jmp 0x4083e4
push eax
lea eax, [ebp - 0x822c]
push eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov ecx, eax
mov edx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
setg al
jmp 0x4083e7
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
setge al
jmp 0x4083e4
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x10]
setg al
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor ecx, ecx
mov eax, dword [ebp - 0x1c]
nop word cs:[eax + eax]
cmp word [ebp + ecx - 0x422c], 0
lea ecx, [ecx + 2]
jne 0x408400
add eax, ecx
add eax, 0xfffffffe
push 0
push 0
push edx
push 0
push eax
call sym._WCMD_parameter
add esp, 0x14
mov eax, 1
add esp, 0xc220
pop esi
pop edi
pop ebx
pop ebp
ret