Function at 0x14001f324
Capabilities:
Delete directory
Delete file

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x298
mov eax, edx
mov rsi, rcx
xor ecx, ecx
and eax, 1
mov edi, edx
mov ebx, ecx
cdqe
and edi, 0xfffffffe
mov qword [rsp + 0x30], rax
cmp word [rsi], cx
je 0x14001f5a2
mov rcx, rsi
mov rbp, rsi
mov qword [rsp + 0x28], rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
add rcx, qword [rsp + 0x30]
lea rsi, [rsi + rcx*2]
mov rcx, rbp
mov qword [rsp + 0x2c0], rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
mov eax, 0x5c
cmp ax, word [rbp + rcx*2 - 2]
jne 0x14001f39a
lea esi, [rax - 0x5a]
xor eax, eax
mov word [rbp + rcx*2 - 2], ax
jmp 0x14001f3ae
mov rcx, rbp
call fcn.1400dce2c
xor ecx, ecx
cmp eax, ecx
lea eax, [rcx + 1]
mov esi, ecx
cmovne esi, eax
lea rcx, [rsp + 0x2d0]
mov rdx, rbp
mov dword [rsp + 0x2c8], esi
call fcn.140064d14
xor eax, eax
cmp esi, eax
je 0x14001f3e1
lea rdx, [0x1400fcd08]
lea rcx, [rsp + 0x2d0]
call fcn.14005a28c
xor eax, eax
mov rdx, qword [rsp + 0x2d0]
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x2d8]
mov qword [rsp + 0x2d8], rax
call fcn.1400dceb0
mov rcx, qword [rsp + 0x2d0]
xor edx, edx
lea r8d, [rdx + 0x5c]
call qword [sym.imp.SHLWAPI.dll_StrRChrW]
xor ecx, ecx
cmp rax, rcx
je 0x14001f421
mov word [rax], cx
mov rcx, qword [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, 0x5c
inc eax
movsxd rcx, eax
mov rax, qword [rsp + 0x2d0]
mov word [rax + rcx*2 - 2], dx
mov rax, qword [rsp + 0x2d0]
xor edx, edx
mov word [rax + rcx*2], dx
cmp qword [rsp + 0x2d8], rdx
je 0x14001f522
mov rbp, rcx
xor esi, esi
mov rax, qword [rsp + 0x2d0]
lea rdx, [rsp + 0x6c]
lea rcx, [rsp + 0x2d0]
mov word [rax + rbp*2], si
call fcn.14005a28c
test byte [rsp + 0x40], 0x10
jne 0x14001f4c3
mov rcx, qword [rsp + 0x2d0]
cmp edi, esi
je 0x14001f4b6
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, esi
jne 0x14001f4f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, esi
mov eax, 1
cmove ebx, eax
jmp 0x14001f4f7
call fcn.14001804c
cmp eax, esi
je 0x14001f4f7
mov ebx, eax
jmp 0x14001f4f7
cmp word [rsp + 0x6c], 0x2e
jne 0x14001f4e2
movzx eax, word [rsp + 0x6e]
cmp ax, si
je 0x14001f4f7
cmp ax, 0x2e
jne 0x14001f4e2
cmp word [rsp + 0x70], si
je 0x14001f4f7
mov rcx, qword [rsp + 0x2d0]
mov edx, edi
call fcn.14001f324
neg eax
sbb eax, eax
and ebx, eax
mov rcx, qword [rsp + 0x2d8]
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, esi
jne 0x14001f467
mov esi, dword [rsp + 0x2c8]
mov rbp, qword [rsp + 0x28]
xor eax, eax
jmp 0x14001f534
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor eax, eax
lea ecx, [rax + 1]
cmp ebx, eax
cmove ebx, ecx
mov rcx, qword [rsp + 0x2d8]
cmp rcx, rax
je 0x14001f54f
cmp rcx, 0xffffffffffffffff
je 0x14001f54f
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp esi, eax
je 0x14001f582
xor esi, esi
mov rcx, rbp
cmp edi, esi
je 0x14001f578
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
cmp eax, esi
jne 0x14001f582
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, esi
lea eax, [rsi + 1]
cmove ebx, eax
jmp 0x14001f582
call fcn.14001804c
cmp eax, esi
cmovne ebx, eax
lea rcx, [rsp + 0x2d0]
call fcn.140052160
mov rsi, qword [rsp + 0x2c0]
xor eax, eax
cmp word [rsi], ax
jne 0x14001f351
movsxd rax, ebx
add rsp, 0x298
pop rdi
pop rsi
pop rbp
pop rbx
ret