Function at 0x14020c224
Capabilities:
Check if file exists
Get file attributes
Move file

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x130
mov qword [rbp + 8], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r15, r8
mov r13, rdx
mov rsi, rcx
mov rax, qword [rcx]
call qword [rax + 0x30]
test al, al
jne 0x14020c26b
lea rcx, [rsi - 8]
mov rax, qword [rcx]
call qword [rax + 0x18]
jmp 0x14020cbdb
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
mov ebx, eax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor edi, edi
cmp eax, 0xffffffff
setne dil
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetErrorMode]
xor ebx, ebx
test edi, edi
je 0x14020cbdb
lea r14, [rsi - 8]
mov rdx, r13
mov rcx, r14
call fcn.14020efc0
test al, al
jne 0x14020cbdb
lea rdx, str.Databases.db
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020c354
lea rax, vtable.Piriform::CSafariStorageDatabases.0
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rbx
mov qword [rbp - 0x38], rbx
lea rcx, [rsi + 0xb8]
call fcn.14000bff0
xor r12d, r12d
mov dword [rsi + 0xf8], r12d
test r14, r14
lea r9, [rsi + 0x68]
jne 0x14020c301
mov r9d, r12d
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp - 0x48]
call fcn.1401b9c74
cmp dword [rsi + 0xf8], r12d
jle 0x14020c344
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x14020c344
mov rax, qword [rsi + 0x18]
cmp byte [rax + 1], r12b
jne 0x14020c344
lea r8, [rsi + 0xb8]
mov rdx, r13
lea rcx, [rbp - 0x48]
call fcn.1401b99f4
nop
lea rax, vtable.Piriform::CSafariStorageDatabases.0
mov qword [rbp - 0x48], rax
jmp 0x14020c3f0
lea rdx, str.ApplicationCache.db
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020c3f2
lea rax, vtable.Piriform::CSafariOfflineCacheCookies.0
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x18], rbx
lea rcx, [rsi + 0xb8]
call fcn.14000bff0
xor r12d, r12d
mov dword [rsi + 0xf8], r12d
test r14, r14
lea r9, [rsi + 0x68]
jne 0x14020c3a2
mov r9d, r12d
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp - 0x28]
call fcn.1401b97f4
cmp dword [rsi + 0xf8], r12d
jle 0x14020c3e5
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x14020c3e5
mov rax, qword [rsi + 0x18]
cmp byte [rax + 1], r12b
jne 0x14020c3e5
lea r8, [rsi + 0xb8]
mov rdx, r13
lea rcx, [rbp - 0x28]
call fcn.1401b9314
nop
lea rax, vtable.Piriform::CSafariOfflineCacheCookies.0
mov qword [rbp - 0x28], rax
xor ebx, ebx
lea rdx, str.StorageTracker.db
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020c48e
lea rax, vtable.Piriform::CSafariLocalStorageDatabases.0
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rbx
mov qword [rbp], rbx
lea rcx, [rsi + 0xb8]
call fcn.14000bff0
lea rcx, [rsi + 0xd8]
call fcn.14000bff0
mov dword [rsi + 0xf8], ebx
test r14, r14
lea r9, [rsi + 0x68]
jne 0x14020c448
mov r9, rbx
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp - 0x10]
call fcn.1401b9ff4
cmp dword [rsi + 0xf8], ebx
jle 0x14020c489
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x14020c489
mov rax, qword [rsi + 0x18]
cmp byte [rax + 1], bl
jne 0x14020c489
lea r8, [rsi + 0xd8]
mov rdx, r13
lea rcx, [rbp - 0x10]
call fcn.1401b9e74
nop
jmp 0x14020cbdb
lea rdx, [0x1403695f8]
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020c5d7
lea rdx, [r15 + 0x2c]
lea rcx, [rbp + 0x88]
call fcn.1401b8cc4
nop
mov rax, qword [rbp + 0x88]
or r12, 0xffffffffffffffff
cmp dword [rax - 0x10], ebx
je 0x14020c5cb
lea rdx, [rsi + 0x78]
lea rcx, [rbp + 0x88]
call fcn.1401f1564
test al, al
jne 0x14020c5cb
mov ecx, 0x88
call fcn.1400be454
mov qword [rbp + 0x70], rax
test rax, rax
je 0x14020c505
mov rdx, qword [rsi + 8]
mov rcx, rax
call fcn.14006de38
jmp 0x14020c508
mov rax, rbx
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.1400186f8
nop
mov r9, qword [rsp + 0x30]
test r13, r13
jne 0x14020c524
mov ecx, ebx
jmp 0x14020c535
xor eax, eax
mov rcx, r12
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, r13
lea rcx, [r9 + 0x20]
call fcn.14000c9f8
mov edx, dword [r15 + 0x1c]
shl rdx, 0x20
mov eax, dword [r15 + 0x20]
or rdx, rax
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x28], rdx
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x30], 1
mov rax, qword [rsi]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [rax + 0x68]
mov rdx, qword [r14 + 0x20]
lea rcx, [r14 + 8]
mov rax, qword [rcx]
cmp byte [rdx + 1], bl
lea rdx, [rsp + 0x30]
je 0x14020c590
call qword [rax + 0x60]
jmp 0x14020c594
call qword [rax + reloc.OLEAUT32.dll_VarBstrFromCy]
nop
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x14020c5cb
mov eax, r12d
lock xadd dword [rdi + 8], eax
add eax, r12d
jne 0x14020c5cb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
lock xadd dword [rdi + 0xc], eax
add eax, r12d
jne 0x14020c5cb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
nop
mov rdx, qword [rbp + 0x88]
jmp 0x14020cbbf
lea rdx, str.cookies.plist
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020c65b
lea rcx, [rbp + 0x10]
call fcn.1401b8244
nop
lea rcx, [rsi + 0xb8]
call fcn.14000bff0
mov dword [rsi + 0xf8], ebx
neg r14
sbb r8, r8
and r8, rsi
xor edx, edx
mov rcx, r13
call fcn.1401b91b4
cmp dword [rsi + 0xf8], ebx
jle 0x14020c64d
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x14020c64d
mov rax, qword [rsi + 0x18]
cmp byte [rax + 1], bl
jne 0x14020c64d
lea r8, [rsi + 0xb8]
mov rdx, r13
lea rcx, [rbp + 0x10]
call fcn.1401b9254
nop
lea rcx, [rbp + 0x10]
call fcn.1401b8094
jmp 0x14020cbdb
lea rdx, str.Cookies.binarycookies
lea rcx, [r15 + 0x2c]
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020ca71
cmp qword [rsi + 0x88], rbx
jne 0x14020c77c
mov ecx, 0x88
call fcn.1400be454
mov qword [rbp + 0x70], rax
test rax, rax
je 0x14020c6a2
mov rdx, qword [rsi + 8]
mov rcx, rax
call fcn.14006de38
jmp 0x14020c6a5
mov rax, rbx
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.1400186f8
nop
mov r9, qword [rsp + 0x48]
or r12, 0xffffffffffffffff
test r13, r13
jne 0x14020c6c5
mov ecx, ebx
jmp 0x14020c6d6
xor eax, eax
mov rcx, r12
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, r13
lea rcx, [r9 + 0x20]
call fcn.14000c9f8
mov edx, dword [r15 + 0x1c]
shl rdx, 0x20
mov eax, dword [r15 + 0x20]
or rdx, rax
mov rax, qword [rsp + 0x48]
mov qword [rax + 0x28], rdx
mov rax, qword [rsp + 0x48]
mov dword [rax + 0x30], 1
mov rax, qword [rsi]
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [rax + 0x68]
mov rdx, qword [r14 + 0x20]
lea rcx, [r14 + 8]
mov rax, qword [rcx]
cmp byte [rdx + 1], bl
lea rdx, [rsp + 0x48]
je 0x14020c731
call qword [rax + 0x60]
jmp 0x14020c735
call qword [rax + reloc.OLEAUT32.dll_VarBstrFromCy]
nop
mov rdi, qword [rsp + 0x50]
test rdi, rdi
je 0x14020cbdb
mov eax, r12d
lock xadd dword [rdi + 8], eax
add eax, r12d
jne 0x14020cbdb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
lock xadd dword [rdi + 0xc], eax
add eax, r12d
jne 0x14020cbdb
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
jmp 0x14020cbdb
lea rax, vtable.Piriform::ISafariCookiesManager.0
mov qword [rbp - 0x80], rax
lea rax, vtable.Piriform::IOperationImpl_struct_Piriform::IOperation_.0
mov qword [rbp - 0x70], rax
mov byte [rbp - 0x68], bl
mov qword [rbp - 0x60], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x60], rax
lea rax, vtable.Piriform::CSafariBinaryCookiesManagerImpl.0
mov qword [rbp - 0x80], rax
lea rax, vtable.Piriform::CSafariBinaryCookiesManagerImpl.1.0
mov qword [rbp - 0x78], rax
lea rax, vtable.Piriform::CSafariBinaryCookiesManagerImpl.2.0
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x50], rbx
lea rcx, [rsi + 0xb8]
call fcn.14000bff0
mov dword [rsi + 0xf8], ebx
test r14, r14
lea r9, [rsi + 0x70]
jne 0x14020c7f6
mov r9, rbx
xor r8d, r8d
mov rdx, r13
lea rcx, [rbp - 0x80]
call fcn.1402e0f64
cmp dword [rsi + 0xf8], ebx
jle 0x14020ca38
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x30]
test al, al
je 0x14020ca38
mov rax, qword [rsi + 0x18]
cmp byte [rax + 1], bl
jne 0x14020ca38
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp + 0x70], rax
lea rdx, [0x140363bd0]
lea rcx, [rsp + 0x68]
call fcn.14000cb18
nop
lea rdx, [rsp + 0x68]
lea rcx, [rbp + 0x70]
call fcn.140222e48
mov edi, eax
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
or r12, 0xffffffffffffffff
mov ecx, r12d
lock xadd dword [rdx + 0x10], ecx
add ecx, r12d
test ecx, ecx
jg 0x14020c88f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test edi, edi
jne 0x14020ca17
lea r8, [rsi + 0x98]
mov rbx, qword [rbp + 0x70]
mov r9, rbx
mov rdx, r13
lea rcx, [rbp - 0x80]
call fcn.1402e1124
test eax, eax
je 0x14020c947
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14020ca1b
mov ecx, 0x88
call fcn.1400be454
mov qword [rbp - 0x30], rax
test rax, rax
je 0x14020c8eb
mov rdx, qword [rsi + 8]
mov rcx, rax
call fcn.14006de38
nop
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.1400186f8
nop
mov rcx, qword [rsp + 0x58]
add rcx, 0x20
lea rdx, [rbp + 0x70]
call fcn.14000c244
mov edx, dword [r15 + 0x1c]
shl rdx, 0x20
mov eax, dword [r15 + 0x20]
or rdx, rax
mov rax, qword [rsp + 0x58]
mov qword [rax + 0x28], rdx
mov rax, qword [rsp + 0x58]
mov dword [rax + 0x30], 1
lea rdx, [rsp + 0x58]
mov rcx, r14
call fcn.140210270
nop
mov rdi, qword [rsp + 0x60]
jmp 0x14020c9e6
mov ecx, 0x88
call fcn.1400be454
mov qword [rbp - 0x30], rax
test rax, rax
je 0x14020c967
mov rdx, qword [rsi + 8]
mov rcx, rax
call fcn.14006de38
nop
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.1400186f8
nop
mov r9, qword [rsp + 0x70]
test r13, r13
jne 0x14020c983
xor ecx, ecx
jmp 0x14020c994
xor eax, eax
mov rcx, r12
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, r13
lea rcx, [r9 + 0x20]
call fcn.14000c9f8
mov edx, dword [r15 + 0x1c]
shl rdx, 0x20
mov eax, dword [r15 + 0x20]
or rdx, rax
mov rax, qword [rsp + 0x70]
mov qword [rax + 0x28], rdx
mov rax, qword [rsp + 0x70]
mov dword [rax + 0x30], 1
lea rdx, [rsp + 0x70]
mov rcx, r14
call fcn.140210270
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MoveFileW]
nop
mov rdi, qword [rsp + 0x78]
test rdi, rdi
je 0x14020ca1b
mov eax, r12d
lock xadd dword [rdi + 8], eax
add eax, r12d
jne 0x14020ca17
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
lock xadd dword [rdi + 0xc], eax
add eax, r12d
jne 0x14020ca17
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
mov rbx, qword [rbp + 0x70]
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x14020ca38
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rax, vtable.Piriform::CSafariBinaryCookiesManagerImpl.0
mov qword [rbp - 0x80], rax
lea rax, vtable.Piriform::CSafariBinaryCookiesManagerImpl.1.0
mov qword [rbp - 0x78], rax
lea rax, vtable.Piriform::IOperationImpl_struct_Piriform::IOperation_.0
mov qword [rbp - 0x70], rax
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x14020cbdb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14020cbdb
lea rdx, str.databaseshttp__0
mov rcx, r13
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
jne 0x14020ca9d
lea rdx, str.databaseshttps__0
mov rcx, r13
call qword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x14020cbdb
mov rdx, r13
lea rcx, [rsp + 0x40]
call fcn.1401b89a4
nop
mov rax, qword [rsp + 0x40]
or r12, 0xffffffffffffffff
cmp dword [rax - 0x10], ebx
je 0x14020cbba
lea rdx, [rsi + 0x78]
lea rcx, [rsp + 0x40]
call fcn.1401f1564
test al, al
jne 0x14020cbba
mov ecx, 0x88
call fcn.1400be454
mov qword [rbp + 0x70], rax
test rax, rax
je 0x14020caf4
mov rdx, qword [rsi + 8]
mov rcx, rax
call fcn.14006de38
jmp 0x14020caf7
mov rax, rbx
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.1400186f8
nop
mov r9, qword [rsp + 0x20]
test r13, r13
jne 0x14020cb13
mov ecx, ebx
jmp 0x14020cb24
xor eax, eax
mov rcx, r12
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
dec rcx
mov r8d, ecx
mov rdx, r13
lea rcx, [r9 + 0x20]
call fcn.14000c9f8
mov edx, dword [r15 + 0x1c]
shl rdx, 0x20
mov eax, dword [r15 + 0x20]
or rdx, rax
mov rax, qword [rsp + 0x20]
mov qword [rax + 0x28], rdx
mov rax, qword [rsp + 0x20]
mov dword [rax + 0x30], 1
mov rax, qword [rsi]
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [rax + 0x68]
mov rdx, qword [r14 + 0x20]
lea rcx, [r14 + 8]
mov rax, qword [rcx]
cmp byte [rdx + 1], bl
lea rdx, [rsp + 0x20]
je 0x14020cb7f
call qword [rax + 0x60]
jmp 0x14020cb83
call qword [rax + reloc.OLEAUT32.dll_VarBstrFromCy]
nop
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x14020cbba
mov eax, r12d
lock xadd dword [rdi + 8], eax
add eax, r12d
jne 0x14020cbba
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r12d
lock xadd dword [rdi + 0xc], eax
add eax, r12d
jne 0x14020cbba
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x10]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
add eax, r12d
test eax, eax
jg 0x14020cbdb
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x178]
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret