Function at 0x1006e7f0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x20
push ebp
xor ebp, ebp
cmp byte [edi + 0x1c], 0
push esi
jne 0x1006e817
push str.cannot_VACUUM_from_within_a_transaction
mov eax, edi
mov esi, ecx
call fcn.1004eea0
add esp, 4
pop esi
lea eax, [ebp + 1]
pop ebp
add esp, 0x20
ret
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x3c]
mov edx, dword [edi + 0x40]
mov dword [esp + 0x1c], eax
and eax, 0xffbfffff
or eax, 0x2800
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
push ebx
mov ebx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebx + 4]
mov dword [esp + 0x28], edx
mov edx, dword [ecx]
movzx eax, byte [edx + 0xd]
mov dword [esp + 0x18], eax
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, edi
mov dword [esp + 0x10], ebx
call fcn.1006e580
mov esi, eax
test esi, esi
jne 0x1006ea6e
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
shl ecx, 4
mov ebp, dword [ecx + edx - 0xc]
lea eax, [ecx + edx]
lea ecx, [eax - 0x10]
mov eax, ebp
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], ebp
call fcn.1005bef0
mov eax, ebx
call fcn.1003ab10
mov edx, dword [ebx + 4]
mov esi, eax
movzx eax, word [edx + 0x14]
push 0
push esi
push ebp
mov dword [esp + 0x28], esi
call fcn.10043170
add esp, 0xc
test eax, eax
jne 0x1006ea65
cmp dword [esp + 0x18], eax
jne 0x1006e8cd
push eax
mov eax, dword [edi + 0x24]
push esi
push ebp
call fcn.10043170
add esp, 0xc
test eax, eax
jne 0x1006ea65
cmp byte [edi + 0x1e], 0
jne 0x1006ea65
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, edi
call fcn.1006e580
mov esi, eax
test esi, esi
jne 0x1006ea6a
mov al, byte [edi + 0x21]
test al, al
jl 0x1006e8f9
movsx eax, al
jmp 0x1006e900
mov eax, ebx
call fcn.1003abc0
push eax
mov eax, ebp
call fcn.1003ab50
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
mov ecx, edi
call fcn.1006e580
mov esi, eax
test esi, esi
jne 0x1006ea6a
push edi
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
push edi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
push edi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
push edi
mov eax, 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
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
push edi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
push edi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.1006e5d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
mov eax, 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_
mov ecx, edi
call fcn.1006e580
mov esi, eax
test esi, esi
jne 0x1006ea6a
xor ebp, ebp
jmp 0x1006e9d4
mov ebx, dword [esp + 0x10]
movzx ecx, byte [ebp + 0x100f4158]
lea eax, [esp + 0x18]
push eax
push ecx
mov eax, ebx
call fcn.1003b240
movzx edx, byte [ebp + 0x100f4159]
add edx, dword [esp + 0x20]
movzx ebx, byte [ebp + 0x100f4158]
mov eax, dword [esp + 0x1c]
push edx
call fcn.10049170
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1006ea6a
add ebp, 2
cmp ebp, 8
jl 0x1006e9d0
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push ebp
mov esi, ebx
call fcn.10062f30
mov esi, eax
add esp, 4
test esi, esi
jne 0x1006ea6a
mov eax, ebx
call fcn.1005bef0
mov esi, eax
test esi, esi
jne 0x1006ea6a
mov eax, ebx
call fcn.1003abc0
push eax
mov eax, ebp
call fcn.1003ab50
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x20]
movzx eax, word [eax + 0x14]
push 1
push ecx
push ebp
call fcn.10043170
add esp, 0x10
mov esi, eax
jmp 0x1006ea6a
mov esi, 7
mov ebp, dword [esp + 0xc]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [edi + 0xc], edx
mov dword [edi + 0x3c], eax
mov dword [edi + 0x40], ecx
mov byte [edi + 0x1c], 1
test ebp, ebp
je 0x1006ea9b
mov eax, dword [ebp + 4]
call fcn.1005fc80
xor eax, eax
mov dword [ebp + 4], eax
mov dword [ebp + 0xc], eax
push 0
mov ebx, edi
call fcn.10051fe0
add esp, 4
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0x20
ret