Function at 0x40dca0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0xc25c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004240d8
sub esp, eax
lea ebx, [ebp - 0xc220]
mov dword [esp + 4], 0x427514
mov dword [esp], 0x437480
call dword [sym.imp.ucrtbase.dll_wcsstr]
mov dword [esp + 4], 0x42751a
mov esi, dword [sym.imp.kernel32.dll_lstrcmpiW]
mov dword [ebp - 0xc240], eax
mov dword [esp], 0x4331e0
call esi
xor edx, edx
mov edi, dword [ebp + 0x14]
mov ecx, 0x42f1e0
sub esp, 8
test eax, eax
mov eax, 0x4331e0
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 0x40dd10
test byte [0x425010], 8
jne 0x40e160
mov dword [esp + 4], str.errorlevel
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x40ddb0
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 - 0xc23c], 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 - 0x4018]
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 - 0x4018]
cmp word [edx], 0
je 0x40e110
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 0x40de60
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 - 0xc23c], 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
je 0x40dda1
mov edx, eax
add edx, 2
cmp word [edx], 0
jne 0x40de05
mov ecx, edx
sub ecx, eax
sar ecx, 1
cmp eax, edx
je 0x40dda1
cmp word [eax + ecx*2 - 2], 0x5c
je 0x40e2ec
lea edx, [ebp - 0x4018]
mov dword [esp], eax
mov dword [esp + 4], edx
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 0x40e121
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
jmp 0x40e121
mov dword [esp + 4], str.defined
mov dword [esp], ebx
call esi
sub esp, 8
mov dword [esp + 0x10], 0
test eax, eax
je 0x40e291
mov edx, dword [ebp - 0xc240]
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0xc22c]
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 - 0xc018]
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 0x40dec0
cmp word [ebp - 0xc018], 0
je 0x40dda1
mov eax, dword [ebp - 0xc22c]
mov ebx, edi
lea esi, [esi]
lea esi, [esi]
add ebx, 2
cmp word [ebx], 0
jne 0x40def0
sub ebx, edi
add ebx, eax
movzx eax, word [ebx]
cmp ax, 9
je 0x40df10
cmp ax, 0x20
jne 0x40df22
lea esi, [esi]
add ebx, 2
movzx eax, word [ebx]
cmp ax, 0x20
je 0x40df10
cmp ax, 9
je 0x40df10
mov edx, 0x3d
mov eax, 0x42750e
jmp 0x40df34
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x40df30
sub eax, 0x42750e
mov dword [esp + 4], 0x42750e
sar eax, 1
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.ucrtbase.dll_wcsncmp]
test eax, eax
jne 0x40e414
lea ecx, [ebp - 0x4018]
mov edx, 0x3d
mov dword [ebp - 0xc23c], ecx
jmp 0x40df7a
movzx edx, word [eax + 0x42750e]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x40df73
cmp word [ebp - 0x4018], 0
je 0x40dfb1
mov eax, dword [ebp - 0xc23c]
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40dfa0
sub eax, dword [ebp - 0xc23c]
add ebx, eax
lea eax, [ebp - 0xc22c]
mov dword [esp], ebx
lea ebx, [ebp - 0x8018]
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 0x40dfe3
cmp word [ebp - 0x8018], 0
je 0x40dda1
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42750e
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e47d
mov edx, dword [sym.imp.ucrtbase.dll_wcstol]
lea eax, [ebp - 0xc228]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [ebp - 0xc248], edx
mov dword [esp], edi
call edx
mov dword [esp + 8], 0
mov edx, dword [ebp - 0xc248]
mov dword [ebp - 0xc244], eax
lea eax, [ebp - 0xc224]
mov dword [esp + 4], eax
mov dword [esp], ebx
call edx
mov dword [ebp - 0xc248], eax
mov eax, dword [ebp - 0xc228]
cmp word [eax], 0
jne 0x40e49f
mov eax, dword [ebp - 0xc224]
cmp word [eax], 0
jne 0x40e49f
mov edx, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427564
mov dword [esp], edx
call esi
xor edx, edx
mov ecx, dword [ebp - 0xc248]
sub esp, 8
cmp dword [ebp - 0xc244], ecx
setl dl
test eax, eax
jne 0x40e5a6
mov eax, dword [ebp + 0x10]
cmp word [ebp - 0x8018], 0
mov dword [eax], edx
mov edx, dword [ebp - 0xc22c]
mov eax, ebx
je 0x40e0de
add eax, 2
cmp word [eax], 0
jne 0x40e0d1
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 0x40dda6
cmp dword [0x437470], 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 0x40e3e3
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x42613d
test edi, edi
jne 0x40e264
cmp word [ebp - 0xc220], 0
je 0x40e1aa
lea esi, [esi]
nop
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x40e1a0
mov eax, 0x224c
mov dword [ebp - 0xc23c], ebx
lea edx, [ebp - 0x4016]
mov word [ebp - 0x4018], ax
mov dword [ebp - 0xc244], esi
lea esi, [esi]
nop
lea esi, [edi - 1]
test edi, edi
jle 0x40e230
lea eax, [ebp - 0x3ef6]
cmp edx, eax
ja 0x40e230
add dword [ebp - 0xc23c], 2
mov eax, dword [ebp - 0xc23c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40e340
ja 0x40e320
cmp ax, 9
je 0x40e3d0
cmp ax, 0xa
jne 0x40e370
mov eax, 0x6e5c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e1d0
mov eax, esi
mov byte [edx], 0x22
mov esi, dword [ebp - 0xc244]
test eax, eax
jle 0x40e40c
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x4018]
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.9
jmp 0x40dd2d
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [eax]
mov dword [ebp - 0xc23c], 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 0x40e121
mov ecx, eax
nop
add ecx, 2
cmp word [ecx], 0
jne 0x40e2f0
xor edx, edx
mov ebx, 0x2e
jmp 0x40e309
movzx ebx, word [edx + 0x426a6e]
mov word [ecx + edx], bx
add edx, 2
test bx, bx
jne 0x40e302
jmp 0x40de24
cmp ax, 0x22
je 0x40e353
cmp ax, 0x5c
jne 0x40e370
mov edi, 0x5c5c
add edx, 2
mov word [edx - 2], di
mov edi, esi
jmp 0x40e1d0
mov eax, 0x725c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e1d0
mov eax, 0x225c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e1d0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40e400
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 0x40e1d0
mov eax, 0x745c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40e1d0
movzx eax, bx
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
jmp 0x40e264
mov byte [edx], al
mov edi, esi
add edx, 1
jmp 0x40e1d0
lea eax, [edx + 1]
jmp 0x40e253
lea eax, [ebp - 0xc22c]
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 - 0x4018]
mov dword [ebp - 0xc244], ebx
xor edx, edx
mov dword [ebp - 0xc23c], ecx
mov ebx, ecx
movzx ecx, word [eax + edx]
mov word [ebx + edx], cx
add edx, 2
test cx, cx
jne 0x40e454
cmp word [ebp - 0x4018], 0
mov ebx, dword [ebp - 0xc244]
jne 0x40df90
jmp 0x40dda1
mov eax, dword [ebp - 0xc240]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e4dd
call esi
xor edx, edx
sub esp, 8
test eax, eax
sete dl
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427564
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
jne 0x40e4f2
mov eax, dword [ebp - 0xc240]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e593
call esi
shr eax, 0x1f
sub esp, 8
mov edx, eax
jmp 0x40e0ba
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
sub esp, 8
test eax, eax
sete dl
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427574
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e5da
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42756c
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
je 0x40e47d
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42757c
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
je 0x40e677
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427584
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
je 0x40e62f
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42758c
mov dword [esp], eax
call esi
push ecx
push ecx
test eax, eax
je 0x40e60f
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffff
jmp 0x40dda1
call dword [sym.imp.kernel32.dll_lstrcmpW]
shr eax, 0x1f
sub esp, 8
mov edx, eax
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427574
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
jne 0x40e697
xor edx, edx
mov esi, dword [ebp - 0xc248]
cmp dword [ebp - 0xc244], esi
setle dl
jmp 0x40e0ba
mov eax, dword [ebp - 0xc240]
mov dword [esp + 4], ebx
mov dword [esp], edi
test eax, eax
je 0x40e5fb
call esi
xor edx, edx
test eax, eax
push esi
setle dl
push esi
jmp 0x40e0ba
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push ecx
setle dl
push ecx
jmp 0x40e0ba
cmp dword [ebp - 0xc240], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e64f
call esi
xor edx, edx
test eax, eax
push esi
setg dl
push esi
jmp 0x40e0ba
cmp dword [ebp - 0xc240], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e663
call esi
not eax
push edx
push edx
mov edx, eax
shr edx, 0x1f
jmp 0x40e0ba
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push ecx
setg dl
push ecx
jmp 0x40e0ba
call dword [sym.imp.kernel32.dll_lstrcmpW]
not eax
push edi
mov edx, eax
push edi
shr edx, 0x1f
jmp 0x40e0ba
cmp dword [ebp - 0xc240], 0
mov dword [esp + 4], ebx
mov dword [esp], edi
je 0x40e6c6
call esi
xor edx, edx
test eax, eax
push esi
setne dl
push esi
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42756c
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
jne 0x40e6da
xor edx, edx
mov esi, dword [ebp - 0xc248]
cmp dword [ebp - 0xc244], esi
sete dl
jmp 0x40e0ba
call dword [sym.imp.kernel32.dll_lstrcmpW]
xor edx, edx
test eax, eax
push ecx
setne dl
push ecx
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42757c
mov dword [esp], eax
call esi
push edi
push edi
test eax, eax
jne 0x40e709
xor edx, edx
mov esi, dword [ebp - 0xc248]
cmp dword [ebp - 0xc244], esi
setne dl
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x427584
mov dword [esp], eax
call esi
push ecx
push ecx
test eax, eax
jne 0x40e738
xor edx, edx
mov esi, dword [ebp - 0xc248]
cmp dword [ebp - 0xc244], esi
setge dl
jmp 0x40e0ba
mov eax, dword [ebp - 0xc23c]
mov dword [esp + 4], 0x42758c
mov dword [esp], eax
call esi
push edx
push edx
test eax, eax
jne 0x40e585
xor edx, edx
mov esi, dword [ebp - 0xc248]
cmp dword [ebp - 0xc244], esi
setg dl
jmp 0x40e0ba