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

Disassembly:
push ebp
mov eax, 0x1acc
mov ebp, esp
push edi
push esi
push ebx
call fcn.004240d8
sub esp, eax
lea eax, [ebp - 0x818]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1aac], eax
test byte [0x425010], 8
jne 0x410883
cmp word [ebx], 0
mov eax, ebx
je 0x4104a4
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x410490
sub eax, ebx
cmp eax, 2
jg 0x410804
mov esi, dword [ebp - 0x1aac]
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov dword [esp], 0x400
mov dword [esp + 4], esi
mov dword [ebp - 0x1ab0], eax
call eax
movzx edx, word [ebx]
sub esp, 8
test dx, dx
jne 0x410520
cmp word [ebp - 0x818], 0
je 0x410a75
mov edx, esi
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4104e0
xor eax, eax
mov ecx, 0xd
jmp 0x4104f9
movzx ecx, word [eax + 0x426120]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4104f2
mov eax, dword [ebp - 0x1aac]
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 - 0x1018]
mov eax, edi
lea esi, [esi]
nop
cmp dx, 0x22
je 0x41053c
mov word [eax], dx
add eax, 2
add ebx, 2
movzx edx, word [ebx]
test dx, dx
jne 0x410530
cmp eax, edi
jbe 0x410577
movzx edx, word [eax - 2]
cmp dx, 9
je 0x410560
cmp dx, 0x20
jne 0x410577
lea esi, [esi]
nop
sub eax, 2
cmp eax, edi
jbe 0x410577
movzx edx, word [eax - 2]
cmp dx, 0x20
je 0x410560
cmp dx, 9
je 0x410560
xor edx, edx
lea esi, [ebp - 0x1268]
mov word [eax], dx
test byte [0x425010], 8
jne 0x410935
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 0x4106a8
test byte [0x425010], 8
jne 0x410753
mov dword [esp], edi
mov ebx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
call ebx
sub esp, 4
test eax, eax
je 0x410bd3
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x1ab0]
mov dword [esp], 0x400
call eax
sub esp, 8
mov dword [esp + 4], 0x42773e
mov dword [esp], 0x437480
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x410a24
cmp word [ebp - 0x1016], 0x3a
jne 0x410513
movzx eax, word [ebp - 0x1018]
mov dword [esp], eax
call sym._IsCharAlphaW_4
sub esp, 4
test eax, eax
je 0x410513
xor eax, eax
mov edx, 0x3d
lea esi, [ebp - 0x1470]
jmp 0x410647
movzx edx, word [eax + 0x426126]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x410640
mov eax, dword [ebp - 0x1018]
mov dword [ebp - 0x146e], eax
xor eax, eax
mov word [ebp - 0x146a], ax
test byte [0x425010], 8
jne 0x410e4a
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
jmp 0x410513
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x41073a
test byte [ebp - 0x1268], 0x10
je 0x410690
lea edx, [ebp - 0x1a88]
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 0x410513
lea esi, [ebp - 0x1470]
lea eax, [ebp - 0x1678]
lea edx, [ebp - 0x1a88]
mov dword [esp + 0x10], esi
lea esi, [ebp - 0x1a9c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1880]
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 4], esi
call dword [sym.imp.ucrtbase.dll__wsplitpath]
lea edx, [ebp - 0x123c]
mov dword [esp], edi
lea eax, [ebp - 0x1880]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str._s_s_s
call sym._wsprintfW
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
test byte [0x425010], 8
je 0x4105b7
mov eax, edi
shr eax, 0x10
je 0x410e32
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ebx, eax
sub esp, 8
mov eax, 0x42613d
test ebx, ebx
jne 0x410c42
cmp word [ebp - 0x1018], 0
je 0x41079a
lea esi, [esi]
nop
add ebx, 1
cmp word [edi + ebx*2], 0
jne 0x410790
mov eax, 0x224c
lea edx, [ebp - 0x146e]
mov ecx, edi
mov word [ebp - 0x1470], ax
nop
lea esi, [ebx - 1]
test ebx, ebx
jle 0x410c17
lea eax, [ebp - 0x134e]
cmp edx, eax
ja 0x410c17
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x410de5
ja 0x410bf0
cmp ax, 9
je 0x410dd2
cmp ax, 0xa
jne 0x410d72
mov eax, 0x6e5c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x4107b0
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x42773e
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 0x4104a4
movzx eax, word [ebx + 4]
lea edx, [ebx + 4]
mov ebx, edx
test ax, ax
je 0x4104a4
cmp ax, 9
je 0x410863
cmp ax, 0x20
jne 0x4104a4
add ebx, 2
movzx eax, word [ebx]
test ax, ax
je 0x4104a4
cmp ax, 0x20
je 0x410863
cmp ax, 9
je 0x410863
jmp 0x4104a4
test ebx, ebx
je 0x410df8
mov eax, ebx
shr eax, 0x10
je 0x4109e4
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x42613d
test edi, edi
jne 0x4109f7
cmp word [ebx], 0
je 0x4108ca
nop
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x4108c0
mov eax, 0x224c
mov dword [ebp + 8], ebx
mov ecx, ebx
lea edx, [ebp - 0x816]
mov word [ebp - 0x818], ax
lea esi, [edi - 1]
test edi, edi
jle 0x410c70
lea eax, [ebp - 0x6f6]
cmp edx, eax
ja 0x410c70
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x410b30
ja 0x410a80
cmp ax, 9
je 0x410ba3
cmp ax, 0xa
jne 0x410b43
mov eax, 0x6e5c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x4108e1
mov eax, edi
shr eax, 0x10
je 0x410e02
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x42613d
test edx, edx
jne 0x410b02
cmp word [ebp - 0x1018], 0
je 0x41097a
lea esi, [esi]
add edx, 1
cmp word [edi + edx*2], 0
jne 0x410970
mov eax, 0x224c
lea ecx, [ebp - 0x1266]
mov ebx, edi
mov word [ebp - 0x1268], ax
nop
lea eax, [ebp - 0x1146]
lea esi, [edx - 1]
cmp ecx, eax
ja 0x410ad7
test edx, edx
jle 0x410ad7
add ebx, 2
movzx eax, word [ebx - 2]
cmp ax, 0xd
je 0x410cb0
ja 0x410ab0
cmp ax, 9
je 0x410d23
cmp ax, 0xa
jne 0x410cc3
mov eax, 0x6e5c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410990
movzx eax, bx
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
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.9
jmp 0x41047e
cmp word [0x4331e2], 0x3a
jne 0x410600
movzx eax, word [0x4331e0]
mov esi, dword [sym.imp.ucrtbase.dll_toupper]
mov dword [esp], eax
call esi
mov dword [ebp - 0x1ab0], eax
movzx eax, word [ebp - 0x818]
mov dword [esp], eax
call esi
cmp dword [ebp - 0x1ab0], eax
je 0x410600
mov eax, dword [ebp - 0x1aac]
mov dword [esp], eax
call ebx
sub esp, 4
jmp 0x410600
mov edx, dword [ebp - 0x1aac]
jmp 0x4104e9
cmp ax, 0x22
je 0x410bc0
cmp ax, 0x5c
jne 0x410b43
mov ebx, 0x5c5c
add edx, 2
mov edi, esi
mov word [edx - 2], bx
jmp 0x4108e1
cmp ax, 0x22
je 0x410d40
cmp ax, 0x5c
jne 0x410cc3
mov eax, 0x5c5c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410990
mov byte [ecx], 0x22
lea eax, [ecx + 1]
test esi, esi
jle 0x410af1
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea esi, [ebp - 0x1268]
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.9
jmp 0x41058f
mov eax, 0x725c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x4108e1
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x410d66
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 0x4108e1
mov eax, 0x745c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x4108e1
mov edi, 0x225c
add edx, 2
mov word [edx - 2], di
mov edi, esi
jmp 0x4108e1
mov dword [0x437470], 1
call dbg.WCMD_print_error
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ax, 0x22
je 0x410d53
cmp ax, 0x5c
jne 0x410d72
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
mov ebx, esi
jmp 0x4107b0
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x410c31
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
lea esi, [ebp - 0x1470]
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.9
jmp 0x4105b7
mov ebx, dword [ebp + 8]
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x410c8d
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x818]
mov dword [esp], eax
mov dword [ebp - 0x1aac], eax
call dbg.__wine_dbg_strdup
jmp 0x4109f7
mov eax, 0x725c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410990
lea edx, [eax - 0x20]
cmp dx, 0x5e
jbe 0x410e1a
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 0x410990
mov eax, 0x745c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410990
mov eax, 0x225c
add ecx, 2
mov edx, esi
mov word [ecx - 2], ax
jmp 0x410990
mov eax, 0x225c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x4107b0
mov byte [edx], al
mov edi, esi
add edx, 1
jmp 0x4108e1
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x410e26
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 0x4107b0
mov eax, 0x745c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x4107b0
mov eax, 0x725c
add edx, 2
mov ebx, esi
mov word [edx - 2], ax
jmp 0x4107b0
mov eax, 0x426136
jmp 0x4109f7
movzx eax, di
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
jmp 0x410b02
mov byte [ecx], al
mov edx, esi
add ecx, 1
jmp 0x410990
mov byte [edx], al
mov ebx, esi
add edx, 1
jmp 0x4107b0
movzx eax, di
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
jmp 0x410c42
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.9
jmp 0x410675