Function at 0x410190
Capabilities:
Query environment variable
Set current directory
Set environment variable

Disassembly:
mov eax, dword [0x42e0c4]
test eax, eax
je 0x410380
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x25c
mov ecx, dword [0x42f1c0]
mov dword [ebp - 0x234], ecx
test ecx, ecx
je 0x4101c1
mov eax, dword [eax + 4]
cmp dword [ecx + 0xc], eax
je 0x4101d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ecx]
mov dword [0x42f1c0], eax
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov dword [ebp - 0x238], eax
call sym._WCMD_dupenv
cmp word [eax], 0
mov edi, eax
je 0x410271
mov ecx, dword [sym.imp.ucrtbase.dll_wcschr]
mov edx, eax
xor esi, esi
mov dword [ebp - 0x230], edi
xor eax, eax
mov edi, esi
mov esi, edx
mov dword [ebp - 0x22c], ecx
mov ebx, esi
add ebx, 2
cmp word [ebx], 0
jne 0x410212
mov ecx, dword [ebp - 0x230]
sub ebx, esi
mov dword [esp + 4], 0x3d
sar ebx, 1
lea eax, [ecx + eax*2 + 2]
add ebx, 1
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call eax
test eax, eax
je 0x41025c
xor ecx, ecx
mov word [eax], cx
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edx, dword [ebp - 0x230]
add edi, ebx
mov eax, edi
lea esi, [edx + edi*2]
cmp word [esi], 0
jne 0x410210
mov edi, edx
mov eax, dword [sym.imp.kernel32.dll_LocalFree]
mov dword [esp], edi
mov dword [ebp - 0x23c], eax
call eax
mov eax, dword [ebp - 0x238]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
mov eax, dword [ebp - 0x234]
sub esp, 4
mov edi, dword [eax + 8]
mov eax, dword [eax + 0x10]
mov dword [0x42e0c0], eax
test byte [0x425010], 8
jne 0x410381
cmp word [edi], 0
je 0x410341
mov ecx, dword [sym.imp.ucrtbase.dll_wcschr]
mov edx, edi
xor esi, esi
xor eax, eax
mov dword [ebp - 0x230], edi
mov edi, esi
mov esi, edx
mov dword [ebp - 0x22c], ecx
lea esi, [esi]
mov ebx, esi
add ebx, 2
cmp word [ebx], 0
jne 0x4102e2
mov ecx, dword [ebp - 0x230]
sub ebx, esi
mov dword [esp + 4], 0x3d
sar ebx, 1
lea eax, [ecx + eax*2 + 2]
add ebx, 1
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call eax
test eax, eax
je 0x41032c
xor edx, edx
add eax, 2
mov word [eax - 2], dx
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
mov edx, dword [ebp - 0x230]
add edi, ebx
mov eax, edi
lea esi, [edx + edi*2]
cmp word [esi], 0
jne 0x4102e0
mov edi, edx
mov eax, dword [ebp - 0x234]
movzx eax, word [eax + 4]
mov dword [esp], eax
call sym._IsCharAlphaW_4
sub esp, 4
test eax, eax
jne 0x4103ae
mov dword [esp], edi
mov edi, dword [ebp - 0x23c]
call edi
mov eax, dword [ebp - 0x234]
sub esp, 4
mov dword [esp], eax
call edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
ret
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Delayed_expansion_now__d_n
mov dword [esp + 8], str.WCMD_endlocal
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.9
jmp 0x4102b4
mov eax, dword [ebp - 0x234]
lea ebx, [ebp - 0x228]
lea esi, [ebp - 0x220]
movzx eax, word [eax + 4]
mov dword [esp + 4], 0x4276fc
mov dword [esp], ebx
mov dword [esp + 8], eax
call sym._wsprintfW
mov dword [esp + 8], 0x104
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
je 0x41035a
test byte [0x425010], 8
jne 0x410412
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
sub esp, 4
jmp 0x41035a
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
mov dword [esp + 0xc], str.Resetting_cwd_to__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WCMD_endlocal
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.9
jmp 0x410401