Function at 0x401620
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x8a74
call sym.__alloca
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], 0
mov esi, dword [eax]
add esi, 2
xor ebx, ebx
mov eax, esi
jmp 0x401655
mov ebx, eax
add eax, 2
test ebx, ebx
je case.0x401664.97
movzx ecx, word [ebx]
add ecx, 0xffffffdc
cmp ecx, 0x5a
ja case.0x401664.37
jmp dword [ecx*4 + 0x416010]
add eax, 2
movzx ecx, word [eax - 2]
test ecx, ecx
je 0x4020e2
cmp ecx, 0x3a
jne case.0x401664.36
jmp case.0x401664.97
cmp ebx, esi
mov dword [ebp - 0x18], esi
jbe 0x4018ec
movzx eax, byte [section..data]
jmp 0x4016ae
add ebx, 0xfffffffe
mov esi, dword [ebp - 0x18]
cmp ebx, esi
jbe 0x4018ec
test al, 8
je 0x401896
cmp ebx, 0xffff
ja 0x4016d5
movzx eax, bx
sub esp, 8
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
add esp, 8
jmp 0x401870
push 0xffffffffffffffff
push ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
mov eax, 0x4162b0
test ecx, ecx
jne 0x401870
mov ecx, 0xffffffff
mov edx, 1
nop word [eax + eax]
mov eax, edx
cmp word [ebx + ecx*2 + 2], 0
lea ecx, [ecx + 1]
lea edx, [edx + 1]
jne 0x401700
mov word [ebp - 0x8a80], 0x224c
test ecx, ecx
je 0x401839
mov dword [ebp - 0x10], 2
lea edi, [ebp - 0x8a7e]
mov edx, ebx
movzx esi, word [edx]
mov ecx, esi
add esi, 0xfffffff7
cmp esi, 0x19
ja case.default.0x40173d
jmp dword [esi*4 + 0x41617c]
mov word [edi], 0x745c
add dword [ebp - 0x10], 2
jmp 0x401800
mov esi, ecx
cmp ecx, 0x5c
jne case.0x40173d.11
mov word [edi], 0x5c5c
add dword [ebp - 0x10], 2
jmp 0x401800
lea esi, [ecx - 0x7f]
cmp si, 0xffa0
ja 0x4017f4
mov byte [edi], 0x5c
mov esi, ecx
shr esi, 0xc
mov dword [ebp - 0x14], ecx
movzx ecx, byte [esi + str.0123456789abcdef_04x]
mov byte [edi + 1], cl
mov ecx, dword [ebp - 0x14]
shr ecx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdef_04x]
mov esi, dword [ebp - 0x10]
mov byte [ebp + esi - 0x8a7e], cl
mov ecx, dword [ebp - 0x14]
shr ecx, 4
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdef_04x]
mov esi, dword [ebp - 0x10]
mov byte [ebp + esi - 0x8a7d], cl
mov ecx, dword [ebp - 0x14]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdef_04x]
add dword [ebp - 0x10], 5
mov byte [edi + 4], cl
jmp 0x401800
mov word [edi], 0x725c
add dword [ebp - 0x10], 2
jmp 0x401800
mov word [edi], 0x225c
add dword [ebp - 0x10], 2
jmp 0x401800
mov word [edi], 0x6e5c
add dword [ebp - 0x10], 2
jmp 0x401800
inc dword [ebp - 0x10]
mov byte [edi], cl
nop dword [eax]
dec eax
mov ecx, dword [ebp - 0x10]
lea edi, [ecx + ebp]
add edi, 0xffff7580
cmp eax, 2
jl 0x401822
add edx, 2
cmp dword [ebp - 0x10], 0x123
jl 0x401730
mov byte [edi], 0x22
cmp eax, 3
jl 0x401848
mov word [edi + 1], 0x2e2e
mov byte [edi + 3], 0x2e
add edi, 4
jmp 0x401849
mov byte [ebp - 0x8a7e], 0x22
lea edi, [ebp - 0x8a7d]
jmp 0x40184c
inc edi
mov esi, dword [ebp - 0x18]
mov byte [edi], 0
lea eax, [ebp - 0x8a80]
push eax
call dbg.__wine_dbg_strdup
add esp, 4
mov edi, dword [ebp + 0xc]
nop word cs:[eax + eax]
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Looking_backwards_for_parameter_id:__s_n
mov dword [esp + 8], str.WCMD_HandleTildeModifiers
call sym._wine_dbg_log
add esp, 0x14
movzx eax, byte [section..data]
movzx ecx, word [ebx]
test edi, edi
jne 0x4018b1
mov edx, dword [0x4162bc]
cmp dword [edx], 0
je 0x4018b1
lea edx, [ecx - 0x30]
cmp dx, 0xa
jb 0x4018ec
lea esi, [ecx - 0x61]
mov edx, 0xffffff9f
cmp si, 0x1a
jb 0x4018d1
lea esi, [ecx - 0x41]
mov edx, 0xffffffd9
cmp si, 0x19
ja 0x4016a0
add edx, ecx
js 0x4016a0
mov ecx, dword [0x4162c4]
cmp dword [ecx + edx*4], 0
je 0x4016a0
mov esi, dword [ebp - 0x18]
mov edi, ebx
sub edi, esi
je 0x4020e2
sar edi, 1
mov word [ebp - 0x4a80], 0
movzx eax, word [ebx]
cmp eax, 0x30
jne 0x401939
cmp edi, 2
jl 0x401939
mov eax, dword [0x4162bc]
mov eax, dword [eax]
mov eax, dword [eax + 8]
xor ecx, ecx
nop word [eax + eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0x8a80], dx
add ecx, 2
test dx, dx
jne 0x401920
jmp 0x4019c4
lea ecx, [eax - 0x30]
cmp cx, 9
ja 0x401989
mov edx, dword [0x4162bc]
mov edx, dword [edx]
add ecx, dword [edx + eax*4 - 0xb4]
push 0x416232
push 1
push 0
push 0
push ecx
push dword [edx]
call dbg.WCMD_parameter_with_delims
add esp, 0x18
xor eax, eax
nop dword [eax]
movzx ecx, word [eax + 0x41d070]
mov word [ebp + eax - 0x8a80], cx
add eax, 2
test cx, cx
jne 0x401970
jmp 0x4019c4
lea ecx, [eax - 0x61]
cmp cx, 0x19
jbe 0x4019a4
lea ecx, [eax - 0x41]
add eax, 0xffffffd9
cmp cx, 0x1a
mov ecx, 0xffffffff
cmovb ecx, eax
mov eax, dword [0x4162c4]
mov eax, dword [eax + ecx*4]
xor ecx, ecx
nop
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0x8a80], dx
add ecx, 2
test dx, dx
jne 0x4019b0
cmp word [ebp - 0x8a80], 0x22
jne 0x401a30
test edi, edi
jle 0x401a58
mov eax, esi
cmp word [eax], 0x7e
je 0x4019e7
add eax, 2
cmp eax, ebx
jb 0x4019d8
jmp 0x401a30
mov eax, 0xfffffffe
cmp word [ebp + eax - 0x8a7e], 0
lea eax, [eax + 2]
jne 0x4019ec
sar eax, 1
cmp word [ebp + eax*2 - 0x8a82], 0x22
jne 0x401a12
mov word [ebp + eax*2 - 0x8a82], 0
dec eax
lea ecx, [ebp - 0x8a7e]
lea eax, [eax*2 - 1]
lea edx, [ebp - 0x8a80]
push eax
push ecx
push edx
call sym._memmove
add esp, 0xc
test edi, edi
jle 0x401a58
mov eax, esi
nop word cs:[eax + eax]
cmp word [eax], 0x24
je 0x401acd
add eax, 2
cmp eax, ebx
jb 0x401a40
mov al, 1
mov dword [ebp - 0x10], eax
jmp 0x401a5f
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x20]
lea edi, [ebp - 0x468]
lea ecx, [ebp - 0x8a80]
push eax
push edi
push 0x104
push ecx
call dbg.WCMD_get_fullpath
add esp, 0x10
test eax, eax
je 0x401a91
lea eax, [ebp - 0x44]
push eax
push 0
push edi
call dword [sym.imp.kernel32.dll_GetFileAttributesExW]
jmp 0x401a9c
mov word [ebp - 0x468], 0
xor eax, eax
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x10]
test dl, dl
je 0x401e3d
mov ecx, esi
cmp word [ecx], 0x61
je 0x401b86
add ecx, 2
cmp ecx, ebx
jb 0x401ab0
mov dword [ebp - 0x14], 0
jmp 0x401c26
mov edi, esi
mov esi, dword [sym.imp.ucrtbase.dll_wcschr]
push 0x24
push edi
call esi
mov ecx, esi
add esp, 8
mov esi, eax
add esi, 2
push 0x3a
push edi
call ecx
add esp, 8
mov edi, eax
sub edi, esi
lea eax, [ebp - 0x468]
push edi
push esi
mov esi, eax
push eax
call sym._memcpy
add esp, 0xc
mov word [ebp + edi - 0x468], 0
push 0
push 0
push esi
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x402093
mov edi, eax
add eax, eax
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov ecx, eax
test eax, eax
je 0x402089
push edi
push ecx
push esi
mov esi, ecx
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov ecx, esi
test eax, eax
je 0x402089
lea eax, [ebp - 0x8a80]
push 0
push eax
push 0x104
push 0
push eax
push ecx
call dword [sym.imp.kernel32.dll_SearchPathW]
mov ecx, esi
test eax, eax
je 0x402089
push ecx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov al, 1
mov dword [ebp - 0x10], eax
mov esi, dword [ebp - 0x18]
jmp 0x401a5f
mov dword [ebp - 0x14], 1
test eax, eax
je 0x401c26
movups xmm0, xmmword [str._________]
movups xmmword [ebp - 0x260], xmm0
mov dword [ebp - 0x250], 0x2d
mov ecx, dword [ebp - 0x44]
test cl, 0x10
jne 0x4020ed
test cl, 1
jne 0x4020ff
test cl, 0x20
jne 0x402111
test cl, 2
jne 0x402123
test cl, 4
jne 0x402135
test ecx, 0x800
jne 0x40214a
test ecx, 0x400
je 0x401bfa
mov word [ebp - 0x250], 0x6c
lea ecx, [ebp - 0x4a80]
cmp word [ecx], 0
lea ecx, [ecx + 2]
jne 0x401c00
xor edx, edx
movzx esi, word [ebp + edx - 0x260]
mov word [ecx + edx - 2], si
add edx, 2
test si, si
jne 0x401c0b
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov ecx, esi
nop dword [eax + eax]
cmp word [ecx], 0x74
je 0x401c42
add ecx, 2
cmp ecx, ebx
jb 0x401c30
jmp 0x401d19
test eax, eax
je 0x401d0c
cmp word [ebp - 0x4a80], 0
je 0x401c6a
lea ecx, [ebp - 0x4a7e]
cmp word [ecx], 0
lea ecx, [ecx + 2]
jne 0x401c5a
mov dword [ecx - 2], 0x20
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x30]
lea edi, [ebp - 0x670]
push edi
push eax
call dword [sym.imp.kernel32.dll_FileTimeToSystemTime]
lea esi, [ebp - 0x260]
push 0x104
push esi
push 0
push edi
push 1
push 0x400
call dword [sym.imp.kernel32.dll_GetDateFormatW]
cmp word [esi], 0
lea esi, [esi + 2]
jne 0x401c9a
mov dword [esi - 2], 0x20
mov eax, 0xfffffffe
lea ecx, [ebp - 0x262]
add eax, 2
cmp word [ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x401cb5
sar eax, 1
mov edx, 0x104
sub edx, eax
push edx
push ecx
push 0
push edi
push 2
push 0x400
call dword [sym.imp.kernel32.dll_GetTimeFormatW]
lea ecx, [ebp - 0x4a80]
cmp word [ecx], 0
lea ecx, [ecx + 2]
jne 0x401ce3
xor edx, edx
mov eax, dword [ebp - 0x14]
lea edi, [ebp - 0x468]
movzx esi, word [ebp + edx - 0x260]
mov word [ecx + edx - 2], si
add edx, 2
test si, si
jne 0x401cf7
mov dword [ebp - 0x14], 1
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov ecx, esi
nop dword [eax + eax]
cmp word [ecx], 0x7a
je 0x401d2f
add ecx, 2
cmp ecx, ebx
jb 0x401d20
jmp 0x401d9c
mov dword [ebp - 0x14], 1
test eax, eax
je 0x401d9c
mov eax, dword [ebp - 0x24]
cmp word [ebp - 0x4a80], 0
je 0x401d5d
lea ecx, [ebp - 0x4a7e]
cmp word [ecx], 0
lea ecx, [ecx + 2]
jne 0x401d4d
mov dword [ecx - 2], 0x20
lea ecx, [ebp - 0x260]
push eax
push 0x416294
push ecx
call dword [sym.imp.user32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401d79
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x260]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x401d84
mov edx, dword [ebp - 0x10]
mov eax, esi
nop
cmp word [eax], 0x73
je 0x401daf
add eax, 2
cmp eax, ebx
jb 0x401da0
jmp 0x401e23
cmp word [ebp - 0x4a80], 0
je 0x401dcf
lea eax, [ebp - 0x4a7e]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401dbf
mov dword [eax - 2], 0x20
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x401e23
xor ecx, ecx
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0x260], dx
add ecx, 2
test dx, dx
jne 0x401dd8
mov word [eax], 0
push 0x104
push edi
push edi
call dword [sym.imp.kernel32.dll_GetShortPathNameW]
mov eax, edi
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401e00
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x260]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
mov edx, dword [ebp - 0x10]
jne 0x401e0b
mov eax, esi
nop word cs:[eax + eax]
cmp word [eax], 0x66
je 0x401eaf
add eax, 2
cmp eax, ebx
jb 0x401e30
movzx eax, word [ebp - 0x4a80]
mov word [ebp - 0x1a], ax
test ax, ax
setne byte [ebp - 0x10]
lea eax, [ebp - 0x878]
lea ecx, [ebp - 0xa80]
mov esi, edx
lea edx, [ebp - 0x670]
push eax
push ecx
push edx
lea eax, [ebp - 0x58]
push eax
push edi
call dword [sym.imp.ucrtbase.dll__wsplitpath]
add esp, 0x14
mov eax, esi
test al, al
je 0x401e9f
xor edx, edx
movzx eax, byte [ebp - 0x10]
mov dl, al
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
cmp word [eax], 0x64
je 0x401f0a
add eax, 2
cmp eax, ebx
jb 0x401e88
xor eax, eax
mov esi, dword [ebp - 0x18]
jmp 0x401f59
mov edi, dword [ebp - 0x14]
test edi, edi
jne 0x4020c8
jmp 0x4020a5
cmp word [ebp - 0x4a80], 0
je 0x401ecf
lea eax, [ebp - 0x4a7e]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401ebf
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
nop word cs:[eax + eax]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401ee0
xor ecx, ecx
nop dword [eax + eax]
movzx edx, word [ebp + ecx - 0x468]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x401ef0
jmp 0x4020c8
cmp word [ebp - 0x1a], 0
mov esi, dword [ebp - 0x18]
je 0x401f2a
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401f1a
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401f30
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x58]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x401f3b
mov edi, 1
mov eax, 1
xor edx, edx
mov ecx, esi
cmp word [ecx], 0x70
je 0x401f6a
add ecx, 2
cmp ecx, ebx
jb 0x401f5b
jmp 0x401fb6
test edx, edx
je 0x401f84
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401f74
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401f8a
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x670]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x401f95
mov edi, 1
mov eax, 1
xor edx, edx
mov ecx, esi
cmp word [ecx], 0x6e
je 0x401fd1
add ecx, 2
cmp ecx, ebx
jb 0x401fb8
test eax, eax
sete al
test edx, edx
sete cl
jmp 0x40201a
test edx, edx
je 0x401feb
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401fdb
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x401ff1
xor ecx, ecx
movzx edx, word [ebp + ecx - 0xa80]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x401ffc
xor eax, eax
mov cl, 1
mov edi, 1
mov edx, esi
cmp word [edx], 0x78
je 0x402047
add edx, 2
cmp edx, ebx
jb 0x40201c
test al, al
je 0x401ea2
cmp word [esi], 0x73
je 0x402164
add esi, 2
cmp esi, ebx
jb 0x402031
jmp 0x401ea2
test cl, cl
jne 0x402061
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x402051
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x402067
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x878]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x402072
jmp 0x4020c8
push ecx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov word [ebp - 0x4a80], 0
mov word [ebp - 0x8a80], 0
xor eax, eax
nop word [eax + eax]
movzx ecx, word [ebp + eax - 0x8a80]
mov word [ebp + eax - 0x4a80], cx
add eax, 2
test cx, cx
jne 0x4020b0
add ebx, 2
lea eax, [ebp - 0x4a80]
push 0xffffffffffffffff
push eax
push ebx
mov eax, dword [ebp + 8]
push dword [eax]
call sym._WCMD_strsubstW
add esp, 0x10
add esp, 0x8a74
pop esi
pop edi
pop ebx
pop ebp
ret
mov word [ebp - 0x260], 0x64
test cl, 1
je 0x401bc2
mov word [ebp - 0x25e], 0x72
test cl, 0x20
je 0x401bcb
mov word [ebp - 0x25c], 0x61
test cl, 2
je 0x401bd4
mov word [ebp - 0x25a], 0x68
test cl, 4
je 0x401bdd
mov word [ebp - 0x258], 0x73
test ecx, 0x800
je 0x401be9
mov word [ebp - 0x256], 0x63
test ecx, 0x400
jne 0x401bf1
jmp 0x401bfa
cmp word [ebp - 0x4a80], 0
je 0x402184
lea eax, [ebp - 0x4a7e]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x402174
mov dword [eax - 2], 0x20
lea eax, [ebp - 0x4a80]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x40218a
xor ecx, ecx
movzx edx, word [ebp + ecx - 0x468]
mov word [eax + ecx - 2], dx
add ecx, 2
test dx, dx
jne 0x402195
jmp 0x4020c8