Function at 0x140004f20
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x398
mov rax, qword [0x14004b010]
xor rax, rsp
mov qword [rsp + 0x380], rax
mov dword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x3a0]
call fcn.140022c10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0xffffffff
jne 0x14000500c
mov dx, 2
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.___
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0x48], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, str.CLEAN____
mov rcx, qword [rsp + 0x3a8]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0x50], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov dx, 7
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x140005684
mov eax, dword [rsp + 0x28]
and eax, 0x10
test eax, eax
je 0x140005343
mov rcx, qword [rsp + 0x3a0]
call fcn.140022c10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1400050e9
lea rcx, [rsp + 0x26]
call fcn.140002d90
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x118]
mov rcx, qword [rsp + 0x3a0]
call fcn.140022c30
mov rax, qword [rax]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x70], rax
lea rdx, [rsp + 0x120]
mov rcx, qword [rsp + 0x3a0]
call fcn.140022ca0
mov rax, qword [rax]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x68]
mov r8, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x138]
call fcn.140027310
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0x80]
call fcn.140022520
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1400050e9
mov dword [rsp + 0x2c], 0
jmp 0x1400050f1
mov dword [rsp + 0x2c], 1
movzx eax, byte [rsp + 0x2c]
mov byte [rsp + 0x24], al
mov eax, dword [rsp + 0x20]
and eax, 1
test eax, eax
je 0x140005117
and dword [rsp + 0x20], 0xfffffffe
lea rcx, [rsp + 0x138]
call fcn.140022930
movzx eax, byte [rsp + 0x24]
test eax, eax
je 0x1400051cc
mov dx, 0xc
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, [0x140035a28]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0x88], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, [0x140035a40]
mov rcx, qword [rsp + 0x3a8]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0x90], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov dx, 7
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x14000533e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, 0x100
lea rcx, [rsp + 0x180]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror_s]
mov dx, 1
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.e_1_31mFailed_to_delete_directory
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
lea rdx, [0x140035a78]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x34], eax
mov edx, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140035a60]
mov rcx, rax
call fcn.140026e80
lea rdx, [rsp + 0x180]
mov rcx, rax
call fcn.140026e80
lea rdx, [0x140035a54]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0xa0], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, str.Failed_to_delete_directory
mov rcx, qword [rsp + 0x3a8]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
lea rdx, [0x140035ac8]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0xa8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x38], eax
mov edx, dword [rsp + 0x38]
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140035ab0]
mov rcx, rax
call fcn.140026e80
lea rdx, [rsp + 0x180]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0xb0], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov dx, 7
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x140005684
mov rcx, qword [rsp + 0x3a0]
call fcn.140022c10
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x14000542f
lea rcx, [rsp + 0x27]
call fcn.140002d90
mov qword [rsp + 0xc8], rax
lea rdx, [rsp + 0x128]
mov rcx, qword [rsp + 0x3a0]
call fcn.140022c30
mov rax, qword [rax]
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0xd0], rax
lea rdx, [rsp + 0x130]
mov rcx, qword [rsp + 0x3a0]
call fcn.140022ca0
mov rax, qword [rax]
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xd8], rax
mov r9, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xd8]
lea rcx, [rsp + 0x158]
call fcn.140027310
mov qword [rsp + 0xe0], rax
mov eax, dword [rsp + 0x20]
or eax, 2
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0xe0]
call fcn.140022520
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14000542f
mov dword [rsp + 0x30], 0
jmp 0x140005437
mov dword [rsp + 0x30], 1
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x25], al
mov eax, dword [rsp + 0x20]
and eax, 2
test eax, eax
je 0x14000545d
and dword [rsp + 0x20], 0xfffffffd
lea rcx, [rsp + 0x158]
call fcn.140022930
movzx eax, byte [rsp + 0x25]
test eax, eax
je 0x140005512
mov dx, 0xc
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, [0x140035af8]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0xe8], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, str.Removed_Path____
mov rcx, qword [rsp + 0x3a8]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
mov qword [rsp + 0xf0], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0xf0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov dx, 7
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x140005684
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, 0x100
lea rcx, [rsp + 0x280]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror_s]
mov dx, 1
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rdx, str.e_1_31mFailed_to_delete_file
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
lea rdx, [0x140035b48]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0xf8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x3c], eax
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0xf8]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140035b30]
mov rcx, rax
call fcn.140026e80
lea rdx, [rsp + 0x280]
mov rcx, rax
call fcn.140026e80
lea rdx, [0x140035b24]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0x100], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x100]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rdx, str.Failed_to_delete_file
mov rcx, qword [rsp + 0x3a8]
call fcn.140026e80
mov rdx, qword [rsp + 0x3a0]
mov rcx, rax
call fcn.140027260
lea rdx, str.._Error_code:
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0x108], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x108]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, str._Error_message:
mov rcx, rax
call fcn.140026e80
lea rdx, [rsp + 0x280]
mov rcx, rax
call fcn.140026e80
mov qword [rsp + 0x110], rax
lea rdx, [0x1400272b0]
mov rcx, qword [rsp + 0x110]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov dx, 7
mov rcx, qword [0x14004bb78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov rcx, qword [rsp + 0x380]
xor rcx, rsp
call fcn.14002bc30
add rsp, 0x398
ret