Function at 0x61e04556
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov dword [esp + 4], 0x61e861c0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_db_filename
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], str._s_migrated
call sym.sqlite3.dll_sqlite3_mprintf
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], str.PRAGMA_cipher_use_hmac__OFF_
mov dword [ebp - 0x38], str.PRAGMA_kdf_iter__4000_
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x18]
add eax, 1
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call fcn.61e02dc6
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x18]
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
cmp dword [ebp - 0x2c], 0
je 0x61e04ad1
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], str.ATTACH_DATABASE__s_migrated_as_migrate_KEY__q_
call sym.sqlite3.dll_sqlite3_mprintf
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x61e8660f
mov edx, dword [ebp - 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.61e04427
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x61e04ad4
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x38]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.61e04427
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x61e046bf
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov dword [esp], 0x61e86610
call sym.sqlite3.dll_sqlite3_mprintf
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.61e04427
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_free
cmp dword [ebp - 0x1c], 0
jne 0x61e04725
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x14], 0
jne 0x61e04735
cmp dword [ebp - 0x18], 0
je 0x61e04abb
mov eax, dword [ebp - 0x74]
mov dword [esp + 4], eax
mov dword [esp], str.PRAGMA_migrate.user_version___d_
call sym.sqlite3.dll_sqlite3_mprintf
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x18], 1
jne 0x61e04756
mov eax, dword [ebp - 0x38]
jmp 0x61e0475b
mov eax, 0x61e8660f
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x14], 1
jne 0x61e0476c
mov eax, dword [ebp - 0x34]
jmp 0x61e04771
mov eax, 0x61e8660f
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], str.SELECT_sqlcipher_export_migrate__
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x10], 0
jmp 0x61e047e4
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x88]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
movzx eax, byte [eax]
test al, al
je 0x61e047df
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_exec
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x61e047ec
jmp 0x61e047e0
nop
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 4
jle 0x61e04793
jmp 0x61e047ed
nop
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_free
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_free
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x3c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.61e02d77
cmp dword [ebp - 0x1c], 0
jne 0x61e04ad1
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x28]
movzx eax, byte [eax + 0x3e]
test al, al
je 0x61e04abe
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x8c]
cmp eax, 1
jg 0x61e04ac1
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x54]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0xa4]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x18]
or eax, 0x202800
mov edx, eax
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x18], edx
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x18]
and eax, 0xfff5ffff
mov edx, eax
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x18], edx
mov eax, dword [ebp - 0x28]
mov dword [eax + 0xa4], 0
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 4]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x14]
add eax, 0xfffffff
shl eax, 4
add eax, edx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
mov dword [ebp - 0x64], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.BEGIN_
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_exec
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x64]
mov dword [esp], eax
call fcn.61e21e11
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.61e21e11
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x14]
lea edx, [eax - 1]
lea eax, [ebp - 0x6c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x70]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.61e02555
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x70]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.61e02134
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov eax, dword [eax]
lea ecx, [ebp + 8]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.61e1b3be
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], 1
mov dword [ebp - 0x20], 0
jmp 0x61e04a05
mov eax, dword [ebp - 0x20]
add eax, 0x61e8e1b8
movzx eax, byte [eax]
movzx eax, al
lea edx, [ebp - 0x68]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x64]
mov dword [esp], eax
call fcn.61e28da7
mov eax, dword [ebp - 0x20]
add eax, 1
movzx eax, byte [eax + 0x61e8e1b8]
movzx edx, al
mov eax, dword [ebp - 0x68]
add edx, eax
mov eax, dword [ebp - 0x20]
add eax, 0x61e8e1b8
movzx eax, byte [eax]
movzx eax, al
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.61e28df2
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x61e04ac4
add dword [ebp - 0x20], 2
cmp dword [ebp - 0x20], 9
jle 0x61e0499a
mov eax, dword [ebp - 0x64]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.61e2b783
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], 0
cmp dword [ebp - 0x1c], 0
jne 0x61e04ac7
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.61e22e9e
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x50]
mov dword [eax + 0x18], edx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x54]
mov dword [eax + 0x50], edx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x58]
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x5c]
mov dword [eax + 0xa4], edx
mov eax, dword [ebp - 0x28]
mov byte [eax + 0x3e], 1
cmp dword [ebp - 0x24], 0
je 0x61e04a98
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.61e21320
mov eax, dword [ebp - 0x24]
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xc], 0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.61e4c10b
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_remove
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym.sqlite3.dll_sqlite3_free
jmp 0x61e04ad1
nop
jmp 0x61e04ac8
nop
jmp 0x61e04ac8
nop
jmp 0x61e04ac8
nop
jmp 0x61e04ac8
nop
mov dword [ebp - 0xc], 1
jmp 0x61e04ad5
nop
jmp 0x61e04ad5
nop
mov eax, dword [ebp - 0xc]
leave
ret