Function at 0x407930
Capabilities:
Enumerate files on windows
Get common file path
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1a84
call sym.__alloca
mov esi, dword [ebp + 8]
test byte [0x41d010], 8
je 0x407979
mov ecx, esi
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Request_change_to_directory__s_n
mov dword [esp + 8], str.WCMD_setshow_default
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
mov eax, 0xfffffffe
nop
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x407980
cmp eax, 3
jl 0x4079d0
push 0xffffffffffffffff
push 0x4177d2
push 2
push esi
push 0x1001
push 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
cmp eax, 2
jne 0x4079d0
add esi, 4
jmp 0x4079c3
add esi, 2
movzx eax, word [esi]
cmp eax, 0x20
je 0x4079c0
cmp eax, 9
je 0x4079c0
lea edi, [ebp - 0x1a90]
push edi
push 0x400
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
movzx ecx, word [esi]
test cx, cx
je 0x407a20
add esi, 2
lea eax, [ebp - 0xc78]
jmp 0x407a06
movzx ecx, word [esi]
add esi, 2
cmp cx, 0x22
je 0x407a00
movzx edx, cx
test edx, edx
je 0x407a4a
mov word [eax], cx
add eax, 2
jmp 0x407a00
cmp word [edi], 0
lea edi, [edi + 2]
jne 0x407a20
mov word [edi + 2], 0
mov dword [edi - 2], 0xa000d
lea eax, [ebp - 0x1a90]
push eax
call sym._WCMD_output_asis
add esp, 4
jmp 0x407cc8
lea ebx, [ebp - 0xc78]
jmp 0x407a63
add eax, 0xfffffffe
cmp eax, ebx
jbe 0x407a75
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x407a60
cmp ecx, 9
je 0x407a60
mov word [eax], 0
test byte [0x41d010], 8
je 0x407ab4
lea ecx, [ebp - 0xc78]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Looking_for_directory__s_n
mov dword [esp + 8], str.WCMD_setshow_default
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
lea eax, [ebp - 0x478]
push eax
push ebx
call dword [sym.imp.kernel32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x407b75
mov esi, eax
mov ebx, dword [sym.imp.kernel32.dll_FindNextFileW]
nop word cs:[eax + eax]
test byte [ebp - 0x478], 0x10
jne 0x407af9
lea eax, [ebp - 0x478]
push eax
push esi
call ebx
test eax, eax
jne 0x407ae0
jmp 0x407b68
lea ebx, [ebp - 0x228]
push 0
push ebx
push 0x104
lea eax, [ebp - 0xc78]
push eax
call dbg.WCMD_get_fullpath
add esp, 0x10
test eax, eax
je 0x407cc8
lea edx, [ebp - 0xe80]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x1088]
push ecx
lea ecx, [ebp - 0x1290]
push ecx
push edx
push eax
push ebx
call dword [sym.imp.ucrtbase.dll__wsplitpath]
add esp, 0x14
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0xe80]
push eax
lea eax, [ebp - 0x20]
push eax
push str._s_s_s
lea eax, [ebp - 0xc78]
push eax
call dword [sym.imp.user32.dll_wsprintfW]
add esp, 0x14
push esi
call dword [sym.imp.kernel32.dll_FindClose]
lea ebx, [ebp - 0xc78]
test byte [0x41d010], 8
je 0x407baf
lea ecx, [ebp - 0xc78]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Really_changing_to_directory__s_n
mov dword [esp + 8], str.WCMD_setshow_default
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
push ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x407cb8
push ebx
push 0x400
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov eax, dword [0x418754]
push 0x4177d2
push eax
call dword [sym.imp.ucrtbase.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x407c1a
mov eax, dword [0x4162c8]
cmp word [eax + 2], 0x3a
jne 0x407c1a
movzx eax, word [eax]
mov esi, dword [sym.imp.ucrtbase.dll_towupper]
push eax
call esi
mov ecx, esi
add esp, 4
mov esi, eax
movzx eax, word [ebp - 0x1a90]
push eax
call ecx
add esp, 4
cmp si, ax
je 0x407c1a
push edi
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
cmp word [ebp - 0xc76], 0x3a
jne 0x407cc8
movzx eax, word [ebp - 0xc78]
push eax
call dword [sym.imp.user32.dll_IsCharAlphaW]
test eax, eax
je 0x407cc8
mov dword [ebp - 0x228], 0x3d
mov eax, dword [ebp - 0xc78]
mov dword [ebp - 0x226], eax
mov word [ebp - 0x222], 0
test byte [0x41d010], 8
je 0x407ca8
lea ecx, [ebp - 0x228]
call dbg.wine_dbgstr_wn
mov esi, eax
lea ecx, [ebp - 0xc78]
call dbg.wine_dbgstr_wn
sub esp, 0x18
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Setting__s_to__s_n
mov dword [esp + 8], str.WCMD_setshow_default
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x18
lea eax, [ebp - 0x228]
push ebx
push eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
jmp 0x407cc8
mov eax, dword [0x4162c0]
mov dword [eax], 1
call dbg.WCMD_print_error
add esp, 0x1a84
pop esi
pop edi
pop ebx
pop ebp
ret