Function at 0x41cc40
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov eax, 0x402c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00401050
sub esp, eax
movzx eax, word [0x428560]
mov ebx, dword [ebp + 8]
or ax, word [0x430580]
je 0x41d068
mov dword [esp + 0x14], 0xffffffff
mov esi, dword [sym.imp.kernel32.dll_CompareStringW]
mov dword [esp + 0x10], 0x4359b2
mov dword [esp + 0xc], 2
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call esi
sub esp, 0x18
cmp eax, 2
jne 0x41cda0
movzx eax, word [ebx + 4]
lea esi, [ebx + 4]
test ax, ax
jne 0x41ccd0
jmp 0x41cf10
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
je 0x41cf10
cmp ax, 0x20
je 0x41ccc0
cmp ax, 9
je 0x41ccc0
cmp ax, 0x22
je 0x41cf90
cmp word [esi], 0
je 0x41cf10
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x41cf10
xor ecx, ecx
cmp word [eax + 2], 0
mov word [eax], cx
jne 0x41cfe8
mov dword [esp], 0xfffffff6
lea ebx, [ebp - 0x400c]
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x4010]
sub esp, 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x2000
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._WCMD_ReadFile
test eax, eax
je 0x41cd95
mov eax, dword [ebp - 0x4010]
cmp eax, 1
jbe 0x41cd95
xor edx, edx
cmp word [ebp + eax*2 - 0x4010], 0xd
mov word [ebp + eax*2 - 0x400e], dx
lea edx, [eax - 2]
je 0x41d2ca
test byte [0x423010], 8
jne 0x41d2d9
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x435980
mov dword [esp + 0xc], 2
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call esi
sub esp, 0x18
cmp eax, 2
je 0x41d0a0
cmp word [ebx], 0x22
je 0x41d278
mov dword [esp + 4], 0x3d
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
mov esi, eax
test eax, eax
je 0x41d461
xor eax, eax
cmp word [esi + 2], 0
mov word [esi], ax
jne 0x41cf30
test byte [0x423010], 8
mov dword [ebp - 0x4018], 0
je 0x41cf46
mov dword [ebp - 0x401c], 0x4350c4
mov eax, ebx
shr eax, 0x10
je 0x41d4fc
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4350cb
test ecx, ecx
jne 0x41d02a
movzx eax, word [ebx]
test ax, ax
je 0x41d539
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x41ce70
mov ecx, 0x224c
mov dword [ebp - 0x4020], ebx
mov esi, ebx
mov word [ebp - 0x400c], cx
lea ecx, [ebp - 0x400a]
jmp 0x41cede
cmp ax, 9
je 0x41d350
cmp ax, 0xa
jne 0x41d36e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x41cff8
lea eax, [ebp - 0x3eea]
cmp ecx, eax
ja 0x41cff8
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41d320
jbe 0x41cea0
cmp ax, 0x22
je 0x41d3c0
cmp ax, 0x5c
jne 0x41d361
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41cec0
mov dword [esp], 0x3f2
call sym._WCMD_LoadMessage
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_output_stderr
lea eax, [esi + 2]
mov dword [ebp - 0x4018], eax
test byte [0x423010], 8
jne 0x41d170
mov eax, dword [ebp - 0x4018]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xcb
jne 0x41d260
test eax, eax
jne 0x41d080
mov dword [0x423344], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call sym._WCMD_strip_quotes
test eax, eax
je 0x41cfa1
xor ebx, ebx
mov word [eax], bx
test byte [0x423010], 8
je 0x41cce6
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.set:_Stripped_command_line__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WCMD_setshow_env
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41cce6
add eax, 2
mov dword [esp], eax
call sym._WCMD_output_asis
jmp 0x41cd19
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x4020]
test edi, edi
jle 0x41d552
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edi, dword [ebp - 0x401c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set:_Setting_var__s_to__s_n
mov dword [esp + 0x14], edi
mov dword [esp + 8], str.WCMD_setshow_env
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41cf46
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
lea esp, [ebp - 0xc]
xor edx, edx
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_setshow_sortenv
mov ebx, dword [0x423448]
test ebx, ebx
jne 0x41cd95
mov dword [0x423344], 0
jmp 0x41cd95
mov dword [ebp - 0x4014], 0
lea edi, [ebx + 4]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 2]
mov dword [esp], eax
call sym._xalloc
mov dword [ebp - 0x4010], edi
mov esi, eax
movzx eax, word [ebx + 4]
test ax, ax
je 0x41d57b
add ebx, 6
mov edx, esi
lea esi, [esi]
cmp ax, 0x22
je 0x41d0ec
mov word [edx], ax
add edx, 2
movzx eax, word [ebx]
add ebx, 2
test ax, ax
jne 0x41d0e0
xor ebx, ebx
xor ecx, ecx
lea eax, [ebp - 0x4010]
mov dword [ebp - 0x4010], esi
mov word [edx], bx
lea edx, [ebp - 0x4014]
call sym._WCMD_handleExpression
mov dword [esp], esi
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
jg 0x41d524
mov ecx, dword [0x4231c8]
test ecx, ecx
jne 0x41cd95
mov eax, dword [ebp - 0x4014]
lea ebx, [ebp - 0x400c]
mov dword [esp + 8], 0x4350d6
mov dword [esp + 4], 0x2000
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sym._swprintf.constprop.0
mov dword [esp], ebx
call sym._WCMD_output_asis
jmp 0x41cd95
shr eax, 0x10
je 0x41d4da
mov eax, dword [ebp - 0x4018]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x401c], 0x4350cb
sub esp, 8
mov ecx, eax
test eax, eax
jne 0x41ce2f
movzx eax, word [esi + 2]
test ax, ax
je 0x41d55a
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 4], 0
jne 0x41d1b8
mov ecx, 0x224c
mov dword [ebp - 0x401c], ebx
mov esi, dword [ebp - 0x4018]
mov word [ebp - 0x400c], cx
lea ecx, [ebp - 0x400a]
jmp 0x41d22e
cmp ax, 9
je 0x41d338
cmp ax, 0xa
jne 0x41d3f6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [ebp - 0x3eea]
lea edi, [edx - 1]
cmp ecx, eax
ja 0x41d49d
test edx, edx
jle 0x41d49d
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41d3d8
jbe 0x41d1e8
cmp ax, 0x22
je 0x41d450
cmp ax, 0x5c
jne 0x41d3e9
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x41d210
test eax, eax
jne 0x41d080
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_print_error
mov dword [esp], ebx
call sym._WCMD_strip_quotes
test eax, eax
je 0x41d289
xor edx, edx
mov word [eax], dx
test byte [0x423010], 8
je 0x41cde3
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0xc], str.set:_Stripped_command_line__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WCMD_setshow_env
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41cde3
xor edi, edi
mov word [ebp + edx*2 - 0x400c], di
jmp 0x41cd78
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.0
mov edi, eax
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set__p:_Setting_var__s_to__s_n
mov dword [esp + 8], str.WCMD_setshow_env
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41cd85
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cec0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41d210
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cec0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41d514
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438310]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438310]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438310]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438310]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41cec0
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cec0
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41d210
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41d51c
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438310]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438310]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438310]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438310]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41d210
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41d210
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov edx, ebx
call sym._WCMD_setshow_sortenv
test eax, eax
jne 0x41cd95
mov dword [esp], 0x3fb
call sym._WCMD_LoadMessage
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._WCMD_output_stderr
mov dword [0x423344], 1
jmp 0x41cd95
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x401c]
test edi, edi
jle 0x41d573
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x401c], eax
jmp 0x41ce2f
movzx eax, word [ebp - 0x4018]
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x401c], eax
jmp 0x41ce2f
movzx eax, bx
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x41d02a
mov byte [ecx], al
inc ecx
jmp 0x41cec0
mov byte [ecx], al
inc ecx
jmp 0x41d210
mov dword [esp], ebx
call sym._WCMD_LoadMessage
mov dword [esp], eax
call sym._WCMD_output_stderr
jmp 0x41cd95
mov edi, 0x224c
mov byte [ebp - 0x400a], 0x22
lea ecx, [ebp - 0x400a]
mov word [ebp - 0x400c], di
lea eax, [ecx + 1]
jmp 0x41d019
mov esi, 0x224c
mov byte [ebp - 0x400a], 0x22
lea ecx, [ebp - 0x400a]
mov word [ebp - 0x400c], si
lea eax, [ecx + 1]
jmp 0x41d4be
mov edx, esi
jmp 0x41d0f7