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

Disassembly:
push ebp
mov eax, 0x1aa4
mov ebp, esp
push edi
push esi
push ebx
call fcn.004246d8
sub esp, eax
lea eax, [ebp - 0x80c]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1a94], eax
test byte [0x425010], 8
jne 0x410a53
cmp word [ebx], 0
mov eax, ebx
je 0x410674
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x410660
sub eax, ebx
cmp eax, 2
jg 0x4109d4
mov esi, dword [ebp - 0x1a94]
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov dword [esp], 0x400
mov dword [esp + 4], esi
mov dword [ebp - 0x1a98], eax
call eax
movzx edx, word [ebx]
sub esp, 8
test dx, dx
jne 0x4106f0
cmp word [ebp - 0x80c], 0
je 0x410c47
mov edx, esi
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4106b0
xor eax, eax
mov ecx, 0xd
jmp 0x4106c9
movzx ecx, word [eax + 0x427120]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4106c2
mov eax, dword [ebp - 0x1a94]
mov dword [esp], eax
call sym._WCMD_output_asis
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x100c]
mov eax, edi
lea esi, [esi]
nop
cmp dx, 0x22
je 0x41070c
mov word [eax], dx
add eax, 2
add ebx, 2
movzx edx, word [ebx]
test dx, dx
jne 0x410700
cmp eax, edi
jbe 0x410747
movzx edx, word [eax - 2]
cmp dx, 9
je 0x410730
cmp dx, 0x20
jne 0x410747
lea esi, [esi]
nop
sub eax, 2
cmp eax, edi
jbe 0x410747
movzx edx, word [eax - 2]
cmp dx, 0x20
je 0x410730
cmp dx, 9
je 0x410730
xor edx, edx
lea esi, [ebp - 0x125c]
mov word [eax], dx
test byte [0x425010], 8
jne 0x410b05
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_FindFirstFileW]
sub esp, 8
mov ebx, eax
cmp eax, 0xffffffff
jne 0x410878
test byte [0x425010], 8
jne 0x410924
mov dword [esp], edi
mov ebx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
call ebx
sub esp, 4
test eax, eax
je 0x410da3
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x1a98]
mov dword [esp], 0x400
call eax
sub esp, 8
mov dword [esp + 4], 0x42875e
mov dword [esp], 0x438700
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x410bf4
cmp word [ebp - 0x100a], 0x3a
jne 0x4106e3
movzx eax, word [ebp - 0x100c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IsCharAlphaW]
sub esp, 4
test eax, eax
je 0x4106e3
xor eax, eax
mov edx, 0x3d
lea esi, [ebp - 0x1464]
jmp 0x410817
movzx edx, word [eax + 0x427126]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x410810
mov eax, dword [ebp - 0x100c]
mov dword [ebp - 0x1462], eax
xor eax, eax
mov word [ebp - 0x145e], ax
test byte [0x425010], 8
jne 0x41101a
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
jmp 0x4106e3
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x41090b
test byte [ebp - 0x125c], 0x10
je 0x410860
lea edx, [ebp - 0x1a7c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], 0x104
mov dword [esp], edi
call sym._WCMD_get_fullpath
test eax, eax
je 0x4106e3
lea esi, [ebp - 0x1464]
lea eax, [ebp - 0x166c]
lea edx, [ebp - 0x1a7c]
mov dword [esp + 0x10], esi
lea esi, [ebp - 0x1a90]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1874]
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 4], esi
call dword [sym.imp.ucrtbase.dll__wsplitpath]
lea edx, [ebp - 0x1230]
mov dword [esp], edi
lea eax, [ebp - 0x1874]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str._s_s_s
call dword [sym.imp.user32.dll_wsprintfW]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
test byte [0x425010], 8
je 0x410787
mov eax, edi
shr eax, 0x10
je 0x411002
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ebx, eax
sub esp, 8
mov eax, 0x427175
test ebx, ebx
jne 0x410e12
cmp word [ebp - 0x100c], 0
je 0x41096a
lea esi, [esi]
add ebx, 1
cmp word [edi + ebx*2], 0
jne 0x410960
mov eax, 0x224c
lea edx, [ebp - 0x1462]
mov ecx, edi
mov word [ebp - 0x1464], ax
nop
lea esi, [ebx - 1]
test ebx, ebx
jle 0x410de7
lea eax, [ebp - 0x1342]
cmp edx, eax
ja 0x410de7
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x410fb5
ja 0x410dc0
cmp ax, 9
je 0x410fa2
cmp ax, 0xa
jne 0x410f42
mov eax, 0x6e5c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x410980
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x42875e
mov dword [esp + 0xc], 2
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x410674
movzx eax, word [ebx + 4]
lea edx, [ebx + 4]
mov ebx, edx
test ax, ax
je 0x410674
cmp ax, 9
je 0x410a33
cmp ax, 0x20
jne 0x410674
add ebx, 2
movzx eax, word [ebx]
test ax, ax
je 0x410674
cmp ax, 0x20
je 0x410a33
cmp ax, 9
je 0x410a33
jmp 0x410674
test ebx, ebx
je 0x410fc8
mov eax, ebx
shr eax, 0x10
je 0x410bb4
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x427175
test edi, edi
jne 0x410bc7
cmp word [ebx], 0
je 0x410a9a
nop
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x410a90
mov eax, 0x224c
mov dword [ebp + 8], ebx
mov ecx, ebx
lea edx, [ebp - 0x80a]
mov word [ebp - 0x80c], ax
lea esi, [edi - 1]
test edi, edi
jle 0x410e40
lea eax, [ebp - 0x6ea]
cmp edx, eax
ja 0x410e40
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x410d00
ja 0x410c52
cmp ax, 9
je 0x410d73
cmp ax, 0xa
jne 0x410d13
mov eax, 0x6e5c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x410ab1
mov eax, edi
shr eax, 0x10
je 0x410fd2
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x427175
test edx, edx
jne 0x410cd2
cmp word [ebp - 0x100c], 0
je 0x410b4a
lea esi, [esi]
add edx, 1
cmp word [edi + edx*2], 0
jne 0x410b40
mov eax, 0x224c
lea ecx, [ebp - 0x125a]
mov ebx, edi
mov word [ebp - 0x125c], ax
nop
lea eax, [ebp - 0x113a]
lea esi, [edx - 1]
cmp ecx, eax
ja 0x410ca7
test edx, edx
jle 0x410ca7
add ebx, 2
movzx eax, word [ebx - 2]
cmp ax, 0xd
je 0x410e80
ja 0x410c80
cmp ax, 9
je 0x410ef3
cmp ax, 0xa
jne 0x410e93
mov eax, 0x6e5c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410b60
movzx eax, bx
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
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 + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x41064e
cmp word [0x434462], 0x3a
jne 0x4107d0
movzx eax, word [0x434460]
mov esi, dword [sym.imp.ucrtbase.dll_towupper]
mov dword [esp], eax
call esi
mov word [ebp - 0x1a98], ax
movzx eax, word [ebp - 0x80c]
mov dword [esp], eax
call esi
cmp word [ebp - 0x1a98], ax
je 0x4107d0
mov eax, dword [ebp - 0x1a94]
mov dword [esp], eax
call ebx
sub esp, 4
jmp 0x4107d0
mov edx, dword [ebp - 0x1a94]
jmp 0x4106b9
cmp ax, 0x22
je 0x410d90
cmp ax, 0x5c
jne 0x410d13
mov ebx, 0x5c5c
add edx, 2
mov edi, esi
mov word [edx - 2], bx
jmp 0x410ab1
cmp ax, 0x22
je 0x410f10
cmp ax, 0x5c
jne 0x410e93
mov eax, 0x5c5c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410b60
mov byte [ecx], 0x22
lea eax, [ecx + 1]
test esi, esi
jle 0x410cc1
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea esi, [ebp - 0x125c]
mov byte [eax], 0
mov dword [esp], esi
call dbg.__wine_dbg_strdup
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 + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x41075f
mov eax, 0x725c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x410ab1
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x410f36
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefWCMD_choice]
and edi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov edi, esi
mov byte [edx - 2], bl
jmp 0x410ab1
mov eax, 0x745c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x410ab1
mov edi, 0x225c
add edx, 2
mov word [edx - 2], di
mov edi, esi
jmp 0x410ab1
mov dword [0x4386f0], 1
call dbg.WCMD_print_error
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ax, 0x22
je 0x410f23
cmp ax, 0x5c
jne 0x410f42
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
mov ebx, esi
jmp 0x410980
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x410e01
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
lea esi, [ebp - 0x1464]
mov byte [eax], 0
mov dword [esp], esi
call dbg.__wine_dbg_strdup
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 + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x410787
mov ebx, dword [ebp + 8]
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x410e5d
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x80c]
mov dword [esp], eax
mov dword [ebp - 0x1a94], eax
call dbg.__wine_dbg_strdup
jmp 0x410bc7
mov eax, 0x725c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410b60
lea edx, [eax - 0x20]
cmp dx, 0x5e
jbe 0x410fea
mov edx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr dx, 0xc
movzx edx, dx
movzx edx, byte [edx + str.0123456789abcdefWCMD_choice]
mov byte [ecx - 4], dl
mov edx, eax
shr dx, 8
and edx, 0xf
movzx edx, byte [edx + str.0123456789abcdefWCMD_choice]
mov byte [ecx - 3], dl
mov edx, eax
and eax, 0xf
shr dx, 4
movzx eax, byte [eax + str.0123456789abcdefWCMD_choice]
and edx, 0xf
movzx edx, byte [edx + str.0123456789abcdefWCMD_choice]
mov byte [ecx - 1], al
mov byte [ecx - 2], dl
mov edx, esi
jmp 0x410b60
mov eax, 0x745c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410b60
mov eax, 0x225c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410b60
mov eax, 0x225c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x410980
mov byte [edx], al
mov edi, esi
add edx, 1
jmp 0x410ab1
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x410ff6
mov ebx, eax
mov byte [edx], 0x5c
add edx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefWCMD_choice]
mov byte [edx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefWCMD_choice]
mov byte [edx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + str.0123456789abcdefWCMD_choice]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov byte [edx - 2], bl
mov ebx, esi
jmp 0x410980
mov eax, 0x745c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x410980
mov eax, 0x725c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x410980
mov eax, 0x42716e
jmp 0x410bc7
movzx eax, di
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x410cd2
mov byte [ecx], al
mov edx, esi
add ecx, 1
jmp 0x410b60
mov byte [edx], al
mov ebx, esi
add edx, 1
jmp 0x410980
movzx eax, di
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x410e12
mov eax, edi
call sym._wine_dbgstr_wn.constprop.5
mov ebx, eax
mov eax, esi
call sym._wine_dbgstr_wn.constprop.5
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Setting__s_to__s_n
mov dword [esp + 8], str.WCMD_setshow_default
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x410845