Function at 0x40f430
Capabilities:
Delete directory

Disassembly:
push ebp
mov eax, 0x405c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004240d8
xor edx, edx
sub esp, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4034], 0
mov dword [ebp - 0x401c], eax
mov eax, 0x437480
shr eax, 0x10
mov dword [ebp - 0x403c], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x40f590
lea eax, [edx + 1]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x402c], eax
lea eax, [ebp - 0x401c]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._WCMD_parameter
mov ebx, eax
mov eax, dword [ebp - 0x401c]
test eax, eax
je 0x40f590
cmp word [eax], 0x2f
je 0x40f580
test byte [0x425010], 8
jne 0x40f5b0
add dword [ebp - 0x4034], 1
mov dword [esp + 4], 0x426a42
mov dword [esp], 0x437480
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x40f840
mov dword [esp + 4], 0x426a18
lea esi, [ebp - 0x4018]
mov dword [esp], 0x437480
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x40f9b0
mov ecx, 0x414
mov dword [ebp - 0x4010], ebx
mov dword [ebp - 0x4018], 0
mov dword [ebp - 0x400c], 0
mov word [ebp - 0x4008], cx
mov dword [ebp - 0x4014], 3
cmp word [ebx], 0
je 0x40fa60
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40f550
sub eax, ebx
sar eax, 1
lea eax, [eax + eax + 2]
xor edx, edx
mov word [ebx + eax], dx
mov dword [esp], esi
call sym._SHFileOperationW_4
sub esp, 4
test eax, eax
jne 0x40f854
mov eax, dword [ebp - 0x401c]
mov edx, dword [ebp - 0x402c]
test eax, eax
jne 0x40f470
nop
mov eax, dword [ebp - 0x4034]
test eax, eax
je 0x40fa6a
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x403c]
test ecx, ecx
je 0x40f9e0
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x437480
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x4038], 0x42613d
sub esp, 8
test eax, eax
jne 0x40f6b3
cmp word [0x437480], 0
je 0x40f600
add eax, 1
cmp word [eax + eax + 0x437480], 0
jne 0x40f5f2
mov edx, 0x224c
lea edi, [ebp - 0x3ef6]
mov ecx, 0x437480
mov dword [ebp - 0x4038], ebx
mov word [ebp - 0x4018], dx
lea esi, [eax - 1]
lea edx, [ebp - 0x4016]
mov dword [ebp - 0x4030], edi
cmp edx, dword [ebp - 0x4030]
ja 0x40f67c
test eax, eax
jle 0x40f67c
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x40f873
ja 0x40f7e3
cmp ax, 9
je 0x40f8f0
cmp ax, 0xa
jne 0x40f890
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
lea esi, [eax - 1]
cmp edx, dword [ebp - 0x4030]
jbe 0x40f634
mov ebx, dword [ebp - 0x4038]
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x40f69c
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
lea esi, [ebp - 0x4018]
mov byte [eax], 0
mov dword [esp], esi
call dbg.__wine_dbg_strdup
mov dword [ebp - 0x4038], eax
test ebx, ebx
je 0x40fa0f
mov eax, ebx
shr eax, 0x10
je 0x40fa30
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 0x40f7ac
cmp word [ebx], 0
je 0x40f6fa
nop
add edi, 1
cmp word [ebx + edi*2], 0
jne 0x40f6f0
mov eax, 0x224c
mov ecx, ebx
mov dword [ebp - 0x4040], ebx
lea esi, [edi - 1]
mov word [ebp - 0x4018], ax
lea eax, [ebp - 0x3ef6]
lea edx, [ebp - 0x4016]
mov dword [ebp - 0x4030], eax
cmp edx, dword [ebp - 0x4030]
ja 0x40f77b
lea esi, [esi]
nop
test edi, edi
jle 0x40f77b
add ecx, 2
movzx eax, word [ecx - 2]
cmp ax, 0xd
je 0x40f903
ja 0x40f810
cmp ax, 9
je 0x40f980
cmp ax, 0xa
jne 0x40f920
mov eax, 0x6e5c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
lea esi, [esi]
lea esi, [edi - 1]
cmp edx, dword [ebp - 0x4030]
jbe 0x40f730
mov ebx, dword [ebp - 0x4040]
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x40f79b
mov esi, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], si
lea esi, [ebp - 0x4018]
mov byte [eax], 0
mov dword [esp], esi
call dbg.__wine_dbg_strdup
mov ecx, dword [ebp - 0x4038]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.rd:_Processing_arg__s__quals:_s__n
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.WCMD_remove_dir
mov dword [esp + 4], 0x425010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.9
jmp 0x40f4c9
cmp ax, 0x22
je 0x40f860
cmp ax, 0x5c
jne 0x40f890
mov ebx, 0x5c5c
add edx, 2
mov eax, esi
mov word [edx - 2], bx
jmp 0x40f671
cmp ax, 0x22
je 0x40f993
cmp ax, 0x5c
jne 0x40f920
mov edi, 0x5c5c
add edx, 2
mov word [edx - 2], di
mov edi, esi
jmp 0x40f770
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
test eax, eax
jne 0x40f57a
call dbg.WCMD_print_error
jmp 0x40f57a
mov edi, 0x225c
add edx, 2
mov eax, esi
mov word [edx - 2], di
jmp 0x40f671
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x40f671
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40fa20
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 eax, esi
mov byte [edx - 2], bl
jmp 0x40f671
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x40f671
mov eax, 0x725c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40f770
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40fa50
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 0x40f770
mov eax, 0x745c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40f770
mov eax, 0x225c
add edx, 2
mov edi, esi
mov word [edx - 2], ax
jmp 0x40f770
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x426a28
mov dword [esp], esi
call sym._wsprintfW
mov edx, 1
mov eax, esi
call sym._WCMD_ask_confirm.constprop.4
test eax, eax
jne 0x40f510
jmp 0x40f59e
mov dword [ebp - 0x4030], 0x437480
movzx eax, word [ebp - 0x4030]
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
mov dword [ebp - 0x4038], eax
test ebx, ebx
jne 0x40f6bb
mov eax, 0x426136
jmp 0x40f7ac
mov byte [edx], al
add edx, 1
mov eax, esi
jmp 0x40f671
movzx eax, bx
mov dword [esp], 0x426130
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.7
jmp 0x40f7ac
mov byte [edx], al
mov edi, esi
add edx, 1
jmp 0x40f770
mov eax, 2
jmp 0x40f561
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