Function at 0x40de50
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0xc238
mov ebp, esp
push edi
push esi
push ebx
call fcn.004246d8
sub esp, eax
lea ebx, [ebp - 0xc214]
mov dword [esp + 4], 0x428534
mov dword [esp], 0x438700
call dword [sym.imp.ucrtbase.dll_wcsstr]
mov dword [esp + 4], 0x42853a
mov esi, dword [sym.imp.kernel32.dll_lstrcmpiW]
mov dword [ebp - 0xc228], eax
mov dword [esp], 0x434460
call esi
xor edx, edx
mov edi, dword [ebp + 0x14]
mov ecx, 0x430460
sub esp, 8
test eax, eax
mov eax, 0x434460
sete dl
cmovne ecx, eax
xor eax, eax
mov dword [edi], edx
lea esi, [esi]
nop
movzx edx, word [ecx + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40dec0
test byte [0x425010], 8
jne 0x40e330
mov dword [esp + 4], str.errorlevel
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x40df60
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [eax]
mov dword [ebp - 0xc224], eax
add eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_parameter
lea edx, [ebp - 0x400c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x400c]
cmp word [edx], 0
je 0x40e2e0
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.exist
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x40e030
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [eax]
mov dword [ebp - 0xc224], eax
add eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_parameter
cmp word [eax], 0
mov ebx, eax
je 0x40e4bc
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40dfc0
mov edx, eax
sub edx, ebx
sar edx, 1
cmp ebx, eax
je 0x40e4bc
movzx eax, word [ebx + edx*2 - 2]
cmp ax, 0x5c
je 0x40e5c4
cmp ax, 0x2f
je 0x40e5c4
lea eax, [ebp - 0x400c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
xor edx, edx
mov edi, dword [ebp + 0x10]
sub esp, 8
cmp eax, 0xffffffff
setne dl
mov dword [edi], edx
je 0x40e2f1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
jmp 0x40e2f1
mov dword [esp + 4], str.defined
mov dword [esp], ebx
call esi
sub esp, 8
mov dword [esp + 0x10], 0
test eax, eax
je 0x40e461
mov edx, dword [ebp - 0xc228]
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0xc220]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
xor eax, eax
test edx, edx
setne al
add eax, dword [edi]
lea edi, [ebp - 0xc00c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_parameter
xor edx, edx
lea esi, [esi]
nop
movzx ecx, word [eax + edx]
mov word [edi + edx], cx
add edx, 2
test cx, cx
jne 0x40e090
cmp word [ebp - 0xc00c], 0
je 0x40df51
mov eax, dword [ebp - 0xc220]
mov ebx, edi
lea esi, [esi]
lea esi, [esi]
add ebx, 2
cmp word [ebx], 0
jne 0x40e0c0
sub ebx, edi
add ebx, eax
movzx eax, word [ebx]
cmp ax, 9
je 0x40e0e0
cmp ax, 0x20
jne 0x40e0f2
lea esi, [esi]
add ebx, 2
movzx eax, word [ebx]
cmp ax, 0x20
je 0x40e0e0
cmp ax, 9
je 0x40e0e0
mov edx, 0x3d
mov eax, 0x42852e
jmp 0x40e104
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x40e100
sub eax, 0x42852e
mov dword [esp + 4], 0x42852e
sar eax, 1
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ucrtbase.dll_wcsncmp]
test eax, eax
jne 0x40e5da
lea ecx, [ebp - 0x400c]
mov edx, 0x3d
mov dword [ebp - 0xc224], ecx
jmp 0x40e14a
movzx edx, word [eax + 0x42852e]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x40e143
cmp word [ebp - 0x400c], 0
je 0x40e181
mov eax, dword [ebp - 0xc224]
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40e170
sub eax, dword [ebp - 0xc224]
add ebx, eax
lea eax, [ebp - 0xc220]
mov dword [esp], ebx
lea ebx, [ebp - 0x800c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], 0
call sym._WCMD_parameter
xor edx, edx
movzx ecx, word [eax + edx]
mov word [ebx + edx], cx
add edx, 2
test cx, cx
jne 0x40e1b3
cmp word [ebp - 0x800c], 0
je 0x40df51
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x42852e
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e649
mov edx, dword [sym.imp.ucrtbase.dll_wcstol]
lea eax, [ebp - 0xc21c]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [ebp - 0xc230], edx
mov dword [esp], edi
call edx
mov dword [esp + 8], 0
mov edx, dword [ebp - 0xc230]
mov dword [ebp - 0xc22c], eax
lea eax, [ebp - 0xc218]
mov dword [esp + 4], eax
mov dword [esp], ebx
call edx
mov dword [ebp - 0xc230], eax
mov eax, dword [ebp - 0xc21c]
cmp word [eax], 0
jne 0x40e66b
mov eax, dword [ebp - 0xc218]
cmp word [eax], 0
jne 0x40e66b
mov edx, dword [ebp - 0xc224]
mov dword [esp + 4], 0x428584
mov dword [esp], edx
call esi
xor edx, edx
mov ecx, dword [ebp - 0xc230]
sub esp, 8
cmp dword [ebp - 0xc22c], ecx
setl dl
test eax, eax
jne 0x40e773
mov eax, dword [ebp + 0x10]
cmp word [ebp - 0x800c], 0
mov dword [eax], edx
mov edx, dword [ebp - 0xc220]
mov eax, ebx
je 0x40e2ae
add eax, 2
cmp word [eax], 0
jne 0x40e2a1
sub eax, ebx
add edx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
call sym._WCMD_parameter
mov eax, 1
jmp 0x40df56
cmp dword [0x4386f0], eax
mov edi, dword [ebp + 0x10]
setge al
movzx eax, al
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
add eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_parameter
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
shr eax, 0x10
je 0x40e593
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x427175
test edi, edi
jne 0x40e434
cmp word [ebp - 0xc214], 0
je 0x40e37a
lea esi, [esi]
nop
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x40e370
mov eax, 0x224c
mov dword [ebp - 0xc224], ebx
lea edx, [ebp - 0x400a]
mov word [ebp - 0x400c], ax
mov dword [ebp - 0xc22c], esi
lea esi, [esi]
nop
lea eax, [ebp - 0x3eea]
lea esi, [edi - 1]
cmp edx, eax
ja 0x40e400
test edi, edi
jle 0x40e400
add dword [ebp - 0xc224], 2
mov eax, dword [ebp - 0xc224]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40e4f0
ja 0x40e4d0
cmp ax, 9
je 0x40e580
cmp ax, 0xa
jne 0x40e520
mov eax, 0x6e5c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e3a0
mov eax, esi
mov byte [edx], 0x22
mov esi, dword [ebp - 0xc22c]
test eax, eax
jle 0x40e5bc
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Condition:__s_n
mov dword [esp + 8], str.evaluate_if_condition
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x40dedd
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [eax]
mov dword [ebp - 0xc224], eax
add eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_parameter
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, dword [ebp + 0x10]
sub esp, 0xc
test eax, eax
setne al
movzx eax, al
mov dword [esi], eax
jmp 0x40e2f1
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
jmp 0x40e2f1
cmp ax, 0x22
je 0x40e503
cmp ax, 0x5c
jne 0x40e520
mov edi, 0x5c5c
add edx, 2
mov word [edx - 2], di
mov edi, esi
jmp 0x40e3a0
mov eax, 0x725c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e3a0
mov eax, 0x225c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e3a0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40e5b0
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefWCMD_choice]
and edi, 0xf
mov byte [edx - 3], cl
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov edi, esi
mov byte [edx - 2], cl
jmp 0x40e3a0
mov eax, 0x745c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e3a0
movzx eax, bx
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x40e434
mov byte [edx], al
mov edi, esi
add edx, 1
jmp 0x40e3a0
lea eax, [edx + 1]
jmp 0x40e423
mov dword [esp + 4], 0x427546
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcscat]
jmp 0x40dff0
lea eax, [ebp - 0xc220]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
call sym._WCMD_parameter
lea ecx, [ebp - 0x400c]
mov dword [ebp - 0xc22c], ebx
xor edx, edx
mov dword [ebp - 0xc224], ecx
mov ebx, ecx
lea esi, [esi]
movzx ecx, word [eax + edx]
mov word [ebx + edx], cx
add edx, 2
test cx, cx
jne 0x40e620
cmp word [ebp - 0x400c], 0
mov ebx, dword [ebp - 0xc22c]
jne 0x40e160
jmp 0x40df51
mov eax, dword [ebp - 0xc228]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e6a9
call esi
xor edx, edx
sub esp, 8
test eax, eax
sete dl
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x428584
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
jne 0x40e6be
mov eax, dword [ebp - 0xc228]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e760
call esi
shr eax, 0x1f
sub esp, 8
mov edx, eax
jmp 0x40e28a
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
sub esp, 8
test eax, eax
sete dl
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x428594
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e7a7
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x42858c
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e649
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x42859c
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
je 0x40e844
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x4285a4
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
je 0x40e7fc
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x4285ac
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
je 0x40e7dc
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffff
jmp 0x40df51
call dword [sym.imp.kernel32.dll_lstrcmpW]
shr eax, 0x1f
sub esp, 8
mov edx, eax
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x428594
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
jne 0x40e864
xor edx, edx
mov esi, dword [ebp - 0xc230]
cmp dword [ebp - 0xc22c], esi
setle dl
jmp 0x40e28a
mov eax, dword [ebp - 0xc228]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e7c8
call esi
xor edx, edx
test eax, eax
push esi
setle dl
push esi
jmp 0x40e28a
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push ecx
setle dl
push ecx
jmp 0x40e28a
cmp dword [ebp - 0xc228], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e81c
call esi
xor edx, edx
test eax, eax
push edi
setg dl
push edi
jmp 0x40e28a
cmp dword [ebp - 0xc228], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e830
call esi
not eax
push ecx
mov edx, eax
push ecx
shr edx, 0x1f
jmp 0x40e28a
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push esi
setg dl
push esi
jmp 0x40e28a
call dword [sym.imp.kernel32.dll_lstrcmpW]
not eax
push edx
push edx
mov edx, eax
shr edx, 0x1f
jmp 0x40e28a
cmp dword [ebp - 0xc228], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e893
call esi
xor edx, edx
test eax, eax
push edi
setne dl
push edi
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x42858c
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
jne 0x40e8a7
xor edx, edx
mov esi, dword [ebp - 0xc230]
cmp dword [ebp - 0xc22c], esi
sete dl
jmp 0x40e28a
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push esi
setne dl
push esi
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x42859c
mov dword [esp], eax
call esi
push ecx
push ecx
test eax, eax
jne 0x40e8d6
xor edx, edx
mov esi, dword [ebp - 0xc230]
cmp dword [ebp - 0xc22c], esi
setne dl
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x4285a4
mov dword [esp], eax
call esi
push ecx
push ecx
test eax, eax
jne 0x40e905
xor edx, edx
mov esi, dword [ebp - 0xc230]
cmp dword [ebp - 0xc22c], esi
setge dl
jmp 0x40e28a
mov eax, dword [ebp - 0xc224]
mov dword [esp + 4], 0x4285ac
mov dword [esp], eax
call esi
push ecx
push ecx
test eax, eax
jne 0x40e751
xor edx, edx
mov esi, dword [ebp - 0xc230]
cmp dword [ebp - 0xc22c], esi
setg dl
jmp 0x40e28a