Function at 0x4049f4
Capabilities:
Delete directory
Delete file
Get file attributes

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc98
lea rsi, [0x00409260]
call fcn.004040e8
lea rcx, [0x0040a84c]
lea rbx, [rsp + 0xa88]
call fcn.00405bb0
lea rcx, [0x0040a877]
mov qword [rsp + 0x38], rax
call fcn.00405bb0
lea rcx, [0x0040a6a6]
mov qword [rsp + 0x40], rax
call fcn.00405bb0
lea rcx, [0x0040a6d0]
mov r13, rax
call fcn.00405bb0
lea rcx, [0x0040a6b1]
mov qword [rsp + 0x28], rax
call fcn.00405bb0
mov qword [rsp + 0x30], rax
mov rax, qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov qword [rsp + 0x48], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsi]
lea r15, [rsp + 0x60]
lea r12, [rsp + 0x268]
lea rdi, [rsp + 0x470]
call fcn.00405bb0
mov rcx, qword [rsi + 8]
mov r14, rax
call fcn.00405bb0
mov rdx, qword [rsp + 0x38]
mov rcx, r15
mov qword [rsp + 0x50], rax
call sub.msvcrt.dll_wcscpy
mov rcx, r15
mov rdx, r13
call sub.msvcrt.dll_wcscat
mov rcx, r15
mov rdx, r14
call sub.msvcrt.dll_wcscat
mov rdx, qword [rsp + 0x40]
mov rcx, r12
call sub.msvcrt.dll_wcscpy
mov rcx, r12
mov rdx, r13
call sub.msvcrt.dll_wcscat
mov rcx, r12
mov rdx, r14
call sub.msvcrt.dll_wcscat
mov rcx, r15
mov rdx, rdi
mov rax, qword [rsp + 0x48]
mov r8d, 0x104
lea r15, [rsp + 0x678]
call rax
mov rcx, r12
lea r12, [rsp + 0x880]
mov rdx, r15
mov r8d, 0x104
mov rax, qword [rsp + 0x48]
call rax
mov rdx, rdi
mov rcx, r12
call sub.msvcrt.dll_wcscpy
mov rdx, r13
mov rcx, r12
call sub.msvcrt.dll_wcscat
mov rdx, qword [rsp + 0x28]
mov rcx, r12
call sub.msvcrt.dll_wcscat
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_wcscpy
mov rdx, r13
mov rcx, rbx
call sub.msvcrt.dll_wcscat
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call sub.msvcrt.dll_wcscat
mov rax, qword [rsp + 0x58]
mov rcx, r12
call rax
inc eax
je 0x404b8d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
inc eax
je 0x404ba3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, rdi
mov rcx, r12
call sub.msvcrt.dll_wcscpy
mov rdx, r13
mov rcx, r12
call sub.msvcrt.dll_wcscat
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call sub.msvcrt.dll_wcscat
mov rdx, r15
mov rcx, rbx
call sub.msvcrt.dll_wcscpy
mov rdx, r13
mov rcx, rbx
call sub.msvcrt.dll_wcscat
mov rdx, qword [rsp + 0x30]
mov rcx, rbx
call sub.msvcrt.dll_wcscat
mov rbp, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, r12
call rbp
inc eax
je 0x404c02
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbx
call rbp
inc eax
je 0x404c14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rdi
mov rdi, qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
add rsi, 0x10
call rdi
mov rcx, r15
call rdi
mov rcx, qword [rsp + 0x50]
call fcn.00405c32
mov rcx, r14
call fcn.00405c32
lea rax, [0x00409470]
cmp rsi, rax
jne 0x404a86
mov rcx, qword [rsp + 0x30]
call fcn.00405c32
mov rcx, qword [rsp + 0x28]
call fcn.00405c32
mov rcx, r13
call fcn.00405c32
mov rcx, qword [rsp + 0x40]
call fcn.00405c32
mov rcx, qword [rsp + 0x38]
call fcn.00405c32
xor eax, eax
add rsp, 0xc98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret