Function at 0x4a44f7
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 0x4a4524
push str.cannot_VACUUM_from_within_a_transaction
push edi
push dword [esp + 0x30]
call fcn.004a5f3c
xor eax, eax
add esp, 0xc
inc eax
jmp 0x4a483a
cmp dword [edi + 0x8c], 1
jle 0x4a4534
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4a450f
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.004851d1
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
cmp ecx, esi
jle 0x4a45be
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 0x4a47dd
mov eax, dword [edi + 8]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
push esi
mov dword [esp + 0x20], esi
call fcn.00494698
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.00494cd8
mov eax, dword [ebx + 4]
push ebx
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
mov dword [esp + 0x1c], ecx
call fcn.00495399
mov eax, dword [ebx + 4]
add esp, 0xc
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4a4608
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.004960a4
add esp, 0x10
test eax, eax
jne 0x4a47da
cmp dword [esp + 0x18], eax
jne 0x4a4642
push eax
push ebx
push dword [edi + 0x24]
push esi
call fcn.004960a4
add esp, 0x10
test eax, eax
jne 0x4a47da
cmp byte [edi + 0x1e], 0
jne 0x4a47da
push str.PRAGMA_vacuum_db.synchronousOFF
push ebp
push edi
call fcn.004851d1
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
mov al, byte [edi + 0x20]
test al, al
js 0x4a4671
movsx eax, al
jmp 0x4a467b
push dword [esp + 0x38]
call fcn.00494dad
pop ecx
push eax
push esi
call fcn.00495ffe
push str.BEGIN_EXCLUSIVE_
push ebp
push edi
call fcn.004851d1
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x4a47dd
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.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebp
push edi
call fcn.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
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.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
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.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebp
push edi
call fcn.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
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.00485157
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
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.004851d1
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4a47dd
mov ebp, dword [esp + 0x1c]
xor esi, esi
lea eax, [esp + 0x1c]
push eax
movzx eax, byte [esi + 0x4e1608]
push eax
push dword [esp + 0x40]
call fcn.00494dd7
movzx eax, byte [esi + 0x4e1609]
add eax, dword [esp + 0x28]
push eax
movzx eax, byte [esi + 0x4e1608]
push eax
push ebp
call fcn.0049626e
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4a47dd
add esi, 2
cmp esi, 8
jl 0x4a4750
push ebp
push dword [esp + 0x3c]
call fcn.004947a7
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x4a47dd
push ebp
call fcn.00494698
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4a47dd
push ebp
call fcn.00494dad
mov ebx, dword [esp + 0x3c]
push eax
push ebx
call fcn.00495ffe
mov eax, dword [ebp + 4]
push 1
push dword [esp + 0x20]
push dword [eax + 0x24]
push ebx
call fcn.004960a4
add esp, 0x1c
mov ebx, eax
jmp 0x4a47dd
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.004960a4
mov ebp, dword [esp + 0x24]
add esp, 0x10
mov byte [edi + 0x1c], 1
test ebp, ebp
je 0x4a482b
push dword [ebp + 4]
call fcn.00494572
and dword [ebp + 4], 0
and dword [ebp + 0xc], 0
pop ecx
push 0xffffffffffffffff
push edi
call fcn.004a3c3f
pop ecx
pop ecx
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
add esp, 0x20
ret