Function at 0x4a4ab0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x20
push edi
mov edi, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 8], eax
cmp byte [edi + 0x1c], al
jne 0x4a4add
push str.cannot_VACUUM_from_within_a_transaction
push edi
push dword [esp + 0x30]
call fcn.004a64f5
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4a4df3
cmp dword [edi + 0x8c], 1
jle 0x4a4aed
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4a4ac8
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x14], eax
and eax, 0xfaffffff
or eax, 0x10050000
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x40]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x98]
and dword [edi + 0x98], 0
mov eax, dword [eax + 4]
cmp byte [edi + 0x1d], 2
mov dword [esp + 0x2c], eax
push ebx
mov eax, dword [eax + 4]
push ebp
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x28], ecx
mov ecx, str.ATTACH__AS_vacuum_db_
mov eax, dword [eax]
push esi
mov esi, dword [edi + 4]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x18], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
cmovne eax, ecx
push eax
push ebp
push edi
call fcn.004857ac
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
cmp ecx, esi
jle 0x4a4b77
mov eax, dword [edi + 8]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x4a4d96
mov eax, dword [edi + 8]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
push esi
mov dword [esp + 0x20], esi
call fcn.00494c73
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.004952b3
mov eax, dword [ebx + 4]
push ebx
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
mov dword [esp + 0x1c], ecx
call fcn.00495974
mov eax, dword [ebx + 4]
add esp, 0xc
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4a4bc1
and dword [edi + 0x24], 0
mov eax, dword [ebx + 4]
mov ebx, dword [esp + 0x10]
push 0
push ebx
push dword [eax + 0x24]
push esi
call fcn.0049667f
add esp, 0x10
test eax, eax
jne 0x4a4d93
cmp dword [esp + 0x18], eax
jne 0x4a4bfb
push eax
push ebx
push dword [edi + 0x24]
push esi
call fcn.0049667f
add esp, 0x10
test eax, eax
jne 0x4a4d93
cmp byte [edi + 0x1e], 0
jne 0x4a4d93
push str.PRAGMA_vacuum_db.synchronousOFF
push ebp
push edi
call fcn.004857ac
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
mov al, byte [edi + 0x20]
test al, al
js 0x4a4c2a
movsx eax, al
jmp 0x4a4c34
push dword [esp + 0x38]
call fcn.00495388
pop ecx
push eax
push esi
call fcn.004965d9
push str.BEGIN_EXCLUSIVE_
push ebp
push edi
call fcn.004857ac
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x4a4d96
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
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 ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebp
push edi
call fcn.00485732
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
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 ebp
push edi
call fcn.004857ac
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a4d96
mov ebp, dword [esp + 0x1c]
xor esi, esi
lea eax, [esp + 0x1c]
push eax
movzx eax, byte [esi + 0x4e2628]
push eax
push dword [esp + 0x40]
call fcn.004953b2
movzx eax, byte [esi + 0x4e2629]
add eax, dword [esp + 0x28]
push eax
movzx eax, byte [esi + 0x4e2628]
push eax
push ebp
call fcn.00496849
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4a4d96
add esi, 2
cmp esi, 8
jl 0x4a4d09
push ebp
push dword [esp + 0x3c]
call fcn.00494d82
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x4a4d96
push ebp
call fcn.00494c73
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4a4d96
push ebp
call fcn.00495388
mov ebx, dword [esp + 0x3c]
push eax
push ebx
call fcn.004965d9
mov eax, dword [ebp + 4]
push 1
push dword [esp + 0x20]
push dword [eax + 0x24]
push ebx
call fcn.0049667f
add esp, 0x1c
mov ebx, eax
jmp 0x4a4d96
push 7
pop ebx
mov eax, dword [esp + 0x20]
push 1
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x28]
push 0xffffffffffffffff
mov dword [edi + 0x3c], eax
mov eax, dword [esp + 0x30]
push 0xffffffffffffffff
push dword [esp + 0x44]
mov dword [edi + 0x40], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x98], eax
call fcn.0049667f
mov ebp, dword [esp + 0x24]
add esp, 0x10
mov byte [edi + 0x1c], 1
test ebp, ebp
je 0x4a4de4
push dword [ebp + 4]
call fcn.00494b4d
and dword [ebp + 4], 0
and dword [ebp + 0xc], 0
pop ecx
push 0xffffffffffffffff
push edi
call fcn.004a41f8
pop ecx
pop ecx
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
add esp, 0x20
ret