Function at 0x41bab0
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.00401050
sub esp, eax
lea eax, [ebp - 0x818]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1aac], eax
test byte [0x423010], 8
jne 0x41beb0
cmp word [ebx], 0
mov eax, ebx
je 0x41bb04
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x41baf0
sub eax, ebx
cmp eax, 2
jg 0x41be38
mov eax, dword [ebp - 0x1aac]
mov dword [esp], 0x400
lea edi, [ebp - 0x1018]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov dword [ebp - 0x1ab4], eax
call eax
movzx edx, word [ebx]
mov eax, edi
sub esp, 8
test dx, dx
je 0x41bde0
lea esi, [esi]
cmp dx, 0x22
je 0x41bb4c
mov word [eax], dx
add eax, 2
movzx edx, word [ebx + 2]
add ebx, 2
test dx, dx
jne 0x41bb40
cmp eax, edi
jbe 0x41bb77
lea esi, [esi]
movzx edx, word [eax - 2]
cmp dx, 0x20
je 0x41bb70
cmp dx, 9
jne 0x41bb77
sub eax, 2
cmp eax, edi
ja 0x41bb60
xor edx, edx
lea esi, [ebp - 0x1268]
mov word [eax], dx
test byte [0x423010], 8
jne 0x41bce8
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 0x41bc38
test byte [0x423010], 8
jne 0x41bfb0
mov dword [esp], edi
mov ebx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
call ebx
sub esp, 4
test eax, eax
je 0x41bf90
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x1ab4]
mov dword [esp], 0x400
call eax
sub esp, 8
mov dword [esp + 4], 0x4366e2
mov dword [esp], 0x430420
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x41c360
cmp word [ebp - 0x1016], 0x3a
je 0x41c42b
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 0x41bcc7
test byte [ebp - 0x1268], 0x10
je 0x41bc20
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 0x41bc0e
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 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 0x41bbb7
jmp 0x41bfb0
mov eax, edi
shr eax, 0x10
je 0x41c0d0
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 0x41c0e3
movzx eax, word [ebp - 0x1018]
test ax, ax
je 0x41c516
lea esi, [esi]
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x41bd30
mov esi, 0x224c
mov dword [ebp - 0x1ab0], edi
lea ecx, [ebp - 0x1266]
mov word [ebp - 0x1268], si
jmp 0x41bda4
cmp ax, 9
je 0x41c230
cmp ax, 0xa
jne 0x41c24e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [ebp - 0x1146]
lea esi, [edx - 1]
cmp ecx, eax
ja 0x41c3f2
test edx, edx
jle 0x41c3f2
mov eax, dword [ebp - 0x1ab0]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x1ab0], 2
cmp ax, 0xd
je 0x41c218
jbe 0x41bd60
cmp ax, 0x22
je 0x41c2a0
cmp ax, 0x5c
jne 0x41c241
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x41bd80
cmp word [ebp - 0x818], 0
mov edx, dword [ebp - 0x1aac]
je 0x41bdf9
add edx, 2
cmp word [edx], 0
jne 0x41bdf0
xor eax, eax
mov ecx, 0xd
jmp 0x41be0f
movzx ecx, word [eax + 0x4350b4]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x41be08
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
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 0x41bb04
movzx eax, word [ebx + 4]
lea edx, [ebx + 4]
test ax, ax
jne 0x41be94
jmp 0x41bea0
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
je 0x41bea0
cmp ax, 0x20
je 0x41be88
cmp ax, 9
je 0x41be88
mov ebx, edx
jmp 0x41bb04
test ebx, ebx
je 0x41c4c2
mov eax, ebx
shr eax, 0x10
je 0x41c090
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 0x41c0a3
movzx eax, word [ebx]
test ax, ax
je 0x41c4f5
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x41bef8
mov ecx, 0x224c
mov dword [ebp + 8], ebx
mov esi, ebx
mov word [ebp - 0x818], cx
lea ecx, [ebp - 0x816]
jmp 0x41bf5e
cmp ax, 9
je 0x41c188
cmp ax, 0xa
jne 0x41c1a6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x41c3b8
lea eax, [ebp - 0x6f6]
cmp ecx, eax
ja 0x41c3b8
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x41c170
jbe 0x41bf20
cmp ax, 0x22
je 0x41c200
cmp ax, 0x5c
jne 0x41c199
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x41bf40
mov dword [0x4231f0], 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 0x41c4aa
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 0x41c13c
movzx eax, word [ebp - 0x1018]
test ax, ax
je 0x41c4d4
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x41bff0
mov ecx, 0x224c
mov esi, edi
mov word [ebp - 0x1470], cx
lea ecx, [ebp - 0x146e]
jmp 0x41c05e
cmp ax, 9
je 0x41c348
cmp ax, 0xa
jne 0x41c2d6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [ebp - 0x134e]
lea ebx, [edx - 1]
cmp ecx, eax
ja 0x41c110
test edx, edx
jle 0x41c110
movzx eax, word [esi]
mov edx, ebx
add esi, 2
cmp ax, 0xd
je 0x41c2b8
jbe 0x41c018
cmp ax, 0x22
je 0x41c330
cmp ax, 0x5c
jne 0x41c2c9
mov eax, 0x5c5c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c040
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 0x41bade
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 0x41bb8f
mov byte [ecx], 0x22
test ebx, ebx
jle 0x41c4ed
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
lea esi, [ebp - 0x1470]
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 0x41bbb7
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41bf40
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41bf40
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x41c423
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x438130]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + 0x438130]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x438130]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + 0x438130]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41bf40
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41bf40
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41bd80
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41bd80
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x41c4a2
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + 0x438130]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + 0x438130]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + 0x438130]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + 0x438130]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41bd80
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x41bd80
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c040
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x41c4cc
mov ebx, eax
mov byte [ecx], 0x5c
add ecx, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + 0x438130]
mov byte [ecx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + 0x438130]
mov byte [ecx - 3], bl
mov ebx, eax
and eax, 0xf
shr bx, 4
movzx eax, byte [eax + 0x438130]
and ebx, 0xf
movzx ebx, byte [ebx + 0x438130]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x41c040
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c040
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x41c040
cmp word [0x428402], 0x3a
jne 0x41bc00
movzx eax, word [0x428400]
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 0x41bc00
mov eax, dword [ebp - 0x1aac]
mov dword [esp], eax
call ebx
sub esp, 4
jmp 0x41bc00
mov byte [ecx], 0x22
mov ebx, dword [ebp + 8]
test edi, edi
jle 0x41c50e
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x818]
mov dword [esp], eax
mov dword [ebp - 0x1aac], eax
call sym.___wine_dbg_strdup
jmp 0x41c0a3
mov byte [ecx], 0x22
test esi, esi
jle 0x41c52f
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 sym.___wine_dbg_strdup
jmp 0x41c0e3
mov byte [ecx], al
inc ecx
jmp 0x41bf40
movzx eax, word [ebp - 0x1018]
mov dword [esp], eax
call dword [sym.imp.user32.dll_IsCharAlphaW]
sub esp, 4
test eax, eax
je 0x41bc0e
xor eax, eax
mov edx, 0x3d
lea esi, [ebp - 0x1470]
jmp 0x41c45f
movzx edx, word [eax + 0x4350ba]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x41c458
mov eax, dword [ebp - 0x1018]
xor ebx, ebx
mov word [ebp - 0x146a], bx
mov dword [ebp - 0x146e], eax
test byte [0x423010], 8
jne 0x41c537
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
jmp 0x41bc0e
mov byte [ecx], al
inc ecx
jmp 0x41bd80
movzx eax, di
mov dword [esp], 0x4350be
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x41c13c
mov eax, 0x4350c4
jmp 0x41c0a3
mov byte [ecx], al
inc ecx
jmp 0x41c040
mov eax, 0x224c
mov byte [ebp - 0x146e], 0x22
lea ecx, [ebp - 0x146e]
mov word [ebp - 0x1470], ax
lea eax, [ecx + 1]
jmp 0x41c12b
mov eax, 0x224c
mov byte [ebp - 0x816], 0x22
lea ecx, [ebp - 0x816]
mov word [ebp - 0x818], ax
lea eax, [ecx + 1]
jmp 0x41c3d6
mov ebx, 0x224c
mov byte [ebp - 0x1266], 0x22
lea ecx, [ebp - 0x1266]
mov word [ebp - 0x1268], bx
lea eax, [ecx + 1]
jmp 0x41c40d
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 0x41c48d