Function at 0x4221e8
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
and dword [ebp - 8], 0
push esi
mov esi, dword [ebp + 0xc]
cmp byte [esi + 0x1c], 0
jne 0x422215
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.00411590
add esp, 0xc
push 1
pop eax
jmp 0x42248a
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x3c]
mov dword [ebp - 0x10], eax
and eax, 0xffbfffff
or ah, 0x28
push ebx
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi + 0x40]
mov ebx, dword [eax + 4]
push edi
push ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp + 0xc], ebx
call fcn.0040f65b
push eax
call fcn.0040f7ee
push str.ATTACH__AS_vacuum_db_
push esi
mov dword [ebp - 0xc], eax
call fcn.00422632
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x42244e
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
shl eax, 4
add eax, ecx
mov edi, dword [eax - 0xc]
lea ecx, [eax - 0x10]
push edi
mov dword [ebp - 8], ecx
mov dword [ebp + 8], edi
call fcn.00421407
push ebx
call fcn.00422514
pop ecx
mov dword [ebp - 4], eax
pop ecx
push 0
push eax
push ebx
call fcn.0040d660
pop ecx
push eax
push edi
call fcn.0042248d
add esp, 0x10
test eax, eax
jne 0x42244b
cmp dword [ebp - 0xc], eax
jne 0x4222c5
push eax
push dword [ebp - 4]
push dword [esi + 0x24]
push edi
call fcn.0042248d
add esp, 0x10
test eax, eax
jne 0x42244b
cmp byte [esi + 0x1e], 0
jne 0x42244b
push str.PRAGMA_vacuum_db.synchronousOFF
push esi
call fcn.00422632
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
mov al, byte [esi + 0x21]
test al, al
jl 0x4222f2
movsx eax, al
jmp 0x4222f9
push ebx
call fcn.0042258c
pop ecx
push eax
push dword [ebp + 8]
call fcn.0042253a
push str.BEGIN_EXCLUSIVE_
push esi
call fcn.00422632
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x42244e
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
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 esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push esi
call fcn.00422678
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
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 esi
call fcn.00422632
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
movzx eax, byte [ebx + 0x44a190]
push eax
push dword [ebp + 0xc]
call fcn.0040f5d0
movzx eax, byte [ebx + 0x44a191]
add eax, dword [ebp - 0xc]
push eax
movzx eax, byte [ebx + 0x44a190]
push eax
push dword [ebp + 8]
call fcn.0040f605
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x42244e
inc ebx
inc ebx
cmp ebx, 8
jl 0x4223bd
mov ebx, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
call fcn.004225bd
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x42244e
push ebx
call fcn.00421407
mov edi, eax
pop ecx
test edi, edi
jne 0x42244e
push ebx
call fcn.0042258c
push eax
push dword [ebp + 0xc]
call fcn.0042253a
add esp, 0xc
push 1
push dword [ebp - 4]
push ebx
call fcn.0040d660
pop ecx
push eax
push dword [ebp + 0xc]
call fcn.0042248d
add esp, 0x10
mov edi, eax
jmp 0x42244e
push 7
pop edi
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x18]
test ebx, ebx
mov dword [esi + 0x40], eax
mov byte [esi + 0x1c], 1
je 0x42247c
push dword [ebx + 4]
call fcn.00410606
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
pop ecx
push 0
push esi
call fcn.0041ed3b
pop ecx
mov eax, edi
pop ecx
pop edi
pop ebx
pop esi
leave
ret