Function at 0x40ea40
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Move file
Query environment variable

Disassembly:
push ebp
mov eax, 0x50d0
mov ebp, esp
push edi
push esi
push ebx
call fcn.004246d8
sub esp, eax
cmp word [0x434460], 0
je 0x40f450
cmp word [0x430460], 0
jne 0x40ea89
xor eax, eax
mov edx, 0x2e
jmp 0x40ea7a
movzx edx, word [eax + 0x427546]
mov word [eax + 0x430460], dx
add eax, 2
test dx, dx
jne 0x40ea73
lea ebx, [ebp - 0x5094]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x104
mov dword [esp], 0x434460
call sym._WCMD_get_fullpath
test eax, eax
jne 0x40eac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x4e8c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov dword [esp], 0x430460
call sym._WCMD_get_fullpath
test eax, eax
je 0x40eab3
test byte [0x425010], 8
jne 0x40f49a
lea eax, [ebp - 0x4874]
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4a7c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4c84]
mov dword [esp + 8], eax
lea eax, [ebp - 0x50a8]
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll__wsplitpath]
lea eax, [ebp - 0x425c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
sub esp, 8
mov dword [ebp - 0x50b4], eax
cmp eax, 0xffffffff
je 0x40eab3
lea esi, [ebp - 0x4230]
lea ebx, [ebp - 0x466c]
mov eax, esi
shr eax, 0x10
mov dword [ebp - 0x50b8], eax
lea eax, [ebp - 0x4464]
shr eax, 0x10
mov dword [ebp - 0x50bc], eax
mov eax, ebx
shr eax, 0x10
mov dword [ebp - 0x50c0], eax
nop
test byte [0x425010], 8
jne 0x40edb0
xor eax, eax
nop
movzx edx, word [ebp + eax - 0x50a8]
mov word [ebp + eax - 0x4464], dx
add eax, 2
test dx, dx
jne 0x40eb90
cmp word [ebp - 0x4464], 0
lea edx, [ebp - 0x4464]
je 0x40ebc9
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x40ebc0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebp + eax - 0x4c84]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ebd0
lea eax, [ebp - 0x4e8c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x40ed93
and eax, 0x10
je 0x40ed95
xor eax, eax
lea esi, [esi]
movzx edx, word [ebp + eax - 0x4e8c]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40ec10
cmp word [ebp - 0x466c], 0
mov edx, ebx
je 0x40ec39
add edx, 2
cmp word [edx], 0
jne 0x40ec30
xor eax, eax
mov ecx, 0x5c
jmp 0x40ec49
movzx ecx, word [eax + 0x42756e]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ec42
cmp word [ebp - 0x466c], 0
mov edx, ebx
je 0x40ec6a
add edx, 2
cmp word [edx], 0
jne 0x40ec61
xor eax, eax
lea esi, [esi]
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ec70
cmp word [ebp - 0x4464], 0
lea edx, [ebp - 0x4464]
je 0x40ec99
add edx, 2
cmp word [edx], 0
jne 0x40ec90
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40eca0
test byte [0x425010], 8
jne 0x40ef10
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x40eea0
mov dword [esp + 4], 0x427dfe
mov edi, dword [sym.imp.ucrtbase.dll_wcsstr]
mov dword [esp], 0x438700
call edi
test eax, eax
je 0x40f372
mov dword [esp], 0x3ee
call sym._WCMD_LoadMessage
mov dword [esp + 4], ebx
mov dword [esp], eax
call dbg.WCMD_format_string
xor edx, edx
mov edi, eax
call sym._WCMD_ask_confirm.constprop.4
mov dword [esp], edi
mov dword [ebp - 0x50ac], eax
call dword [sym.imp.kernel32.dll_LocalFree]
mov edx, dword [ebp - 0x50ac]
sub esp, 4
test edx, edx
je 0x40ed55
mov eax, 1
mov dword [esp + 8], eax
lea eax, [ebp - 0x4464]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MoveFileExW]
sub esp, 0xc
test eax, eax
je 0x40f1a0
lea eax, [ebp - 0x425c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50b4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x40eb80
mov eax, dword [ebp - 0x50b4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
movzx edx, word [ebp + eax - 0x4e8c]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40ed95
jmp 0x40ec80
mov edx, dword [ebp - 0x50b8]
test edx, edx
je 0x40f430
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x427175
test edi, edi
jne 0x40eee1
cmp word [ebp - 0x4230], 0
je 0x40edfe
lea esi, [esi]
nop
add edi, 1
cmp word [ebp + edi*2 - 0x4230], 0
jne 0x40edf0
mov eax, 0x224c
lea edx, [ebp - 0x400a]
mov dword [ebp - 0x50ac], esi
mov word [ebp - 0x400c], ax
jmp 0x40ee46
cmp ax, 9
je 0x40f350
cmp ax, 0xa
jne 0x40f2f1
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov edi, dword [ebp - 0x50b0]
lea eax, [edi - 1]
mov dword [ebp - 0x50b0], eax
lea eax, [ebp - 0x3eea]
cmp edx, eax
ja 0x40eeb0
test edi, edi
jle 0x40eeb0
add dword [ebp - 0x50ac], 2
mov eax, dword [ebp - 0x50ac]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40f245
jbe 0x40ee20
cmp ax, 0x22
je 0x40f260
cmp ax, 0x5c
jne 0x40f2f1
mov eax, 0x5c5c
add edx, 2
mov word [edx - 2], ax
jmp 0x40ee40
xor eax, eax
jmp 0x40ed33
mov edi, dword [ebp - 0x50b0]
mov byte [edx], 0x22
lea eax, [edx + 1]
test edi, edi
jle 0x40eed0
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Processing_file__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x40eb8d
mov edx, dword [ebp - 0x50bc]
test edx, edx
je 0x40f3e0
lea eax, [ebp - 0x4464]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edi, eax
sub esp, 8
mov eax, 0x427175
test edi, edi
jne 0x40f031
cmp word [ebp - 0x4464], 0
je 0x40ef5f
add edi, 1
cmp word [ebp + edi*2 - 0x4464], 0
jne 0x40ef51
mov eax, 0x224c
lea ecx, [ebp - 0x4464]
lea edx, [ebp - 0x400a]
mov word [ebp - 0x400c], ax
mov dword [ebp - 0x50ac], ecx
jmp 0x40efa6
cmp ax, 9
je 0x40f2e0
cmp ax, 0xa
jne 0x40f282
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov edi, dword [ebp - 0x50b0]
lea eax, [edi - 1]
mov dword [ebp - 0x50b0], eax
test edi, edi
jle 0x40f000
lea eax, [ebp - 0x3eea]
cmp edx, eax
ja 0x40f000
add dword [ebp - 0x50ac], 2
mov eax, dword [ebp - 0x50ac]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40f271
jbe 0x40ef80
cmp ax, 0x22
je 0x40f361
cmp ax, 0x5c
jne 0x40f282
mov eax, 0x5c5c
add edx, 2
mov word [edx - 2], ax
jmp 0x40efa0
mov edi, dword [ebp - 0x50b0]
mov byte [edx], 0x22
lea eax, [edx + 1]
test edi, edi
jle 0x40f020
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Source__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
test byte [0x425010], 8
je 0x40ecbd
mov edx, dword [ebp - 0x50c0]
test edx, edx
je 0x40f410
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 0x40f172
cmp word [ebp - 0x466c], 0
je 0x40f0ab
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x40f0a1
mov eax, 0x224c
lea edx, [ebp - 0x400a]
mov dword [ebp - 0x50ac], ebx
mov word [ebp - 0x400c], ax
jmp 0x40f0eb
cmp ax, 9
je 0x40f212
cmp ax, 0xa
jne 0x40f1b4
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov edi, dword [ebp - 0x50b0]
lea eax, [edi - 1]
mov dword [ebp - 0x50b0], eax
test edi, edi
jle 0x40f141
lea eax, [ebp - 0x3eea]
cmp edx, eax
ja 0x40f141
add dword [ebp - 0x50ac], 2
mov eax, dword [ebp - 0x50ac]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x40f234
jbe 0x40f0c5
cmp ax, 0x22
je 0x40f223
cmp ax, 0x5c
jne 0x40f1b4
mov eax, 0x5c5c
add edx, 2
mov word [edx - 2], ax
jmp 0x40f0e5
mov edi, dword [ebp - 0x50b0]
mov byte [edx], 0x22
lea eax, [edx + 1]
test edi, edi
jle 0x40f161
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x400c]
mov dword [esp], eax
call dbg.__wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Dest____s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x40ecbd
call dbg.WCMD_print_error
mov dword [0x4386f0], 1
jmp 0x40ed55
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40f490
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, 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], cl
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov byte [edx - 2], cl
jmp 0x40f0e5
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40f0e5
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x40f0e5
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x40f0e5
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x40ee40
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x40ee40
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x40efa0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40f480
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, 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], cl
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov byte [edx - 2], cl
jmp 0x40efa0
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40efa0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40f470
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, 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], cl
movzx ecx, byte [edi + str.0123456789abcdefWCMD_choice]
mov byte [edx - 1], al
mov byte [edx - 2], cl
jmp 0x40ee40
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40ee40
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x40efa0
mov dword [esp + 4], 0x427df8
mov dword [esp], 0x438700
call edi
test eax, eax
jne 0x40ed2e
mov eax, dword [0x438528]
lea edi, [ebp - 0x400c]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], edi
mov dword [ebp - 0x50ac], eax
mov dword [esp], str.COPYCMD
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
sub eax, 1
sub esp, 0xc
cmp eax, 0x1ffe
jbe 0x40f4ef
mov eax, dword [ebp - 0x50ac]
test eax, eax
jne 0x40ecf1
jmp 0x40ed2e
lea eax, [ebp - 0x4464]
mov dword [esp], 0x427168
mov dword [ebp - 0x50ac], eax
movzx eax, word [ebp - 0x50ac]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x40f031
movzx eax, bx
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x40f172
movzx eax, si
mov dword [esp], 0x427168
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.9
jmp 0x40eee1
mov dword [esp], 0x3f2
call sym._WCMD_LoadMessage
mov dword [esp], eax
call dbg.WCMD_output_stderr
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [edx], al
add edx, 1
jmp 0x40ee40
mov byte [edx], al
add edx, 1
jmp 0x40efa0
mov byte [edx], al
add edx, 1
jmp 0x40f0e5
lea eax, [ebp - 0x4e8c]
call sym._wine_dbgstr_wn.constprop.5
mov edi, eax
mov eax, 0x434460
call sym._wine_dbgstr_wn.constprop.5
mov esi, eax
mov eax, ebx
call sym._wine_dbgstr_wn.constprop.5
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Move_from__s__s__to__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.6
jmp 0x40eaf7
mov ecx, dword [sym.imp.kernel32.dll_lstrcmpiW]
mov dword [esp + 4], 0x427df8
mov dword [esp], edi
mov dword [ebp - 0x50b0], ecx
call ecx
mov ecx, dword [ebp - 0x50b0]
sub esp, 8
test eax, eax
je 0x40ed2e
mov dword [esp + 4], 0x427dfe
mov dword [esp], edi
call ecx
sub esp, 8
test eax, eax
jne 0x40f3c6
jmp 0x40ecf1