Function at 0x101f31a0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x50]
push ebx
push esi
push edi
mov edi, dword [ecx]
push str.main
push edi
call sym.SQLite.Interop.dll_sqlite3_db_filename
xor edx, edx
mov ecx, eax
add esp, 8
xor eax, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x30], edx
cmp ecx, edx
je 0x101f377a
lea esi, [ecx + 1]
lea ebx, [ebx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x101f3200
sub ecx, esi
and ecx, 0x3fffffff
cmp ecx, 1
jl 0x101f377a
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x54]
mov esi, dword [eax + 4]
lea eax, [esi + 1]
cdq
push edx
push eax
mov dword [ebp - 0x1c], esi
call fcn.101454b0
mov ebx, eax
lea eax, [esi + 1]
push eax
push 0
push ebx
mov dword [ebp - 0x10], ebx
call fcn.100ffab0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x54]
mov eax, dword [edx + 0x10]
add esp, 0x14
push esi
push eax
push ebx
call fcn.100ffb30
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 8]
lea edx, [ebp - 0x18]
push edx
push 0x10275ad6
push ebx
mov ebx, esi
call fcn.101f3050
add esp, 0x10
mov dword [ebp + 8], eax
test eax, eax
je 0x101f3646
mov dword [ebp + 8], 3
mov eax, dword [ebp + 8]
push eax
push str.PRAGMA_cipher_compatibility___d_
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov ebx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 8]
mov esi, eax
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x18]
push edx
push esi
push eax
mov dword [ebp - 0xc], esi
call fcn.101f3050
add esp, 0x18
test eax, eax
je 0x101f32fb
test esi, esi
je 0x101f32dc
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f32c0
mov esi, dword [ebp - 0xc]
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp - 0xc], 0
mov dword [ebp + 8], eax
test eax, eax
jg 0x101f3284
mov ebx, dword [ebp - 4]
mov edi, 1
jmp 0x101f364c
mov ecx, dword [ebp - 8]
push ecx
push str._s_migrated
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov esi, eax
add esp, 8
test esi, esi
je 0x101f3325
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3317
sub eax, edx
and eax, 0x3fffffff
add eax, 2
cdq
push edx
push eax
call fcn.101454b0
add esp, 8
mov dword [ebp - 4], eax
test esi, esi
jne 0x101f333e
xor ecx, ecx
jmp 0x101f3352
mov ecx, esi
lea ebx, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x101f3343
sub ecx, ebx
and ecx, 0x3fffffff
push ecx
push esi
push eax
call fcn.100ffb30
add esp, 0xc
test esi, esi
jne 0x101f3365
xor eax, eax
jmp 0x101f337e
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3370
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
push edx
push eax
push str.ATTACH_DATABASE__s_as_migrate_
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov ecx, dword [ebp - 0x18]
add esp, 0x14
push ecx
push str.PRAGMA_migrate.user_version___d_
mov dword [ebp - 0x20], eax
call sym.SQLite.Interop.dll_sqlite3_mprintf
mov edx, dword [ebp - 0xc]
push 0
push 0
push 0
push edx
push edi
mov dword [ebp - 0x24], eax
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x1c
test eax, eax
jne 0x101f32ee
push eax
push eax
push eax
push str.PRAGMA_journal_mode__delete_
push edi
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x101f32ee
push eax
push eax
push eax
mov eax, dword [ebp - 0x20]
push eax
push edi
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x101f32ee
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
push ecx
push edx
push str.migrate
push edi
call sym.SQLite.Interop.dll_sqlite3_key_v2
add esp, 0x10
test eax, eax
jne 0x101f32ee
push eax
push eax
push eax
push str.SELECT_sqlcipher_export_migrate__
push edi
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x101f32ee
push eax
push eax
push eax
mov eax, dword [ebp - 0x24]
push eax
push edi
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
test eax, eax
jne 0x101f32ee
cmp byte [edi + 0x4f], al
je 0x101f32ee
cmp dword [edi + 0xb0], 1
jg 0x101f32ee
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov esi, dword [eax + 4]
add ecx, ecx
mov ebx, dword [eax + ecx*8 - 0xc]
mov eax, ebx
mov dword [ebp + 8], esi
call fcn.1013bef0
mov ecx, dword [esi + 4]
push 0
push eax
mov eax, dword [0x102923f4]
mov edx, 0xfffd
and word [ecx + 0x18], dx
push esi
call fcn.1017a590
add esp, 0xc
test eax, eax
jne 0x101f32ee
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
add eax, eax
cmp dword [ecx + eax*8 - 0xc], 0
lea eax, [ecx + eax*8 - 0x10]
je 0x101f34bc
lea edx, [ebp - 0x30]
lea esi, [ebp - 0x34]
call fcn.10121d00
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
push edx
push eax
push edi
xor eax, eax
call fcn.1017fd70
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov eax, dword [ebp + 8]
mov esi, dword [edx + 0x3c]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
mov ebx, dword [edx + 0x3c]
add esp, 0xc
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], ebx
call fcn.10121100
mov esi, ebx
call fcn.10121100
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call esi
mov ebx, eax
lea ecx, [ebx + ebx]
push 0
push ecx
call fcn.101454b0
mov edx, dword [ebp - 8]
add esp, 8
push ebx
push eax
push 0xffffffffffffffff
push edx
push 0
push 0xfde9
mov dword [ebp - 0x28], eax
call esi
push 0
push 0
push 0xffffffffffffffff
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 4]
push eax
push 0
push 0xfde9
call esi
mov ebx, eax
lea ecx, [ebx + ebx]
push 0
push ecx
call fcn.101454b0
mov edx, dword [ebp - 4]
add esp, 8
push ebx
push eax
push 0xffffffffffffffff
push edx
push 0
push 0xfde9
mov dword [ebp - 0x2c], eax
call esi
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x28]
push 1
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x101f32ee
mov ecx, dword [ebp - 0x34]
mov eax, dword [edi]
mov ebx, dword [ebp - 4]
lea edx, [ebp - 0x44]
push edx
mov edx, dword [eax + 0x18]
push 0x106
push ecx
push ebx
push eax
call edx
add esp, 0x14
test eax, eax
jne 0x101f32ee
mov edx, dword [ebp - 0x30]
mov eax, dword [edi]
lea ecx, [ebp - 0x44]
push ecx
mov ecx, dword [ebp - 8]
push 0x106
push edx
mov edx, dword [eax + 0x18]
push ecx
push eax
call edx
add esp, 0x14
test eax, eax
jne 0x101f32ee
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
push edx
call sym.SQLite.Interop.dll_sqlite3pager_reset
add esp, 4
push 0
push 0
push 0
push str.DETACH_DATABASE_migrate_
push edi
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x14
mov dword [ebp + 8], eax
test eax, eax
jne 0x101f3646
mov eax, dword [edi]
push 0
push ebx
push eax
mov eax, dword [eax + 0x1c]
call eax
add esp, 0xc
test eax, eax
jne 0x101f32ee
mov eax, edi
call fcn.1015d950
mov ecx, dword [ebp - 0x14]
push ecx
push str.PRAGMA_journal_mode___s_
call sym.SQLite.Interop.dll_sqlite3_mprintf
push 0
push 0
push 0
push eax
push edi
mov dword [ebp - 0x38], eax
call sym.SQLite.Interop.dll_sqlite3_exec
add esp, 0x1c
mov dword [ebp + 8], eax
test eax, eax
je 0x101f3649
mov edi, 1
jmp 0x101f364c
mov ebx, dword [ebp - 4]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x101f3661
mov eax, dword [ebp - 0x1c]
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x101f3689
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3670
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
test ebx, ebx
je 0x101f36ad
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3692
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
mov esi, ebx
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x101f36d9
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f36c0
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x101f36fe
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f36e5
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x101f3729
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3710
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x101f374e
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101f3735
sub eax, edx
and eax, 0x3fffffff
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x101f3763
mov eax, dword [ebp - 0x3c]
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x101f3778
mov eax, dword [ebp - 0x40]
cdq
push edx
push eax
call fcn.1012e5f0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret