Function at 0x41cad0
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 0x41cef8
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 0x41cc30
movzx eax, word [ebx + 4]
lea esi, [ebx + 4]
test ax, ax
jne 0x41cb60
jmp 0x41cda0
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
je 0x41cda0
cmp ax, 0x20
je 0x41cb50
cmp ax, 9
je 0x41cb50
cmp ax, 0x22
je 0x41ce20
cmp word [esi], 0
je 0x41cda0
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x41cda0
xor ecx, ecx
cmp word [eax + 2], 0
mov word [eax], cx
jne 0x41ce78
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 0x41cc25
mov eax, dword [ebp - 0x401c]
cmp eax, 1
jbe 0x41cc25
xor edx, edx
cmp word [ebp + eax*2 - 0x401c], 0xd
mov word [ebp + eax*2 - 0x401a], dx
lea edx, [eax - 2]
je 0x41d15a
test byte [0x423010], 8
jne 0x41d169
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 0x41cf30
cmp word [ebx], 0x22
je 0x41d108
mov dword [esp + 4], 0x3d
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
mov esi, eax
test eax, eax
je 0x41d2f1
xor eax, eax
cmp word [esi + 2], 0
mov word [esi], ax
jne 0x41cdc0
test byte [0x423010], 8
mov dword [ebp - 0x402c], 0
je 0x41cdd6
mov dword [ebp - 0x4030], 0x4350c4
mov eax, ebx
shr eax, 0x10
je 0x41d38c
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 0x41ceba
movzx eax, word [ebx]
test ax, ax
je 0x41d3c9
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x41cd00
mov ecx, 0x224c
mov dword [ebp - 0x4034], ebx
mov esi, ebx
mov word [ebp - 0x4018], cx
lea ecx, [ebp - 0x4016]
jmp 0x41cd6e
cmp ax, 9
je 0x41d1e0
cmp ax, 0xa
jne 0x41d1fe
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x41ce88
lea eax, [ebp - 0x3ef6]
cmp ecx, eax
ja 0x41ce88
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41d1b0
jbe 0x41cd30
cmp ax, 0x22
je 0x41d250
cmp ax, 0x5c
jne 0x41d1f1
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41cd50
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 0x41d000
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 0x41d0f0
test eax, eax
jne 0x41cf10
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 0x41ce31
xor ebx, ebx
mov word [eax], bx
test byte [0x423010], 8
je 0x41cb76
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 0x41cb76
add eax, 2
mov dword [esp], eax
call sym._WCMD_output_asis
jmp 0x41cba9
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x4034]
test edi, edi
jle 0x41d3e2
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 0x41cdd6
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 0x41cc25
mov dword [0x4231f0], 0
jmp 0x41cc25
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 0x41d40b
add ebx, 6
mov edx, esi
lea esi, [esi]
cmp ax, 0x22
je 0x41cf7c
mov word [edx], ax
add edx, 2
movzx eax, word [ebx]
add ebx, 2
test ax, ax
jne 0x41cf70
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 0x41d3b4
mov ecx, dword [0x4231c8]
test ecx, ecx
jne 0x41cc25
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 0x41cc25
shr eax, 0x10
je 0x41d36a
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 0x41ccbf
movzx eax, word [esi + 2]
test ax, ax
je 0x41d3ea
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 4], 0
jne 0x41d048
mov ecx, 0x224c
mov dword [ebp - 0x4030], ebx
mov esi, dword [ebp - 0x402c]
mov word [ebp - 0x4018], cx
lea ecx, [ebp - 0x4016]
jmp 0x41d0be
cmp ax, 9
je 0x41d1c8
cmp ax, 0xa
jne 0x41d286
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 0x41d32d
test edx, edx
jle 0x41d32d
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41d268
jbe 0x41d078
cmp ax, 0x22
je 0x41d2e0
cmp ax, 0x5c
jne 0x41d279
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x41d0a0
test eax, eax
jne 0x41cf10
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 0x41d119
xor edx, edx
mov word [eax], dx
test byte [0x423010], 8
je 0x41cc73
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 0x41cc73
xor edi, edi
mov word [ebp + edx*2 - 0x4018], di
jmp 0x41cc08
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 0x41cc15
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cd50
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41d0a0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cd50
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41d3a4
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x4382d0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x4382d0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4382d0]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x4382d0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41cd50
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41cd50
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41d0a0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41d3ac
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x4382d0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x4382d0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4382d0]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x4382d0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41d0a0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41d0a0
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov edx, ebx
call sym._WCMD_setshow_sortenv
test eax, eax
jne 0x41cc25
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 0x41cc25
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x4030]
test edi, edi
jle 0x41d403
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 0x41ccbf
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 0x41ccbf
movzx eax, bx
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x41ceba
mov byte [ecx], al
inc ecx
jmp 0x41cd50
mov byte [ecx], al
inc ecx
jmp 0x41d0a0
mov dword [esp], ebx
call sym._WCMD_LoadMessage
mov dword [esp], eax
call sym._WCMD_output_stderr
jmp 0x41cc25
mov edi, 0x224c
mov byte [ebp - 0x4016], 0x22
lea ecx, [ebp - 0x4016]
mov word [ebp - 0x4018], di
lea eax, [ecx + 1]
jmp 0x41cea9
mov esi, 0x224c
mov byte [ebp - 0x4016], 0x22
lea ecx, [ebp - 0x4016]
mov word [ebp - 0x4018], si
lea eax, [ecx + 1]
jmp 0x41d34e
mov edx, esi
jmp 0x41cf87