Function at 0x100686c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
xor ecx, ecx
push ebx
push edi
mov edi, eax
mov dword [ebp - 0x10], ecx
cmp byte [esi + 0x43], cl
jne 0x100686ef
push edi
mov ebx, str.cannot_VACUUM_from_within_a_transaction
mov eax, esi
call fcn.10004750
add esp, 4
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x98], 1
jle 0x10068713
push edi
mov ebx, str.cannot_VACUUM___SQL_statements_in_progress
mov eax, esi
call fcn.10004750
add esp, 4
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x54]
mov dword [ebp - 0x1c], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [esi + 0x44], 2
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x58]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x24], edx
mov edx, dword [esi + 0xb4]
mov dword [esi + 0xb4], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x28], edx
mov edx, dword [ecx]
mov ecx, dword [esi + 0x14]
mov dword [ebp - 4], eax
movzx eax, byte [edx + 0x10]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x1006876c
mov eax, str.ATTACH__AS_vacuum_db_
push esi
mov ecx, edi
call fcn.100684b0
mov ebx, eax
mov eax, dword [esi + 0x14]
add esp, 4
cmp eax, dword [ebp - 0xc]
jle 0x1006878f
mov ecx, dword [esi + 0x10]
mov edx, eax
add edx, edx
lea edx, [ecx + edx*8 - 0x10]
mov dword [ebp - 0x10], edx
test ebx, ebx
jne 0x100689e4
mov ecx, dword [esi + 0x10]
add eax, eax
mov eax, dword [ecx + eax*8 - 0xc]
mov dword [ebp - 8], eax
call fcn.1001a7f0
mov eax, dword [ebp - 4]
call fcn.100195a0
mov dword [ebp - 0xc], eax
cmp dword [esi + 0x4c], ebx
je 0x100687cd
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x2c]
mov eax, esi
call fcn.1009f2b0
cmp dword [ebp - 0x14], ebx
je 0x100687cd
mov dword [esi + 0x4c], ebx
push esi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, edi
call fcn.100684b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x100689e4
push esi
mov eax, str.BEGIN_
mov ecx, edi
call fcn.100684b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x100689e4
mov edx, dword [ebp - 4]
push 2
push edx
call fcn.10019af0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x1006882a
mov dword [esi + 0x4c], ebx
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov ebx, dword [ebp - 8]
mov eax, dword [eax + 0x24]
push 0
push ecx
push ebx
call fcn.100194c0
add esp, 0xc
test eax, eax
jne 0x100689df
cmp dword [ebp - 0x18], eax
jne 0x10068868
mov edx, dword [ebp - 0xc]
push eax
mov eax, dword [esi + 0x4c]
push edx
push ebx
call fcn.100194c0
add esp, 0xc
test eax, eax
jne 0x100689df
cmp byte [esi + 0x45], 0
jne 0x100689df
mov al, byte [esi + 0x48]
test al, al
js 0x1006887e
movsx eax, al
jmp 0x10068886
mov eax, dword [ebp - 4]
call fcn.10019720
push eax
mov eax, ebx
call fcn.100196a0
add esp, 4
push edi
push esi
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
call fcn.10068570
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
push edi
push esi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.10068570
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
push edi
push esi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.10068570
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
or dword [esi + 0x18], 0x8000000
push edi
push esi
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_coalesce_rootpage_1__0
call fcn.10068570
and dword [esi + 0x18], 0xf7ffffff
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
push edi
push esi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.10068570
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
push edi
push esi
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.10068570
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x100689e4
push esi
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.100684b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x100689e4
xor edi, edi
movzx ecx, byte [edi + 0x100b9dd0]
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
push ecx
call fcn.10020550
movzx edx, byte [edi + 0x100b9dd1]
add edx, dword [ebp - 0x18]
movzx eax, byte [edi + 0x100b9dd0]
push edx
push eax
mov eax, dword [ebp - 8]
call fcn.100205b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x100689e4
add edi, 2
cmp edi, 0xa
jl 0x10068951
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov eax, edi
call fcn.10022960
mov ebx, eax
test ebx, ebx
jne 0x100689e4
mov eax, edi
call fcn.1001a7f0
mov ebx, eax
test ebx, ebx
jne 0x100689e4
mov eax, edi
call fcn.10019720
mov ebx, dword [ebp - 4]
push eax
mov eax, ebx
call fcn.100196a0
mov edx, dword [ebp - 0xc]
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 0x24]
add esp, 4
push 1
push edx
push ebx
call fcn.100194c0
add esp, 0xc
mov ebx, eax
jmp 0x100689e4
mov ebx, 7
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x28]
push 1
mov dword [esi + 0x54], ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0xb4], eax
push 0xffffffffffffffff
push ecx
or eax, 0xffffffff
mov dword [esi + 0x58], edx
call fcn.100194c0
mov edi, dword [ebp - 0x10]
add esp, 0xc
mov byte [esi + 0x43], 1
test edi, edi
je 0x10068a2d
mov eax, dword [edi + 4]
call fcn.10019220
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 0xc], eax
mov eax, esi
call fcn.10042760
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret