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

Disassembly:
push ebp
mov eax, 0x1aa8
mov ebp, esp
push edi
push esi
push ebx
call fcn.00401050
sub esp, eax
lea eax, [ebp - 0x80c]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1a94], eax
test byte [0x423010], 8
jne 0x41c570
cmp word [ebx], 0
mov eax, ebx
je 0x41c1c4
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x41c1b0
sub eax, ebx
cmp eax, 2
jg 0x41c4f8
mov eax, dword [ebp - 0x1a94]
mov dword [esp], 0x400
lea edi, [ebp - 0x100c]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov dword [ebp - 0x1a9c], eax
call eax
movzx edx, word [ebx]
mov eax, edi
sub esp, 8
test dx, dx
je 0x41c4a0
lea esi, [esi]
cmp dx, 0x22
je 0x41c20c
mov word [eax], dx
add eax, 2
movzx edx, word [ebx + 2]
add ebx, 2
test dx, dx
jne 0x41c200
cmp eax, edi
jbe 0x41c237
lea esi, [esi]
movzx edx, word [eax - 2]
cmp dx, 0x20
je 0x41c230
cmp dx, 9
jne 0x41c237
sub eax, 2
cmp eax, edi
ja 0x41c220
xor edx, edx
lea esi, [ebp - 0x125c]
mov word [eax], dx
test byte [0x423010], 8
jne 0x41c3a8
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 0x41c2f8
test byte [0x423010], 8
jne 0x41c670
mov dword [esp], edi
mov ebx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
call ebx
sub esp, 4
test eax, eax
je 0x41c650
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x1a9c]
mov dword [esp], 0x400
call eax
sub esp, 8
mov dword [esp + 4], 0x4366e2
mov dword [esp], 0x430580
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x41ca20
cmp word [ebp - 0x100a], 0x3a
je 0x41caeb
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x41c387
test byte [ebp - 0x125c], 0x10
je 0x41c2e0
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 0x41c2ce
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 [0x423010], 8
je 0x41c277
jmp 0x41c670
mov eax, edi
shr eax, 0x10
je 0x41c790
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4350cb
test ecx, ecx
jne 0x41c7a3
movzx eax, word [ebp - 0x100c]
test ax, ax
je 0x41cbd6
lea esi, [esi]
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x41c3f0
mov esi, 0x224c
mov dword [ebp - 0x1a98], edi
lea ecx, [ebp - 0x125a]
mov word [ebp - 0x125c], si
jmp 0x41c464
cmp ax, 9
je 0x41c8f0
cmp ax, 0xa
jne 0x41c90e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [ebp - 0x113a]
lea esi, [edx - 1]
cmp ecx, eax
ja 0x41cab2
test edx, edx
jle 0x41cab2
mov eax, dword [ebp - 0x1a98]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x1a98], 2
cmp ax, 0xd
je 0x41c8d8
jbe 0x41c420
cmp ax, 0x22
je 0x41c960
cmp ax, 0x5c
jne 0x41c901
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x41c440
cmp word [ebp - 0x80c], 0
mov edx, dword [ebp - 0x1a94]
je 0x41c4b9
add edx, 2
cmp word [edx], 0
jne 0x41c4b0
xor eax, eax
mov ecx, 0xd
jmp 0x41c4cf
movzx ecx, word [eax + 0x4350b4]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x41c4c8
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
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x4366e2
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 0x41c1c4
movzx eax, word [ebx + 4]
lea edx, [ebx + 4]
test ax, ax
jne 0x41c554
jmp 0x41c560
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
je 0x41c560
cmp ax, 0x20
je 0x41c548
cmp ax, 9
je 0x41c548
mov ebx, edx
jmp 0x41c1c4
test ebx, ebx
je 0x41cb82
mov eax, ebx
shr eax, 0x10
je 0x41c750
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4350cb
test ecx, ecx
jne 0x41c763
movzx eax, word [ebx]
test ax, ax
je 0x41cbb5
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x41c5b8
mov ecx, 0x224c
mov dword [ebp + 8], ebx
mov esi, ebx
mov word [ebp - 0x80c], cx
lea ecx, [ebp - 0x80a]
jmp 0x41c61e
cmp ax, 9
je 0x41c848
cmp ax, 0xa
jne 0x41c866
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x41ca78
lea eax, [ebp - 0x6ea]
cmp ecx, eax
ja 0x41ca78
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41c830
jbe 0x41c5e0
cmp ax, 0x22
je 0x41c8c0
cmp ax, 0x5c
jne 0x41c859
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41c600
mov dword [0x423344], 1
call sym._WCMD_print_error
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
shr eax, 0x10
je 0x41cb6a
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x4350cb
test ecx, ecx
jne 0x41c7fc
movzx eax, word [ebp - 0x100c]
test ax, ax
je 0x41cb94
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x41c6b0
mov ecx, 0x224c
mov esi, edi
mov word [ebp - 0x1464], cx
lea ecx, [ebp - 0x1462]
jmp 0x41c71e
cmp ax, 9
je 0x41ca08
cmp ax, 0xa
jne 0x41c996
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [ebp - 0x1342]
lea ebx, [edx - 1]
cmp ecx, eax
ja 0x41c7d0
test edx, edx
jle 0x41c7d0
movzx eax, word [esi]
mov edx, ebx
add esi, 2
cmp ax, 0xd
je 0x41c978
jbe 0x41c6d8
cmp ax, 0x22
je 0x41c9f0
cmp ax, 0x5c
jne 0x41c989
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c700
movzx eax, bx
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
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], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41c19e
movzx eax, di
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
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], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41c24f
mov byte [ecx], 0x22
test ebx, ebx
jle 0x41cbad
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
lea esi, [ebp - 0x1464]
mov byte [eax], 0
mov dword [esp], esi
call sym.___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], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41c277
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c600
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c600
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41cae3
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438310]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438310]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438310]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438310]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41c600
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c600
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c440
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c440
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x41cb62
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + 0x438310]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + 0x438310]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + 0x438310]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + 0x438310]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41c440
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x41c440
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c700
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x41cb8c
mov ebx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + 0x438310]
mov byte [ecx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + 0x438310]
mov byte [ecx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + 0x438310]
and ebx, 0xf
movzx ebx, byte [ebx + 0x438310]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41c700
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c700
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c700
cmp word [0x428562], 0x3a
jne 0x41c2c0
movzx eax, word [0x428560]
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 0x41c2c0
mov eax, dword [ebp - 0x1a94]
mov dword [esp], eax
call ebx
sub esp, 4
jmp 0x41c2c0
mov byte [ecx], 0x22
mov ebx, dword [ebp + 8]
test edi, edi
jle 0x41cbce
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x80c]
mov dword [esp], eax
mov dword [ebp - 0x1a94], eax
call sym.___wine_dbg_strdup
jmp 0x41c763
mov byte [ecx], 0x22
test esi, esi
jle 0x41cbef
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 sym.___wine_dbg_strdup
jmp 0x41c7a3
mov byte [ecx], al
inc ecx
jmp 0x41c600
movzx eax, word [ebp - 0x100c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IsCharAlphaW]
sub esp, 4
test eax, eax
je 0x41c2ce
xor eax, eax
mov edx, 0x3d
lea esi, [ebp - 0x1464]
jmp 0x41cb1f
movzx edx, word [eax + 0x4350ba]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x41cb18
mov eax, dword [ebp - 0x100c]
xor ebx, ebx
mov word [ebp - 0x145e], bx
mov dword [ebp - 0x1462], eax
test byte [0x423010], 8
jne 0x41cbf7
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
jmp 0x41c2ce
mov byte [ecx], al
inc ecx
jmp 0x41c440
movzx eax, di
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x41c7fc
mov eax, 0x4350c4
jmp 0x41c763
mov byte [ecx], al
inc ecx
jmp 0x41c700
mov eax, 0x224c
mov byte [ebp - 0x1462], 0x22
lea ecx, [ebp - 0x1462]
mov word [ebp - 0x1464], ax
lea eax, [ecx + 1]
jmp 0x41c7eb
mov eax, 0x224c
mov byte [ebp - 0x80a], 0x22
lea ecx, [ebp - 0x80a]
mov word [ebp - 0x80c], ax
lea eax, [ecx + 1]
jmp 0x41ca96
mov ebx, 0x224c
mov byte [ebp - 0x125a], 0x22
lea ecx, [ebp - 0x125a]
mov word [ebp - 0x125c], bx
lea eax, [ecx + 1]
jmp 0x41cacd
mov eax, edi
call sym._wine_dbgstr_wn.constprop.0
mov ebx, eax
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0
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], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41cb4d