Function at 0x642e00
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push edi
mov edi, dword [ebp + 0xc]
xor edx, edx
mov dword [ebp - 0x10], edx
cmp byte [edi + 0x1c], dl
jne 0x642e2f
push str.cannot_VACUUM_from_within_a_transaction
push edi
push dword [ebp + 8]
call fcn.00645070
add esp, 0xc
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x3c]
mov dword [ebp - 0x14], eax
and eax, 0xfaffffff
or eax, 0x50000
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + 0x40]
cmp byte [edi + 0x1d], 2
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
push ebx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edi + 0x94]
mov dword [edi + 0x94], edx
mov ebx, dword [eax + 4]
mov dword [ebp - 0x20], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
push esi
mov dword [ebp - 0xc], ebx
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xd]
mov byte [ebp + 0xf], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
push eax
push dword [ebp + 8]
push edi
call fcn.00606bf0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
shl ecx, 4
lea edx, [eax - 0x10]
add edx, ecx
mov esi, dword [ecx + eax - 0xc]
push esi
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], esi
call fcn.00626f90
push ebx
call fcn.006278b0
mov ecx, dword [ebx + 4]
add esp, 8
movzx eax, word [ecx + 0x18]
movzx edx, word [ecx + 0x16]
sub edx, eax
cmp byte [ebx + 9], 0
mov dword [ebp - 8], edx
mov eax, ecx
je 0x642efb
add dword [ebx + 0xc], 0xffffffff
jne 0x642efb
mov edx, dword [ecx + 0x30]
test edx, edx
je 0x642ef4
push edx
call dword [0x6f1c08]
mov eax, dword [ebx + 4]
add esp, 4
mov edx, dword [ebp - 8]
mov byte [ebx + 0xa], 0
movzx eax, word [eax + 0x16]
push 0
push edx
push eax
push esi
call fcn.006297c0
add esp, 0x10
test eax, eax
jne 0x6430d1
cmp byte [ebp + 0xf], al
jne 0x642f31
push eax
push dword [ebp - 8]
push dword [edi + 0x24]
push esi
call fcn.006297c0
add esp, 0x10
test eax, eax
jne 0x6430d1
cmp byte [edi + 0x1e], 0
jne 0x6430d1
push str.PRAGMA_vacuum_db.synchronousOFF
push dword [ebp + 8]
push edi
call fcn.00606bf0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
mov al, byte [edi + 0x21]
test al, al
js 0x642f62
movsx eax, al
jmp 0x642f6b
push ebx
call fcn.00627b40
add esp, 4
push eax
push dword [ebp - 4]
call fcn.006296a0
mov ebx, dword [ebp + 8]
push str.BEGIN_EXCLUSIVE_
push ebx
push edi
call fcn.00606bf0
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x6430d6
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebx
push edi
call fcn.006069e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
push str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
push ebx
push edi
call fcn.00606bf0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x6430d6
xor ebx, ebx
lea eax, [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x6b4e6c]
push eax
push dword [ebp - 0xc]
call fcn.00627b90
movzx eax, byte [ebx + 0x6b4e6d]
add eax, dword [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x6b4e6c]
push eax
push dword [ebp - 4]
call fcn.00629960
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x6430d6
add ebx, 2
cmp ebx, 8
jl 0x643041
push dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.00627160
mov esi, eax
add esp, 8
test esi, esi
jne 0x6430d6
push dword [ebp - 4]
call fcn.00626f90
mov esi, eax
add esp, 4
test esi, esi
jne 0x6430d6
mov esi, dword [ebp - 4]
push esi
call fcn.00627b40
push eax
push ebx
call fcn.006296a0
mov eax, dword [esi + 4]
push 1
push dword [ebp - 8]
movzx eax, word [eax + 0x16]
push eax
push ebx
call fcn.006297c0
add esp, 0x1c
mov esi, eax
jmp 0x6430d6
mov esi, 7
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x40], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x94], eax
mov byte [edi + 0x1c], 1
test ebx, ebx
je 0x643115
push dword [ebx + 4]
call fcn.00626cb0
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push 0
push edi
call fcn.00641fa0
add esp, 8
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret