Function at 0x1400d4980
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push rbx
push rbp
push rsi
push rdi
mov eax, 0x1558
call sub.ntdll.dll___chkstk
sub rsp, rax
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + Ordinal_5447], rax
mov rbx, r9
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x90], rdx
mov rsi, rcx
mov qword [rsp + 0x80], rcx
mov rax, qword [rsp + 0x15a8]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x15b0]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x15b8]
mov qword [rsp + 0x88], rax
mov rbp, qword [rsp + 0x15c0]
mov qword [rsp + reloc.MFC80U.DLL_Ordinal_784], rbp
xor eax, eax
or r8, 0xffffffffffffffff
mov rcx, r8
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
cmp rcx, 0x104
jbe 0x1400d4b41
mov r8d, 0x3e8
mov rdx, rsi
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_wcstombs]
call fcn.140049470
mov rsi, rax
xor edx, edx
mov r8d, 0x80
lea rbx, [0x140434760]
mov rcx, rbx
call sub.ntdll.dll_memset
mov edx, 0x5c
lea rcx, str...copyfile.cpp
call qword [sym.imp.ntdll.dll_strrchr]
mov rdi, rax
test rax, rax
jne 0x1400d4a84
xor ebx, ebx
jmp 0x1400d4b10
mov byte [rsp + reloc.MFC80U.DLL_Ordinal_784], 0
xor eax, eax
mov qword [rsp + 0x311], rax
mov word [rsp + 0x319], ax
mov byte [rsp + 0x31b], al
mov r8d, reloc.MFC80U.DLL_Ordinal_369
lea rdx, [0x1402dfd08]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_784]
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbx
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
mov byte [rdx + rcx], al
add rdx, 1
test al, al
jne 0x1400d4ad0
mov rdi, rbx
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_784]
xor ecx, ecx
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
mov byte [rdi + rcx - 1], al
add rcx, 1
test al, al
jne 0x1400d4b00
mov rax, qword [rsi]
lea r9, [rsp + 0xe90]
mov r8, rbx
lea rdx, str._s:_Failed_to_access_src_path:__s
mov rcx, rsi
call qword [rax + 0x10]
mov rax, qword [rbp]
mov edx, 0x2b
mov rcx, rbp
call qword [rax + 0x40]
xor eax, eax
jmp 0x1400d5669
mov rcx, r8
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
cmp rcx, 0x104
jbe 0x1400d4bb8
mov r8d, 0x3e8
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_wcstombs]
call fcn.140049470
mov rdi, rax
mov rsi, qword [rax]
mov edx, 0x17a
lea rcx, str...copyfile.cpp
call fcn.1400d3490
mov r8, rax
lea r9, [rsp + 0xe90]
lea rdx, str._s:_Failed_to_access_dest_path:__s
mov rcx, rdi
call qword [rsi + 0x10]
mov rax, qword [rbp]
mov edx, 0x2b
mov rcx, rbp
call qword [rax + 0x40]
xor eax, eax
jmp 0x1400d5669
mov word [rsp + 0x320], ax
xor edx, edx
mov r8d, 0x2ba
lea rcx, [rsp + 0x322]
call sub.ntdll.dll_memset
mov word [rsp + 0x5e0], 0
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0x5e2]
call sub.ntdll.dll_memset
xor edx, edx
mov r8d, 0x250
lea rcx, [rsp + 0xc0]
call sub.ntdll.dll_memset
mov r8, rsi
lea rdx, str._s.
lea rcx, [rsp + 0x320]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov qword [rsp + 0x68], rax
cmp rax, 0xffffffffffffffff
jne 0x1400d4cde
mov rax, qword [rbp]
mov edx, 0x26
mov rcx, rbp
call qword [rax + 0x40]
mov r8d, 0x3e8
lea rdx, [rsp + 0x320]
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_wcstombs]
mov edx, 0x7d
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_strchr]
lea rbp, [rax + 1]
call fcn.140049470
mov rsi, rax
mov rbx, qword [rax]
mov rax, qword [rsp + 0x60]
movzx edi, word [rax]
mov edx, Ordinal_403
lea rcx, str...copyfile.cpp
call fcn.1400d3490
mov r8, rax
mov qword [rsp + 0x20], rbp
mov r9d, edi
lea rdx, str._s:_Failed_to_find_folder:__c:_s.
mov rcx, rsi
call qword [rbx + 0x10]
mov rcx, qword [rsp + reloc.MFC80U.DLL_Ordinal_784]
mov rax, qword [rcx]
mov edx, 0x2b
call qword [rax + 0x40]
xor eax, eax
jmp 0x1400d5669
xor edi, edi
cmp qword [rbx], 0
jle 0x1400d5647
test byte [rsp + 0xc0], 0x10
je 0x1400d518d
mov ebx, edi
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0x5e0]
call sub.ntdll.dll_memset
mov rdx, rdi
nop
nop
nop
nop
movzx eax, word [rsp + rdx + 0xec]
mov word [rsp + rdx + 0x5e0], ax
add rdx, 2
test ax, ax
jne 0x1400d4d20
lea rcx, [rsp + 0x5e0]
call qword [sym.imp.ntdll.dll__wcslwr]
lea rsi, [0x1403b6c44]
lea rdi, [rsp + 0x5e0]
mov ecx, 3
repe cmpsw word [rsi], word [rdi]
je 0x1400d53da
lea rsi, [0x1403b6c40]
lea rdi, [rsp + 0x5e0]
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x1400d53d3
lea rsi, str.recycle_bin
lea rdi, [rsp + 0x5e0]
mov ecx, 0xc
repe cmpsw word [rsi], word [rdi]
je 0x1400d4de5
lea rsi, str.recycler
lea rdi, [rsp + 0x5e0]
mov ecx, 9
repe cmpsw word [rsi], word [rdi]
je 0x1400d4de5
lea rsi, str._recycle.bin
lea rdi, [rsp + 0x5e0]
mov ecx, 0xd
repe cmpsw word [rsi], word [rdi]
je 0x1400d4de5
lea rsi, str.system_volume_information
lea rdi, [rsp + 0x5e0]
mov ecx, 0x1a
repe cmpsw word [rsi], word [rdi]
jne 0x1400d4e25
xor eax, eax
mov esi, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [rsp + 0x80]
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
je 0x1400d4e25
cmp word [rdx], 0x5c
jne 0x1400d4e0d
add ebx, 1
add esi, 1
add rdx, 2
movsxd rax, esi
cmp rax, rcx
jb 0x1400d4e04
cmp ebx, 3
je 0x1400d53e1
xor edx, edx
mov r8d, 0x2bc
lea rcx, [rsp + 0x320]
call sub.ntdll.dll_memset
lea r9, [rsp + 0xec]
mov rsi, qword [rsp + 0x90]
mov r8, rsi
lea rdx, [0x1402e0040]
lea rcx, [rsp + 0x320]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400d4ee0
xor eax, eax
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x98], 0x18
xor edi, edi
mov dword [rsp + 0xa8], edi
mov qword [rsp + 0xa0], rdi
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1400d5410
mov edx, dword [rsp + 0xc0]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x1400d4ee2
xor edi, edi
xor edx, edx
mov r8d, 0x2bc
lea rcx, [rsp + 0x320]
call sub.ntdll.dll_memset
mov word [rsp + 0xaa0], 0
xor edx, edx
mov r8d, 0x2ba
lea rcx, [rsp + 0xaa2]
call sub.ntdll.dll_memset
lea r9, [rsp + 0xec]
mov r8, qword [rsp + 0x80]
lea rdx, [0x1402e0040]
lea rcx, [rsp + 0x320]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea r9, [rsp + 0xec]
mov r8, rsi
lea rdx, [0x1402e0040]
lea rcx, [rsp + 0xaa0]
call qword [sym.imp.MSVCR80.dll__swprintf]
mov edx, 0x80
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov qword [rsp + 0x40], rbp
mov rsi, qword [rsp + 0x88]
mov qword [rsp + 0x38], rsi
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x15a0]
mov qword [rsp + 0x20], rax
mov rbx, qword [rsp + 0x58]
mov r9, rbx
mov r8, qword [rsp + 0x60]
lea rdx, [rsp + 0xaa0]
lea rcx, [rsp + 0x320]
call fcn.1400d4980
test eax, eax
jne 0x1400d4fe1
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + 0xc8]
test eax, eax
jne 0x1400d54a0
jmp 0x1400d5090
lea rcx, [rsp + 0x320]
call fcn.1400d3b70
test eax, eax
jne 0x1400d5090
lea rcx, [rsp + 0x320]
call fcn.1400d4320
test eax, eax
jne 0x1400d5090
nop
nop
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rsi
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x15a0]
mov qword [rsp + 0x20], rax
mov r9, rbx
mov r8, qword [rsp + 0x60]
lea rdx, [rsp + 0xaa0]
lea rcx, [rsp + 0x320]
call fcn.1400d4980
test eax, eax
jne 0x1400d5071
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + 0xc8]
test eax, eax
jne 0x1400d54b2
cmp qword [rbx], 0
jle 0x1400d5090
cmp edi, 4
jg 0x1400d5090
add edi, 1
lea rcx, [rsp + 0x320]
call fcn.1400d4320
test eax, eax
je 0x1400d5010
mov edx, 0x80
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1400d53b2
lea rcx, [rsp + 0x320]
call fcn.1400d4810
test eax, eax
jne 0x1400d53b2
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
lea rdi, [rsp + 0x320]
repne scasw ax, word [rdi]
not rcx
and ecx, ecx
movsxd rdi, ecx
mov eax, 2
mul rdi
cmovo rax, rsi
mov rcx, rax
call sub.MFC80U.DLL_Ordinal_265
mov rsi, rax
mov qword [rsp + 0x50], rax
lea r8, [rdi + rdi]
xor edx, edx
mov rcx, rax
call sub.ntdll.dll_memset
lea rdx, [rsp + 0x320]
lea rax, [rsp + 0x320]
sub rsi, rax
nop
nop
nop
movzx ecx, word [rdx]
mov word [rdx + rsi], cx
add rdx, 2
test cx, cx
jne 0x1400d5130
mov eax, dword [0x140434808]
test al, 1
jne 0x1400d5177
or eax, 1
mov dword [0x140434808], eax
xor eax, eax
mov qword [0x1404347f0], rax
mov qword [0x1404347f8], rax
mov qword [0x140434800], rax
lea rcx, [0x1402dc210]
call fcn.140161180
nop
lea rdx, [rsp + 0x50]
lea rcx, [0x1404347e8]
call fcn.14004d180
jmp 0x1400d53b2
mov dword [0x140434758], 1
xor edx, edx
mov r8d, 0x2bc
lea rcx, [rsp + 0x7e0]
call sub.ntdll.dll_memset
xor edx, edx
mov r8d, 0x2bc
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
call sub.ntdll.dll_memset
lea r9, [rsp + 0xec]
mov r8, rsi
lea rdx, [0x1402e0040]
lea rcx, [rsp + 0x7e0]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea r9, [rsp + 0xec]
mov r8, qword [rsp + 0x90]
lea rdx, [0x1402e0040]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
call qword [sym.imp.MSVCR80.dll__swprintf]
mov edx, 0x80
lea rcx, [rsp + 0x7e0]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor edx, edx
mov qword [rsp + 0x50], rdx
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0xdc]
mov dword [rsp + 0x54], eax
mov rsi, qword [rsp + 0x50]
sub qword [rbx], rsi
cmp qword [rbx], rdx
jle 0x1400d5647
mov dword [rsp + 0x50], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbp
mov rax, qword [rsp + 0x15a0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x78]
mov r8, qword [rsp + 0x70]
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
lea rcx, [rsp + 0x7e0]
call fcn.1400d35d0
test eax, eax
jne 0x1400d5291
add qword [rbx], rsi
cmp dword [rsp + 0x50], 0
je 0x1400d5644
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400d557e
mov edx, dword [rsp + 0xc0]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rsp + 0x7e0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400d53b2
call fcn.1400d3dc0
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x1400d5303
mov rax, qword [rax + 0x10]
sub rax, rcx
sar rax, 3
cmp rax, 0x186a0
ja 0x1400d54c4
lea rcx, [rsp + 0x7e0]
call fcn.1400d4810
test eax, eax
jne 0x1400d53a7
xor eax, eax
or r8, 0xffffffffffffffff
mov rcx, r8
lea rdi, [rsp + 0x7e0]
repne scasw ax, word [rdi]
not rcx
and ecx, ecx
movsxd rdi, ecx
mov eax, 2
mul rdi
cmovo rax, r8
mov rcx, rax
call sub.MFC80U.DLL_Ordinal_265
mov rbx, rax
mov qword [rsp + 0x50], rax
lea r8, [rdi + rdi]
xor edx, edx
mov rcx, rax
call sub.ntdll.dll_memset
lea rdx, [rsp + 0x7e0]
lea rax, [rsp + 0x7e0]
sub rbx, rax
nop
nop
nop
nop
movzx ecx, word [rdx]
mov word [rdx + rbx], cx
add rdx, 2
test cx, cx
jne 0x1400d5380
call fcn.1400d3dc0
mov rcx, rax
lea rdx, [rsp + 0x50]
call fcn.14004d180
mov rbx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x88]
add qword [rax], rsi
cmp qword [rbx], 0
jle 0x1400d5647
mov rax, qword [rbp]
mov rcx, rbp
call qword [rax + 0xf0]
test eax, eax
jne 0x1400d556a
jmp 0x1400d53e6
mov rbx, qword [rsp + 0x58]
jmp 0x1400d53e6
mov rbx, qword [rsp + 0x58]
jmp 0x1400d53e6
mov rbx, qword [rsp + 0x58]
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1400d5647
xor edi, edi
mov rsi, qword [rsp + 0x80]
jmp 0x1400d4ce0
mov rax, qword [rbp]
mov edx, 0x2c
mov rcx, rbp
call qword [rax + 0x40]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FindClose]
mov r8d, 0x3e8
lea rdx, [rsp + 0x320]
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_wcstombs]
mov edx, 0x7d
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_strchr]
lea rbp, [rax + 1]
call fcn.140049470
mov rsi, rax
mov rbx, qword [rax]
mov rax, qword [rsp + 0x60]
movzx edi, word [rax]
mov edx, 0x1ca
lea rcx, str...copyfile.cpp
call fcn.1400d3490
mov r8, rax
mov qword [rsp + 0x20], rbp
mov r9d, edi
lea rdx, str._s:_Failed_to_create_folder:_c:_s.
mov rcx, rsi
call qword [rbx + 0x10]
xor eax, eax
jmp 0x1400d5669
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x1400d5669
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x1400d5669
mov byte [rsp + 0xaa0], 0
xor edx, edx
mov r8d, 0x3e7
lea rcx, [rsp + 0xaa1]
call sub.ntdll.dll_memset
mov r8d, 0x3e8
lea rdx, [rsp + 0x7e0]
lea rcx, [rsp + 0xaa0]
call qword [sym.imp.ntdll.dll_wcstombs]
mov edx, 0x7d
lea rcx, [rsp + 0xaa0]
call qword [sym.imp.ntdll.dll_strchr]
lea rbp, [rax + 1]
call fcn.140049470
mov rsi, rax
mov rbx, qword [rax]
mov rax, qword [rsp + 0x60]
movzx edi, word [rax]
mov edx, Ordinal_588
lea rcx, str...copyfile.cpp
call fcn.1400d3490
mov r8, rax
mov qword [rsp + 0x20], rbp
mov r9d, edi
lea rdx, str._s:_Failed_to_delete_file:_c:_s
mov rcx, rsi
call qword [rbx + 0x10]
mov rcx, qword [rsp + reloc.MFC80U.DLL_Ordinal_784]
mov rax, qword [rcx]
mov edx, 0x29
call qword [rax + 0x40]
xor eax, eax
jmp 0x1400d5669
mov rax, qword [rbp]
mov edx, 0x17
mov rcx, rbp
call qword [rax + 0x40]
jmp 0x1400d5647
mov byte [rsp + 0xe90], 0
xor edx, edx
mov r8d, 0x3e7
lea rcx, [rsp + 0xe91]
call sub.ntdll.dll_memset
mov byte [rsp + 0xaa0], 0
xor edx, edx
mov r8d, 0x3e7
lea rcx, [rsp + 0xaa1]
call sub.ntdll.dll_memset
mov r8d, 0x3e8
lea rdx, [rsp + 0x7e0]
lea rcx, [rsp + 0xe90]
call qword [sym.imp.ntdll.dll_wcstombs]
mov r8d, 0x3e8
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_4736]
lea rcx, [rsp + 0xaa0]
call qword [sym.imp.ntdll.dll_wcstombs]
call fcn.140049470
mov rdi, rax
mov rsi, qword [rax]
mov edx, Ordinal_568
lea rcx, str...copyfile.cpp
call fcn.1400d3490
mov r8, rax
lea rax, [rsp + 0xaa0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe90]
lea rdx, str._s:_Copy_file_from__s_to__s_failed.
mov rcx, rdi
call qword [rsi + 0x10]
mov rax, qword [rbp]
mov edx, 0x26
mov rcx, rbp
call qword [rax + 0x40]
xor eax, eax
jmp 0x1400d5669
mov qword [rbx], rdi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rdx, qword [rbp]
mov rcx, rbp
call qword [rdx + 0xc8]
test eax, eax
mov eax, 0
sete al
mov rcx, qword [rsp + 0x1540]
xor rcx, rsp
call fcn.140161080
add rsp, 0x1558
pop rdi
pop rsi
pop rbp
pop rbx
ret