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

Disassembly:
push ebp
mov eax, 0x4020
mov ebp, esp
push edi
push esi
push ebx
call fcn.004246d8
sub esp, eax
movzx eax, word [0x434460]
mov esi, dword [ebp + 8]
or ax, word [0x438700]
je 0x4115c0
mov dword [esp + 0x14], 0xffffffff
mov ebx, dword [sym.imp.kernel32.dll_CompareStringW]
mov dword [esp + 0x10], 0x4274f6
mov dword [esp + 0xc], 2
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call ebx
sub esp, 0x18
cmp eax, 2
jne 0x411430
movzx eax, word [esi + 4]
lea ebx, [esi + 4]
test ax, ax
je 0x411518
cmp ax, 9
je 0x411354
cmp ax, 0x20
jne 0x41136f
add ebx, 2
movzx eax, word [ebx]
test ax, ax
je 0x411518
cmp ax, 0x20
je 0x411354
cmp ax, 9
je 0x411354
cmp ax, 0x22
je 0x4114f0
mov dword [esp + 4], 0x3d
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x411518
xor ecx, ecx
cmp word [eax + 2], 0
mov word [eax], cx
jne 0x411585
mov dword [esp], 0xfffffff6
lea esi, [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], esi
mov dword [esp], eax
call sym._WCMD_ReadFile
test eax, eax
je 0x41141e
mov eax, dword [ebp - 0x4010]
cmp eax, 1
jbe 0x41141e
xor edx, edx
mov word [ebp + eax*2 - 0x400e], dx
sub eax, 2
cmp word [ebp + eax*2 - 0x400c], 0xd
je 0x4116fc
test byte [0x425010], 8
jne 0x41170b
mov dword [esp + 4], esi
mov dword [esp], ebx
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], 0x4274c4
mov dword [esp + 0xc], 2
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call ebx
sub esp, 0x18
cmp eax, 2
je 0x4115d5
cmp word [esi], 0x22
je 0x4116a0
mov dword [esp + 4], 0x3d
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x41174c
xor edx, edx
xor ebx, ebx
cmp word [eax + 2], 0
mov word [eax], dx
jne 0x411534
test byte [0x425010], 8
jne 0x411544
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xcb
jne 0x411595
test eax, eax
jne 0x411595
mov dword [0x4386f0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call dbg.WCMD_strip_quotes
test eax, eax
je 0x411501
xor esi, esi
mov word [eax], si
test byte [0x425010], 8
jne 0x411788
cmp word [ebx], 0
jne 0x411379
mov dword [esp], 0x3f2
call sym._WCMD_LoadMessage
mov dword [esp], eax
call dbg.WCMD_output_stderr
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [eax + 2]
test byte [0x425010], 8
je 0x4114ab
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.5
mov edi, eax
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.set:_Setting_var__s_to__s_n
mov dword [esp + 8], str.WCMD_setshow_env
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x4114ab
add eax, 2
mov dword [esp], eax
call sym._WCMD_output_asis
jmp 0x4113a2
test eax, eax
je 0x4116f2
mov eax, dword [0x438528]
test eax, eax
jne 0x41141e
mov dword [0x4386f0], 0
jmp 0x41141e
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
xor edx, edx
call dbg.WCMD_setshow_sortenv
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x4014], 0
lea edi, [esi + 4]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcslen]
lea eax, [eax + eax + 2]
mov dword [esp], eax
call dbg.xalloc
mov dword [ebp - 0x4010], edi
mov ebx, eax
movzx eax, word [esi + 4]
test ax, ax
je 0x4117d1
add esi, 6
mov edx, ebx
cmp ax, 0x22
je 0x41161d
mov word [edx], ax
add edx, 2
add esi, 2
movzx eax, word [esi - 2]
test ax, ax
jne 0x411611
xor esi, esi
xor ecx, ecx
lea eax, [ebp - 0x4010]
mov dword [ebp - 0x4010], ebx
mov word [edx], si
lea edx, [ebp - 0x4014]
call dbg.WCMD_handleExpression
mov dword [esp], ebx
mov esi, eax
call dword [sym.imp.ucrtbase.dll_free]
test esi, esi
jg 0x4117bc
mov ebx, dword [0x42f344]
test ebx, ebx
jne 0x41141e
mov eax, dword [ebp - 0x4014]
lea ebx, [ebp - 0x400c]
mov dword [esp + 8], 0x427162
mov dword [esp + 4], 0x2000
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sym._swprintf.constprop.8
mov dword [esp], ebx
call sym._WCMD_output_asis
jmp 0x41141e
mov dword [esp], esi
call dbg.WCMD_strip_quotes
test eax, eax
je 0x4116b1
xor ecx, ecx
mov word [eax], cx
test byte [0x425010], 8
je 0x411473
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
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], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x411473
call dbg.WCMD_print_error
jmp 0x41141e
xor edi, edi
mov word [ebp + eax*2 - 0x400c], di
jmp 0x411401
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
mov edi, eax
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.5
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], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x41140e
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov edx, esi
call dbg.WCMD_setshow_sortenv
test eax, eax
jne 0x41141e
mov dword [esp], 0x3fb
call sym._WCMD_LoadMessage
mov dword [esp + 4], esi
mov dword [esp], eax
call dbg.WCMD_output_stderr
mov dword [0x4386f0], 1
jmp 0x41141e
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.5
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], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x41150e
mov dword [esp], esi
call sym._WCMD_LoadMessage
mov dword [esp], eax
call dbg.WCMD_output_stderr
jmp 0x41141e
mov edx, ebx
jmp 0x411629