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

Disassembly:
mov eax, dword [0x42f344]
test eax, eax
je 0x410550
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x238
mov ecx, dword [0x430440]
mov dword [ebp - 0x228], ecx
test ecx, ecx
je 0x410391
mov eax, dword [eax + 4]
cmp dword [ecx + 0xc], eax
je 0x4103a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ecx]
mov dword [0x430440], eax
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov dword [ebp - 0x22c], eax
call sym._WCMD_dupenv
cmp word [eax], 0
mov edi, eax
je 0x410441
mov ecx, dword [sym.imp.ucrtbase.dll_wcschr]
mov edx, eax
xor esi, esi
mov dword [ebp - 0x224], edi
xor eax, eax
mov edi, esi
mov esi, edx
mov dword [ebp - 0x220], ecx
mov ebx, esi
add ebx, 2
cmp word [ebx], 0
jne 0x4103e2
mov ecx, dword [ebp - 0x224]
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 - 0x220]
call eax
test eax, eax
je 0x41042c
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 - 0x224]
add edi, ebx
mov eax, edi
lea esi, [edx + edi*2]
cmp word [esi], 0
jne 0x4103e0
mov edi, edx
mov eax, dword [sym.imp.kernel32.dll_LocalFree]
mov dword [esp], edi
mov dword [ebp - 0x230], eax
call eax
mov eax, dword [ebp - 0x22c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
mov eax, dword [ebp - 0x228]
sub esp, 4
mov edi, dword [eax + 8]
mov eax, dword [eax + 0x10]
mov dword [0x42f340], eax
test byte [0x425010], 8
jne 0x410551
cmp word [edi], 0
je 0x410511
mov ecx, dword [sym.imp.ucrtbase.dll_wcschr]
mov edx, edi
xor esi, esi
xor eax, eax
mov dword [ebp - 0x224], edi
mov edi, esi
mov esi, edx
mov dword [ebp - 0x220], ecx
lea esi, [esi]
mov ebx, esi
add ebx, 2
cmp word [ebx], 0
jne 0x4104b2
mov ecx, dword [ebp - 0x224]
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 - 0x220]
call eax
test eax, eax
je 0x4104fc
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 - 0x224]
add edi, ebx
mov eax, edi
lea esi, [edx + edi*2]
cmp word [esi], 0
jne 0x4104b0
mov edi, edx
mov eax, dword [ebp - 0x228]
movzx eax, word [eax + 4]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IsCharAlphaW]
sub esp, 4
test eax, eax
jne 0x41057e
mov dword [esp], edi
mov edi, dword [ebp - 0x230]
call edi
mov eax, dword [ebp - 0x228]
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.6
jmp 0x410484
mov eax, dword [ebp - 0x228]
lea ebx, [ebp - 0x21c]
lea esi, [ebp - 0x214]
movzx eax, word [eax + 4]
mov dword [esp + 4], 0x42871c
mov dword [esp], ebx
mov dword [esp + 8], eax
call dword [sym.imp.user32.dll_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 0x41052b
test byte [0x425010], 8
jne 0x4105e3
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
sub esp, 4
jmp 0x41052b
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.6
jmp 0x4105d2