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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x50a4
call sym.__alloca
mov eax, dword [0x4162c8]
cmp word [eax], 0
je 0x408986
mov esi, dword [0x418750]
cmp word [esi], 0
jne 0x408561
mov dword [esi], 0x2e
lea ebx, [ebp - 0xca0]
push 0
push ebx
push 0x104
push eax
call dbg.WCMD_get_fullpath
add esp, 0x10
test eax, eax
je 0x4089aa
lea eax, [ebp - 0x438]
push 0
push eax
push 0x104
push esi
call dbg.WCMD_get_fullpath
add esp, 0x10
test eax, eax
je 0x4089aa
test byte [0x41d010], 8
je 0x4085fb
lea ecx, [ebp - 0xca0]
call dbg.wine_dbgstr_wn
mov esi, eax
mov ecx, dword [0x4162c8]
call dbg.wine_dbgstr_wn
mov edi, eax
lea ecx, [ebp - 0x438]
call dbg.wine_dbgstr_wn
sub esp, 0x1c
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Move_from__s__s__to__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x1c
lea eax, [ebp - 0xea8]
lea ecx, [ebp - 0x10b0]
lea edx, [ebp - 0xa98]
lea esi, [ebp - 0x28]
push eax
push ecx
push edx
push esi
push ebx
call dword [sym.imp.ucrtbase.dll__wsplitpath]
add esp, 0x14
lea eax, [ebp - 0x688]
push eax
push ebx
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x4089aa
lea esi, [ebp - 0x892]
mov ebx, dword [sym.imp.kernel32.dll_GetFileAttributesW]
jmp 0x408668
mov esi, ebx
mov ebx, dword [sym.imp.kernel32.dll_GetFileAttributesW]
nop
lea eax, [ebp - 0x688]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.kernel32.dll_FindNextFileW]
test eax, eax
je 0x4089a1
test byte [0x41d010], 8
je 0x4086a2
lea ecx, [ebp - 0x65c]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Processing_file__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
xor eax, eax
nop word cs:[eax + eax]
movzx ecx, word [ebp + eax - 0x28]
mov word [ebp + eax - 0x890], cx
add eax, 2
test cx, cx
jne 0x4086b0
mov eax, esi
nop word [eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x4086d0
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebp + ecx - 0xa98]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x4086e0
lea eax, [ebp - 0x438]
push eax
call ebx
cmp eax, 0xffffffff
je 0x408780
and eax, 0x10
je 0x408780
xor eax, eax
nop dword [eax]
movzx ecx, word [ebp + eax - 0x438]
mov word [ebp + eax - 0x230], cx
add eax, 2
test cx, cx
jne 0x408710
lea eax, [ebp - 0x230]
nop
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x408730
mov dword [eax - 2], 0x5c
lea eax, [ebp - 0x232]
nop word cs:[eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x408750
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebp + ecx - 0x65c]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x408760
jmp 0x4087a8
xor eax, eax
nop word cs:[eax + eax]
movzx ecx, word [ebp + eax - 0x438]
mov word [ebp + eax - 0x230], cx
add eax, 2
test cx, cx
jne 0x408790
mov eax, esi
nop word [eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x4087b0
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebp + ecx - 0x65c]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x4087c0
test byte [0x41d010], 8
je 0x408848
lea ecx, [ebp - 0x890]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Source__s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
test byte [0x41d010], 8
je 0x408848
lea ecx, [ebp - 0x230]
call dbg.wine_dbgstr_wn
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Dest____s_n
mov dword [esp + 8], str.WCMD_move
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
lea eax, [ebp - 0x230]
push eax
call ebx
cmp eax, 0xffffffff
je 0x4088b0
mov ebx, esi
push 0x41722a
push dword [0x418754]
call dword [sym.imp.ucrtbase.dll_wcsstr]
add esp, 8
test eax, eax
je 0x4088c0
push 0x3ee
call sym._WCMD_LoadMessage
add esp, 4
lea ecx, [ebp - 0x230]
push ecx
push eax
call dbg.WCMD_format_string
add esp, 8
mov edi, eax
mov ecx, eax
xor edx, edx
call dbg.WCMD_ask_confirm
mov esi, eax
push edi
call dword [sym.imp.kernel32.dll_LocalFree]
test esi, esi
jne 0x4088d8
jmp 0x408646
xor eax, eax
jmp 0x4088e5
push 0x417224
push dword [0x418754]
call dword [sym.imp.ucrtbase.dll_wcsstr]
add esp, 8
test eax, eax
je 0x408917
mov eax, 1
mov esi, ebx
mov ebx, dword [sym.imp.kernel32.dll_GetFileAttributesW]
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x890]
push eax
call dword [sym.imp.kernel32.dll_MoveFileExW]
test eax, eax
jne 0x408650
call dbg.WCMD_print_error
mov eax, dword [0x4162c0]
mov dword [eax], 1
jmp 0x408650
mov eax, dword [0x41874c]
mov edi, dword [eax]
push 0x2000
lea esi, [ebp - 0x50b0]
push esi
push str.COPYCMD
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0x1ffe
ja 0x408979
mov dword [ebp - 0x14], edi
push 0x417224
push esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x4088d8
push 0x41722a
lea eax, [ebp - 0x50b0]
push eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x408870
cmp dword [ebp - 0x14], 0
je 0x4088d8
jmp 0x408870
test edi, edi
jne 0x408870
jmp 0x4088d8
push 0x3f2
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output_stderr
add esp, 0x50a8
jmp 0x4089b0
push dword [ebp - 0x10]
call dword [sym.imp.kernel32.dll_FindClose]
add esp, 0x50a4
pop esi
pop edi
pop ebx
pop ebp
ret