Function at 0x14026c340
Capabilities:
Move file

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
push r12
sub rsp, 0xc0
mov rax, qword [rcx + 0x60]
lea rdx, str.main
mov rsi, rcx
mov r12, qword [rax]
mov rcx, r12
call fcn.140289610
test eax, eax
js 0x14026cd2e
movsxd rdx, eax
mov rax, qword [r12 + 0x20]
shl rdx, 5
mov rax, qword [rdx + rax + 8]
test rax, rax
je 0x14026cd2e
mov rax, qword [rax + 8]
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0xb0], rbp
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0x98], r15
mov r15, qword [rax]
cmp byte [r15 + 0x13], 0
je 0x14026c3c2
lea r15, [0x1403d750c]
jmp 0x14026c3c9
mov r15, qword [r15 + 0xd8]
xor edi, edi
mov qword [rsp + 0x68], rdi
mov r13d, edi
mov qword [rsp + 0x80], rdi
mov ebp, edi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0xe8], edi
mov dword [rsp + 0xf0], edi
mov dword [rsp + 0xf8], edi
mov dword [rsp + 0x40], edi
test r15, r15
je 0x14026cd2a
mov qword [rsp + 0xa0], r14
mov r14, 0xffffffffffffffff
mov rax, r14
nop word [rax + rax]
inc rax
cmp byte [r15 + rax], dil
jne 0x14026c430
and eax, 0x3fffffff
cmp eax, 1
jb 0x14026cd26
mov rax, qword [rsi + 0x68]
mov eax, dword [rax + 4]
mov dword [rsp + 0x30], eax
inc eax
movsxd rbx, eax
mov rcx, rbx
call fcn.14026fdd0
mov r8, rbx
mov qword [rsp + 0x60], rax
xor edx, edx
mov rcx, rax
mov rsi, rax
call fcn.1402f5120
movsxd rbx, dword [rsp + 0x30]
mov rcx, rsi
mov rdx, qword [rsp + 0xe0]
mov r8, rbx
mov qword [rsp + 0x88], rbx
mov rdx, qword [rdx + 0x68]
mov rdx, qword [rdx + 0x18]
call fcn.1402f4a50
lea rax, [rsp + 0x50]
mov r8d, ebx
mov qword [rsp + 0x28], rax
lea r9, [0x1403fb94f]
lea rax, [rsp + 0xf8]
mov rdx, rsi
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.140269330
mov esi, eax
test eax, eax
jne 0x14026c4e2
lea rdx, str.No_upgrade_required___exiting
lea ecx, [rax + 8]
call fcn.14026fc80
jmp 0x14026cbba
mov r13, qword [rsp + 0x60]
mov ebx, 3
nop dword [rax]
mov edx, ebx
lea rcx, str.PRAGMA_cipher_compatibility___d_
call fcn.1401f3a90
mov r8d, dword [rsp + 0x30]
mov rbp, rax
lea rax, [rsp + 0x50]
mov r9, rbp
mov qword [rsp + 0x28], rax
mov rdx, r13
lea rax, [rsp + 0xf8]
mov rcx, r15
mov qword [rsp + 0x20], rax
call fcn.140269330
mov esi, eax
test eax, eax
je 0x14026c5a3
test rbp, rbp
je 0x14026c557
mov rdx, r14
nop dword [rax]
inc rdx
cmp byte [rdx + rbp], dil
jne 0x14026c540
and edx, 0x3fffffff
mov rcx, rbp
call fcn.14026fb80
dec ebx
test ebx, ebx
jg 0x14026c4f0
lea rdx, str.Upgrade_format_not_determined
mov ecx, 1
call fcn.14026fc80
mov rbp, rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x38], rdi
mov r13, rdi
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0xe8], edi
mov dword [rsp + 0xf0], edi
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x80], rdi
jmp 0x14026cb76
mov r8d, ebx
lea rdx, str.Version__d_format_found
mov ecx, 8
call fcn.14026fc80
mov rdx, r15
lea rcx, str._s_migrated
call fcn.1401f3a90
mov rsi, rax
test rax, rax
jne 0x14026c5de
lea ecx, [rax + 2]
mov rbx, rdi
call fcn.14026fdd0
mov r13, rax
jmp 0x14026c60f
mov rcx, r14
inc rcx
cmp byte [rax + rcx], dil
jne 0x14026c5e1
and ecx, 0x3fffffff
add rcx, 2
call fcn.14026fdd0
mov r13, rax
mov rbx, r14
nop
inc rbx
cmp byte [rsi + rbx], dil
jne 0x14026c600
and ebx, 0x3fffffff
mov r8, rbx
mov dword [rsp + 0xf0], edi
mov rdx, rsi
mov dword [rsp + 0xe8], edi
mov rcx, r13
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x48], rdi
call fcn.1402f4a50
test rsi, rsi
jne 0x14026c644
mov rdx, rdi
jmp 0x14026c656
mov rdx, r14
inc rdx
cmp byte [rsi + rdx], dil
jne 0x14026c647
and edx, 0x3fffffff
mov rcx, rsi
call fcn.14026fb80
mov r8, qword [rsp + 0x60]
lea rcx, str.ATTACH_DATABASE__s_as_migrate_
mov rdx, r13
call fcn.1401f3a90
mov edx, dword [rsp + 0xf8]
lea rcx, str.PRAGMA_migrate.user_version___d_
mov rbx, rax
mov qword [rsp + 0x80], rax
call fcn.1401f3a90
xor r9d, r9d
mov qword [rsp + 0x68], rax
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rbp
mov rcx, r12
call fcn.1401f1c40
mov esi, eax
test eax, eax
je 0x14026c6ca
mov r8d, eax
lea rdx, str.set_compatibility_mode_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, str.PRAGMA_journal_mode__delete_
mov rcx, r12
call fcn.1401f1c40
mov esi, eax
test eax, eax
je 0x14026c703
mov r8d, eax
lea rdx, str.force_journal_mode_DELETE_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rdx, rbx
mov rcx, r12
call fcn.1401f1c40
mov esi, eax
test eax, eax
je 0x14026c738
mov r8d, eax
lea rdx, str.attach_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
mov r9d, dword [rsp + 0x30]
lea rdx, str.migrate
mov r8, qword [rsp + 0x60]
mov rcx, r12
call fcn.1402d4420
mov esi, eax
test eax, eax
je 0x14026c770
mov r8d, eax
lea rdx, str.keying_attached_database_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, str.SELECT_sqlcipher_export_migrate__
mov rcx, r12
call fcn.1401f1c40
mov esi, eax
test eax, eax
je 0x14026c7a9
mov r8d, eax
lea rdx, str.sqlcipher_export_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
mov rdx, qword [rsp + 0x68]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rcx, r12
call fcn.1401f1c40
mov esi, eax
test eax, eax
je 0x14026c7e0
mov r8d, eax
lea rdx, str.set_user_version_failed__error_code__d
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
cmp byte [r12 + 0x65], dil
jne 0x14026c7fd
lea rdx, str.cannot_migrate_from_within_a_transaction
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
cmp dword [r12 + 0xd8], 1
jle 0x14026c81e
lea rdx, str.cannot_migrate___SQL_statements_in_progress
mov ecx, 1
call fcn.14026fc80
jmp 0x14026cb76
mov rcx, qword [r12 + 0x20]
movsxd rax, dword [r12 + 0x28]
shl rax, 5
mov rsi, qword [rcx + 8]
mov qword [rsp + 0xe0], rsi
mov rax, qword [rax + rcx - 0x18]
mov rcx, rax
mov qword [rsp + 0xf8], rax
call fcn.140277830
mov rcx, qword [rsi + 8]
mov ebx, eax
mov edx, dword [0x14042d5b8]
mov eax, 0xfffd
xor r9d, r9d
mov r8d, ebx
and word [rcx + 0x28], ax
mov rcx, rsi
call fcn.1402798d0
mov r8d, dword [0x14042d5b8]
lea rdx, str.set_btree_page_size_to__d_res__d_rc__d
mov r9d, ebx
mov dword [rsp + 0x20], eax
mov ecx, 8
mov esi, eax
call fcn.14026fc80
test esi, esi
jne 0x14026cb76
mov edx, dword [r12 + 0x28]
lea r9, [rsp + 0x40]
dec edx
lea r8, [rsp + 0x70]
mov rcx, r12
call fcn.140268e40
mov r9d, dword [rsp + 0x40]
xor edx, edx
mov r8, qword [rsp + 0x70]
mov rcx, r12
call fcn.140268b00
mov rcx, qword [rsp + 0xf8]
mov rax, qword [rcx + 8]
mov rcx, qword [rax]
mov rax, qword [rsp + 0xe0]
mov rdx, qword [rcx + 0x48]
mov rax, qword [rax + 8]
mov qword [rsp + 0xf8], rdx
mov rcx, qword [rax]
mov rbx, qword [rcx + 0x48]
mov rcx, rdx
mov qword [rsp + 0x70], rbx
call fcn.14029e880
mov rcx, rbx
call fcn.14029e880
lea rdx, str.performing_windows_MoveFileExA
lea ecx, [rsi + 8]
call fcn.14026fc80
mov r9d, r14d
mov dword [rsp + 0x28], edi
mov r8, r15
mov qword [rsp + 0x20], rdi
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.14026fdd0
mov r9d, r14d
mov dword [rsp + 0x28], ebx
mov r8, r15
mov qword [rsp + 0x38], rax
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r9d, r14d
mov dword [rsp + 0x28], edi
mov r8, r13
mov dword [rsp + 0xe8], eax
xor edx, edx
mov qword [rsp + 0x20], rdi
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov rcx, rbx
add rcx, rcx
call fcn.14026fdd0
mov r9d, r14d
mov dword [rsp + 0x28], ebx
mov r8, r13
mov qword [rsp + 0x58], rax
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rdx, qword [rsp + 0x38]
mov r8d, 1
mov rcx, rsi
mov dword [rsp + 0xf0], eax
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x14026c9f2
mov esi, 1
lea rdx, str.error_occurred_while_renaming__d
mov r8d, esi
mov ecx, esi
call fcn.14026fc80
jmp 0x14026cb76
mov r9, r15
mov dword [rsp + 0x20], edi
mov r8, r13
lea rdx, str.renamed_migration_database__s_to_main_database__s:__d
mov ecx, 8
call fcn.14026fc80
mov rax, qword [r12]
lea rcx, [rsp + 0x78]
mov r8, qword [rsp + 0xf8]
mov r9d, 0x106
mov qword [rsp + 0x20], rcx
mov rdx, r13
mov rcx, rax
call qword [rax + 0x28]
lea rdx, str.reopened_migration_database:__d
mov ecx, 8
mov r8d, eax
mov esi, eax
call fcn.14026fc80
test esi, esi
jne 0x14026cb76
mov rax, qword [r12]
lea rcx, [rsp + 0x78]
mov r8, qword [rsp + 0x70]
mov r9d, 0x106
mov qword [rsp + 0x20], rcx
mov rdx, r15
mov rcx, rax
call qword [rax + 0x28]
lea rdx, str.reopened_main_database:__d
mov ecx, 8
mov r8d, eax
mov esi, eax
call fcn.14026fc80
test esi, esi
jne 0x14026cb76
mov rax, qword [rsp + 0xe0]
mov rax, qword [rax + 8]
mov rcx, qword [rax]
inc dword [rcx + 0x84]
mov rax, qword [rcx + 0x70]
test rax, rax
je 0x14026cac0
nop
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x14026cab0
mov rcx, qword [rcx + 0x140]
xor edx, edx
call fcn.1402a1b30
lea rdx, str.reset_pager
mov ecx, 8
call fcn.14026fc80
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea rdx, str.DETACH_DATABASE_migrate_
mov rcx, r12
call fcn.1401f1c40
mov r8d, eax
lea rdx, str.DETACH_DATABASE_called__d
mov ecx, 8
mov esi, eax
call fcn.14026fc80
test esi, esi
jne 0x14026cb8a
mov rcx, r12
call fcn.1402a95c0
lea rdx, str.reset_all_schemas
lea ecx, [rsi + 8]
call fcn.14026fc80
mov rdx, qword [rsp + 0x50]
lea rcx, str.PRAGMA_journal_mode___s_
call fcn.1401f3a90
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rax
mov rcx, r12
mov rbx, rax
call fcn.1401f1c40
mov r9d, eax
lea rdx, str._s:__d
mov r8, rbx
mov ecx, 8
mov esi, eax
call fcn.14026fc80
test esi, esi
je 0x14026cb8a
mov r8d, esi
lea rdx, str.An_error_occurred_attempting_to_migrate_the_database___last_error__d
mov ecx, 1
call fcn.14026fc80
test r13, r13
je 0x14026cbba
mov rcx, qword [r12]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x14026cba6
xor r8d, r8d
mov rdx, r13
call rax
mov edi, eax
mov r8d, edi
lea rdx, str.deleted_migration_database:__d
mov ecx, 8
call fcn.14026fc80
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x14026cbd4
mov rdx, qword [rsp + 0x88]
mov rcx, rax
call fcn.14026fb80
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x14026cbfb
mov rdx, r14
inc rdx
cmp byte [rax + rdx], 0
jne 0x14026cbe4
and edx, 0x3fffffff
mov rcx, rax
call fcn.14026fb80
test r13, r13
je 0x14026cc1b
mov rdx, r14
inc rdx
cmp byte [rdx + r13], 0
jne 0x14026cc03
and edx, 0x3fffffff
mov rcx, r13
call fcn.14026fb80
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x14026cc47
mov rdx, r14
nop dword [rax + rax]
inc rdx
cmp byte [rax + rdx], 0
jne 0x14026cc30
and edx, 0x3fffffff
mov rcx, rax
call fcn.14026fb80
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x14026cc6b
mov rdx, r14
inc rdx
cmp byte [rax + rdx], 0
jne 0x14026cc54
and edx, 0x3fffffff
mov rcx, rax
call fcn.14026fb80
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x14026cc99
mov rdx, r14
nop dword [rax + rax]
inc rdx
cmp byte [rax + rdx], 0
jne 0x14026cc80
mov rcx, qword [rsp + 0x50]
and edx, 0x3fffffff
call fcn.14026fb80
test rbp, rbp
je 0x14026ccbc
nop
inc r14
cmp byte [r14 + rbp], 0
jne 0x14026cca0
and r14d, 0x3fffffff
mov rcx, rbp
mov edx, r14d
call fcn.14026fb80
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x14026ccd6
movsxd rdx, dword [rsp + 0xe8]
mov rcx, rax
call fcn.14026fb80
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x14026ccf0
movsxd rdx, dword [rsp + 0xf0]
mov rcx, rax
call fcn.14026fb80
mov eax, esi
mov r14, qword [rsp + 0xa0]
mov r13, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0xb8]
mov r15, qword [rsp + 0x98]
add rsp, 0xc0
pop r12
pop rdi
pop rsi
ret
mov eax, edi
jmp 0x14026ccf2
mov eax, edi
jmp 0x14026ccfa
xor edi, edi
mov eax, edi
add rsp, 0xc0
pop r12
pop rdi
pop rsi
ret