Function at 0x140165830
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2c0]
sub rsp, 0x3c0
mov rax, qword [0x1403debe8]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
movzx r12d, dl
mov rdi, rcx
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp - 0x80]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x90]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x1a0]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
lea rbx, [rdi + 8]
mov rdx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1401658b1
mov rdx, qword [rbx]
lea r8, [0x1402d67b4]
lea rcx, [rsp + 0x20]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
mov r8, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1401658cf
mov r8, qword [rbx]
mov edx, 0x104
lea rcx, [rbp - 0x80]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
lea r8, str..cached
mov edx, 0x104
lea rcx, [rbp - 0x80]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
mov r8, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x1401658ff
mov r8, qword [rbx]
mov edx, 0x104
lea rcx, [rbp + 0x90]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
lea r8, str..cached.temp
mov edx, 0x104
lea rcx, [rbp + 0x90]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
mov r8, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140165935
mov r8, qword [rbx]
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy_s
lea r8, str..cached_journal
mov edx, 0x104
lea rcx, [rbp + 0x1a0]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat_s
lea rcx, [rbp - 0x80]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
lea rcx, [rbp + 0x90]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
lea rcx, [rbp + 0x1a0]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
xor r13d, r13d
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], SafeArrayLock
lea rax, [rbp - 0x80]
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r13b
jne 0x1401659a0
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x58]
call fcn.1400f8840
lea rcx, [rdi + 0x28]
lea rdx, [rsp + 0x58]
call fcn.1400ecb90
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x140165a02
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1401659fd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140165bc2
call fcn.14020be84
cmp qword [rsp + 0x20], r13
je 0x140165b92
mov r15, qword [rbx + 0x10]
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, r15
cmp rax, 0x10
jb 0x140165bc8
cmp qword [rbx + 0x18], 0x10
jb 0x140165a35
mov rbx, qword [rbx]
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], r13
lea r14, [r15 + 0x10]
mov edi, SafeArrayGetLBound
lea rsi, [rsp + 0x58]
cmp r14, rdi
jbe 0x140165a85
mov rdi, r14
or rdi, 0xf
cmp rdi, rcx
jbe 0x140165a68
mov rdi, rcx
jmp 0x140165a74
mov eax, SafeArrayPutElement
cmp rdi, rax
cmovb rdi, rax
lea rcx, [rdi + 1]
call fcn.1400e1b00
mov rsi, rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], rdi
movups xmm0, xmmword [str._decryptDBFast_]
movups xmmword [rsi], xmm0
lea rcx, [rsi + 0x10]
mov r8, r15
mov rdx, rbx
call fcn.140244220
mov byte [rsi + r14], r13b
mov r8d, 6
lea rdx, str._exist
lea rcx, [rsp + 0x58]
call fcn.1400f8490
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], SafeArrayLock
mov byte [rax], 0
lea rcx, [rsp + 0x30]
call fcn.140195010
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x140165b3a
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140165b35
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140165bbc
call fcn.14020be84
lea r8, [0x1402d67fc]
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x28]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
cmp eax, 0xffffffff
je 0x140165b7e
nop
mov ecx, r12d
xor ecx, eax
mov rdx, qword [rsp + 0x28]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putc
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
cmp eax, 0xffffffff
jne 0x140165b60
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, qword [rsp + 0x28]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.14020c3e0
mov rbx, qword [rsp + 0x410]
add rsp, 0x3c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn
int3
call sub.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn
int3
call fcn.1400f83d0
int3