Function at 0x140020084
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x38
xor r12d, r12d
xor r15d, r15d
and qword [rbp + 0x50], r12
mov rsi, rcx
and qword [rbp + 0x48], r12
mov qword [rbp + 0x60], r12
mov qword [rbp + 0x58], r15
cmp qword [rcx + 0x1d8], r12
jne 0x1400200d2
lea r8, str.m_wszBackupSetDirectory
mov edx, 0x230a
lea rcx, str.base_stor_blbengine_service_backup.cpp
call fcn.14008624c
test byte [rsi + 0x154], 4
lea r13, [0x1401782b0]
je 0x140020184
mov rcx, qword [rsi + 0x1d8]
lea r9, [rbp + 0x60]
xor r8d, r8d
xor edx, edx
call fcn.1401122fc
mov r12, qword [rbp + 0x60]
mov ebx, eax
test eax, eax
js 0x1400203f6
lea rdx, [rbp + 0x58]
mov rcx, r12
call fcn.1400fd654
mov r15, qword [rbp + 0x58]
mov ebx, eax
test eax, eax
js 0x1400203e8
test r15, r15
je 0x140020184
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140020184
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140020171
test byte [rcx + 0x1c], 1
je 0x140020171
cmp byte [rcx + 0x19], 2
jb 0x140020171
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x18b
mov dword [rsp + 0x20], eax
mov r9, r15
call fcn.140005ce8
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x1400203e8
mov rcx, qword [rsi + 0x1d8]
lea rdi, [rsi + 0x128]
mov rdx, rdi
lea r9, [rbp + 0x50]
xor r8d, r8d
call fcn.1401122fc
mov ebx, eax
test eax, eax
js 0x1400203d9
test byte [rsi + 0x154], 1
je 0x1400201da
mov r13, qword [rbp + 0x50]
lea rdx, [rbp + 0x48]
mov rcx, r13
xor r8d, r8d
call fcn.14008704c
mov ebx, eax
test eax, eax
js 0x1400203c0
mov r14, qword [rbp + 0x48]
jmp 0x140020263
mov rcx, qword [rsi + 0x1d8]
lea r9, [rbp + 0x48]
mov r8b, 1
mov rdx, rdi
call fcn.1401122fc
mov ebx, eax
test eax, eax
js 0x1400203c0
mov r14, qword [rbp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14002025f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 2
je 0x14002025f
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x14002024c
test byte [rcx + 0x1c], 1
je 0x14002024c
cmp byte [rcx + 0x19], 2
jb 0x14002024c
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x18c
mov dword [rsp + 0x20], eax
mov r9, r14
call fcn.140005ce8
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x1400203c4
mov r13, qword [rbp + 0x50]
cmp qword [rsi + 0x190], 0
jne 0x140020285
lea r8, str.m_pLocalCatalog
mov edx, 0x2355
lea rcx, str.base_stor_blbengine_service_backup.cpp
call fcn.14008624c
mov rdi, qword [rsi + 0x190]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x88]
mov rcx, rbx
call qword [0x14014cce0]
mov rdx, r14
mov rcx, rdi
call rbx
mov ebx, eax
test eax, eax
js 0x1400203c4
test byte [rsi + 0x154], 1
jne 0x140020329
mov r8d, 1
mov rdx, r13
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x140020329
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x14002024c
test byte [rcx + 0x1c], 1
je 0x14002024c
cmp byte [rcx + 0x19], 2
jb 0x14002024c
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x18d
mov dword [rsp + 0x28], edi
mov r9, r14
mov qword [rsp + 0x20], r13
call fcn.140005e64
jmp 0x14002024c
test byte [rsi + 0x154], 0x80
je 0x1400203c4
cmp byte [rsi + 0x114], 0
je 0x1400203c4
mov ecx, 0x20
call fcn.1401470a8
xor ecx, ecx
mov qword [rbp + 0x48], rax
mov rdi, rax
test rax, rax
je 0x140020372
lea rax, [0x14014e7b8]
mov byte [rdi + 8], cl
mov qword [rdi], rax
mov qword [rdi + 0x18], rcx
mov qword [rdi + 0x10], rcx
jmp 0x140020375
mov rdi, rcx
mov rdx, r13
mov rcx, rdi
call fcn.140012584
mov ebx, eax
test eax, eax
js 0x1400203c4
add rsi, 0x308
mov r13, qword [rsi + 8]
cmp r13, qword [rsi + 0x10]
jb 0x1400203ab
lea rdx, [r13 + 1]
mov rcx, rsi
call fcn.14000ff48
test al, al
je 0x14002044b
mov rax, qword [rsi]
lea rcx, [rax + r13*8]
test rcx, rcx
je 0x1400203ba
mov qword [rcx], rdi
inc qword [rsi + 8]
jmp 0x1400203c4
mov r14, qword [rbp + 0x48]
test r14, r14
je 0x1400203d2
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea r13, [0x1401782b0]
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400203e8
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r15, r15
je 0x1400203f6
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r12, r12
je 0x140020404
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jns 0x140020438
mov rcx, qword [0x1401782b0]
cmp rcx, r13
je 0x140020438
test byte [rcx + 0x1c], 1
je 0x140020438
cmp byte [rcx + 0x19], 2
jb 0x140020438
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x18e
mov r9d, ebx
call fcn.140004c90
mov eax, ebx
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x8007000e
call fcn.140001b20
int3