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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x590], rax
lea rax, [rbp + 0x380]
mov r9, rcx
mov rbx, rdx
sub r9, rax
mov r10, rcx
lea rdx, [rbp + 0x380]
mov r8d, 0x104
nop word [rax + rax]
lea rax, [r8 + 0x7ffffefa]
test rax, rax
je 0x140039103
movzx eax, word [r9 + rdx]
test ax, ax
je 0x140039103
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x1400390e0
test r8, r8
lea rax, [rdx - 2]
lea rcx, [rbp + 0x170]
cmovne rax, rdx
xor r8d, r8d
mov edx, 0x104
mov word [rax], r8w
lea rax, [rbp + 0x170]
sub r10, rax
nop dword [rax + rax]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140039153
movzx eax, word [rcx + r10]
test ax, ax
je 0x140039153
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140039130
test rdx, rdx
lea rax, [rcx - 2]
lea rdx, [rbp + 0x380]
cmovne rax, rcx
or rcx, 0xffffffffffffffff
mov word [rax], r8w
mov rax, rcx
cmp word [rdx + rax*2 + 2], r8w
lea rax, [rax + 1]
jne 0x140039170
cmp word [rbp + rax*2 + 0x37e], 0x5c
jne 0x1400391a4
lea rax, [rax*2 - 2]
cmp rax, 0x208
jae 0x14003966a
mov word [rbp + rax + 0x380], r8w
lea rax, [rbp + 0x170]
nop dword [rax + rax]
cmp word [rax + rcx*2 + 2], r8w
lea rcx, [rcx + 1]
jne 0x1400391b0
cmp word [rbp + rcx*2 + 0x16e], 0x5c
jne 0x1400391e5
lea rcx, [rcx*2 - 2]
cmp rcx, 0x208
jae 0x140039670
mov word [rbp + rcx + 0x170], r8w
mov qword [rsp + 0x6b0], rsi
lea rax, [rbp + 0x380]
mov ecx, 0x104
nop dword [rax]
cmp word [rax], r8w
je 0x140039210
add rax, 2
sub rcx, 1
jne 0x140039200
test rcx, rcx
mov edx, 0x80070057
cmovne edx, r8d
je 0x140039228
mov eax, 0x104
sub rax, rcx
jmp 0x14003922b
mov rax, r8
test edx, edx
js 0x14003928a
mov edx, 0x104
lea rcx, [rbp + 0x380]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x14003927b
add rax, 0x7ffffefb
lea r9, [0x1400751cc]
add rax, rdx
sub r9, rcx
test rax, rax
je 0x140039278
movzx r8d, word [rcx + r9]
test r8w, r8w
je 0x140039278
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x140039257
xor r8d, r8d
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r8w
mov ecx, 0x104
lea rax, [rbp + 0x170]
cmp word [rax], 0
je 0x1400392a6
add rax, 2
sub rcx, 1
jne 0x140039296
test rcx, rcx
mov edx, 0x80070057
cmovne edx, r8d
je 0x1400392be
mov eax, 0x104
sub rax, rcx
jmp 0x1400392c1
mov rax, r8
test edx, edx
js 0x140039323
mov edx, 0x104
lea rcx, [rbp + 0x170]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x140039314
add rax, 0x7ffffefb
lea r9, [0x140087460]
add rax, rdx
sub r9, rcx
nop dword [rax]
test rax, rax
je 0x140039311
movzx r8d, word [r9 + rcx]
test r8w, r8w
je 0x140039311
mov word [rcx], r8w
dec rax
add rcx, 2
sub rdx, 1
jne 0x1400392f0
xor r8d, r8d
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r8w
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140039368
test rbx, rbx
je 0x140039361
lea r8, [rbp + 0x380]
mov rcx, rbx
lea rdx, str.first_file_hfind___s__is_invalid
call fcn.140036ed0
mov rcx, rbx
call fcn.140036110
xor al, al
jmp 0x140039642
lea r8, [rbp + 0x170]
mov qword [rsp + 0x6c0], rdi
lea rax, [rbp + 0x380]
mov edx, 0x104
sub r8, rax
lea rcx, [rbp + 0x380]
nop dword [rax]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400393b3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1400393b3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140039390
test rdx, rdx
lea rax, [rcx - 2]
mov dil, 1
cmovne rax, rcx
xor r10d, r10d
mov word [rax], r10w
jmp 0x1400393d3
xor r10d, r10d
movzx ecx, word [rsp + 0x4c]
cmp cx, word [0x14008808c]
movzx eax, word [rsp + 0x4e]
jne 0x1400393f3
cmp ax, word [0x14008808e]
je 0x1400395d3
cmp cx, word [0x140088090]
jne 0x140039417
cmp ax, word [0x140088092]
jne 0x140039417
movzx eax, word [rsp + 0x50]
cmp ax, word [0x140088094]
je 0x1400395d3
mov ecx, 0x104
lea rax, [rbp + 0x170]
cmp word [rax], 0
je 0x140039433
add rax, 2
sub rcx, 1
jne 0x140039423
test rcx, rcx
mov edx, 0x80070057
cmovne edx, r10d
je 0x14003944b
mov eax, 0x104
sub rax, rcx
jmp 0x14003944e
mov rax, r10
test edx, edx
js 0x1400394ae
mov edx, 0x104
lea rcx, [rbp + 0x170]
lea rcx, [rcx + rax*2]
sub rdx, rax
je 0x14003949f
lea r8, [rax + 0x7ffffefb]
add r8, rdx
lea r9, [rsp + 0x4c]
sub r9, rcx
nop dword [rax]
test r8, r8
je 0x14003949f
movzx eax, word [r9 + rcx]
test ax, ax
je 0x14003949f
mov word [rcx], ax
dec r8
add rcx, 2
sub rdx, 1
jne 0x140039480
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r10w
test byte [rsp + 0x20], 0x10
lea rcx, [rbp + 0x170]
je 0x140039540
mov rdx, rbx
call fcn.140039090
test al, al
jne 0x1400394f2
test rbx, rbx
je 0x1400394ef
lea r8, [rbp + 0x170]
mov rcx, rbx
lea rdx, str.failed_deleting_directory__s
call fcn.140036ed0
mov rcx, rbx
call fcn.140036110
xor dil, dil
lea r8, [rbp + 0x380]
mov edx, 0x104
lea rax, [rbp + 0x170]
sub r8, rax
lea rcx, [rbp + 0x170]
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400395c3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1400395c3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140039510
jmp 0x1400395c3
mov edx, 0x80
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140039582
test rbx, rbx
je 0x14003957f
lea r8, [rbp + 0x170]
mov rcx, rbx
lea rdx, str.failed_deleting_file__s
call fcn.140036ed0
mov rcx, rbx
call fcn.140036110
xor dil, dil
lea r8, [rbp + 0x380]
mov edx, 0x104
lea rax, [rbp + 0x170]
sub r8, rax
lea rcx, [rbp + 0x170]
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400395c3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1400395c3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1400395a0
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
xor ecx, ecx
mov word [rax], cx
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1400393d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, dil
mov rcx, rsi
cmp eax, 0x12
mov eax, 0
cmovne ebx, eax
call qword [sym.imp.KERNEL32.dll_FindClose]
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rdi, qword [rsp + 0x6c0]
cmp eax, 0xffffffff
jne 0x140039625
mov al, 1
jmp 0x140039642
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edx, 1
movzx ecx, bl
cmp eax, edx
cmove ecx, edx
movzx eax, cl
mov rsi, qword [rsp + 0x6b0]
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.14003d350
mov rbx, qword [rsp + 0x6c8]
add rsp, 0x6a0
pop rbp
ret
call fcn.14003d47c
int3
call fcn.14003d47c
int3