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

Disassembly:
push ebp
mov eax, 0x404c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00401050
sub esp, eax
movzx eax, word [0x428400]
mov ebx, dword [ebp + 8]
or ax, word [0x430420]
je 0x41c9a8
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 0x41c6e0
movzx eax, word [ebx + 4]
lea esi, [ebx + 4]
test ax, ax
jne 0x41c610
jmp 0x41c850
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
je 0x41c850
cmp ax, 0x20
je 0x41c600
cmp ax, 9
je 0x41c600
cmp ax, 0x22
je 0x41c8d0
cmp word [esi], 0
je 0x41c850
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x41c850
xor ecx, ecx
cmp word [eax + 2], 0
mov word [eax], cx
jne 0x41c928
mov dword [esp], 0xfffffff6
lea ebx, [ebp - 0x4018]
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea edx, [ebp - 0x401c]
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 0x41c6d5
mov eax, dword [ebp - 0x401c]
cmp eax, 1
jbe 0x41c6d5
xor edx, edx
cmp word [ebp + eax*2 - 0x401c], 0xd
mov word [ebp + eax*2 - 0x401a], dx
lea edx, [eax - 2]
je 0x41cc0a
test byte [0x423010], 8
jne 0x41cc19
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 0x41c9e0
cmp word [ebx], 0x22
je 0x41cbb8
mov dword [esp + 4], 0x3d
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
mov esi, eax
test eax, eax
je 0x41cda1
xor eax, eax
cmp word [esi + 2], 0
mov word [esi], ax
jne 0x41c870
test byte [0x423010], 8
mov dword [ebp - 0x402c], 0
je 0x41c886
mov dword [ebp - 0x4030], 0x4350c4
mov eax, ebx
shr eax, 0x10
je 0x41ce3c
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 0x41c96a
movzx eax, word [ebx]
test ax, ax
je 0x41ce79
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x41c7b0
mov ecx, 0x224c
mov dword [ebp - 0x4034], ebx
mov esi, ebx
mov word [ebp - 0x4018], cx
lea ecx, [ebp - 0x4016]
jmp 0x41c81e
cmp ax, 9
je 0x41cc90
cmp ax, 0xa
jne 0x41ccae
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x41c938
lea eax, [ebp - 0x3ef6]
cmp ecx, eax
ja 0x41c938
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41cc60
jbe 0x41c7e0
cmp ax, 0x22
je 0x41cd00
cmp ax, 0x5c
jne 0x41cca1
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41c800
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 - 0x402c], eax
test byte [0x423010], 8
jne 0x41cab0
mov eax, dword [ebp - 0x402c]
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 0x41cba0
test eax, eax
jne 0x41c9c0
mov dword [0x4231f0], 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 0x41c8e1
xor ebx, ebx
mov word [eax], bx
test byte [0x423010], 8
je 0x41c626
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 0x41c626
add eax, 2
mov dword [esp], eax
call sym._WCMD_output_asis
jmp 0x41c659
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x4034]
test edi, edi
jle 0x41ce92
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x4018]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edi, dword [ebp - 0x4030]
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 0x41c886
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 [0x4232e8]
test ebx, ebx
jne 0x41c6d5
mov dword [0x4231f0], 0
jmp 0x41c6d5
mov dword [ebp - 0x4020], 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 - 0x401c], edi
mov esi, eax
movzx eax, word [ebx + 4]
test ax, ax
je 0x41cebb
add ebx, 6
mov edx, esi
lea esi, [esi]
cmp ax, 0x22
je 0x41ca2c
mov word [edx], ax
add edx, 2
movzx eax, word [ebx]
add ebx, 2
test ax, ax
jne 0x41ca20
xor ebx, ebx
xor ecx, ecx
lea eax, [ebp - 0x401c]
mov dword [ebp - 0x401c], esi
mov word [edx], bx
lea edx, [ebp - 0x4020]
call sym._WCMD_handleExpression
mov dword [esp], esi
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_free]
test ebx, ebx
jg 0x41ce64
mov ecx, dword [0x4231c8]
test ecx, ecx
jne 0x41c6d5
mov eax, dword [ebp - 0x4020]
lea ebx, [ebp - 0x4018]
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 0x41c6d5
shr eax, 0x10
je 0x41ce1a
mov eax, dword [ebp - 0x402c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x4030], 0x4350cb
sub esp, 8
mov ecx, eax
test eax, eax
jne 0x41c76f
movzx eax, word [esi + 2]
test ax, ax
je 0x41ce9a
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 4], 0
jne 0x41caf8
mov ecx, 0x224c
mov dword [ebp - 0x4030], ebx
mov esi, dword [ebp - 0x402c]
mov word [ebp - 0x4018], cx
lea ecx, [ebp - 0x4016]
jmp 0x41cb6e
cmp ax, 9
je 0x41cc78
cmp ax, 0xa
jne 0x41cd36
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [ebp - 0x3ef6]
lea edi, [edx - 1]
cmp ecx, eax
ja 0x41cddd
test edx, edx
jle 0x41cddd
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41cd18
jbe 0x41cb28
cmp ax, 0x22
je 0x41cd90
cmp ax, 0x5c
jne 0x41cd29
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x41cb50
test eax, eax
jne 0x41c9c0
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 0x41cbc9
xor edx, edx
mov word [eax], dx
test byte [0x423010], 8
je 0x41c723
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 0x41c723
xor edi, edi
mov word [ebp + edx*2 - 0x4018], di
jmp 0x41c6b8
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 0x41c6c5
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c800
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cb50
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c800
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41ce54
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438130]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438130]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438130]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438130]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41c800
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c800
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cb50
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41ce5c
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438130]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438130]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438130]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438130]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41cb50
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41cb50
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov edx, ebx
call sym._WCMD_setshow_sortenv
test eax, eax
jne 0x41c6d5
mov dword [esp], 0x3fb
call sym._WCMD_LoadMessage
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._WCMD_output_stderr
mov dword [0x4231f0], 1
jmp 0x41c6d5
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x4030]
test edi, edi
jle 0x41ceb3
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x4018]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x4030], eax
jmp 0x41c76f
movzx eax, word [ebp - 0x402c]
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x4030], eax
jmp 0x41c76f
movzx eax, bx
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x41c96a
mov byte [ecx], al
inc ecx
jmp 0x41c800
mov byte [ecx], al
inc ecx
jmp 0x41cb50
mov dword [esp], ebx
call sym._WCMD_LoadMessage
mov dword [esp], eax
call sym._WCMD_output_stderr
jmp 0x41c6d5
mov edi, 0x224c
mov byte [ebp - 0x4016], 0x22
lea ecx, [ebp - 0x4016]
mov word [ebp - 0x4018], di
lea eax, [ecx + 1]
jmp 0x41c959
mov esi, 0x224c
mov byte [ebp - 0x4016], 0x22
lea ecx, [ebp - 0x4016]
mov word [ebp - 0x4018], si
lea eax, [ecx + 1]
jmp 0x41cdfe
mov edx, esi
jmp 0x41ca37