Function at 0x49a5be
Capabilities:
Reference sql statements

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 0x14], 0
push ebx
mov ebx, dword [ebp + 0xc]
cmp byte [ebx + 0x3f], 0
push esi
jne 0x49a5ed
push str.cannot_VACUUM_from_within_a_transaction
mov esi, dword [ebp + 8]
push ebx
call fcn.0047b506
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x49a903
cmp dword [ebx + 0x94], 1
jle 0x49a5fd
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x49a5da
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x50]
mov dword [ebp - 0x1c], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebx + 0x54]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebx + 0xb0]
and dword [ebx + 0xb0], 0
mov esi, dword [eax + 4]
mov eax, dword [esi + 4]
mov eax, dword [eax]
movzx eax, byte [eax + 0xf]
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0x14]
push edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push str.ATTACH_:memory:_AS_vacuum_db_
mov edi, ebx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 8], esi
call fcn.0049a4f4
mov edi, eax
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebp - 0x10]
pop ecx
jle 0x49a671
mov edx, dword [ebx + 0x10]
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 0x14], ecx
test edi, edi
jne 0x49a8b3
mov ecx, dword [ebx + 0x10]
shl eax, 4
mov eax, dword [eax + ecx - 0xc]
mov dword [ebp - 4], eax
call fcn.0048da9e
mov eax, esi
call fcn.004651fe
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x20]
sub ecx, dword [eax + 0x24]
mov eax, esi
mov dword [ebp - 0x10], ecx
call fcn.0045cf59
mov eax, dword [ebp + 8]
push str.PRAGMA_vacuum_db.synchronousOFF
mov edi, ebx
call fcn.0049a4f4
mov edi, eax
pop ecx
test edi, edi
jne 0x49a8b3
mov eax, dword [ebp + 8]
push str.BEGIN_
mov edi, ebx
call fcn.0049a4f4
mov edi, eax
pop ecx
test edi, edi
jne 0x49a8b3
push 2
push esi
call fcn.0048537c
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x49a6fb
and dword [ebx + 0x48], edi
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x20]
xor edi, edi
push edi
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.00465387
add esp, 0xc
test eax, eax
jne 0x49a907
cmp dword [ebp - 0xc], edi
jne 0x49a739
mov eax, dword [ebx + 0x48]
push edi
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.00465387
add esp, 0xc
test eax, eax
jne 0x49a907
cmp byte [ebx + 0x41], 0
jne 0x49a907
mov al, byte [ebx + 0x43]
test al, al
jl 0x49a74f
movsx eax, al
jmp 0x49a754
call fcn.004654a7
mov edi, dword [ebp - 4]
push eax
call fcn.00465459
mov dword [esp], str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
or dword [ebx + 0x18], 0x8000000
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_coalesce_rootpage_1__0
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
and dword [ebx + 0x18], 0xf7ffffff
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push dword [ebp + 8]
mov eax, ebx
call fcn.0049a54f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x49a8b3
mov eax, dword [ebp + 8]
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_
mov edi, ebx
call fcn.0049a4f4
mov edi, eax
pop ecx
test edi, edi
jne 0x49a8b3
and dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
lea esi, [esi + 0x4d76ec]
movzx eax, byte [esi]
push eax
lea ebx, [ebp - 0x18]
call fcn.004655a1
movzx eax, byte [esi + 1]
add eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 4]
push eax
movzx eax, byte [esi]
push eax
call fcn.00477efc
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49a8ad
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 0xa
jl 0x49a82c
push dword [ebp - 8]
mov esi, ebx
call fcn.004933be
mov edi, eax
pop ecx
test edi, edi
jne 0x49a8ad
mov eax, esi
call fcn.0048da9e
mov edi, eax
test edi, edi
jne 0x49a8ad
call fcn.004654a7
mov edi, dword [ebp - 8]
push eax
call fcn.00465459
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x20]
push 1
push dword [ebp - 0x10]
push edi
call fcn.00465387
add esp, 0x10
mov edi, eax
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x50], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x54], eax
mov eax, dword [ebp - 0x28]
mov dword [ebx + 0xb0], eax
push 1
or eax, 0xffffffff
push eax
push esi
call fcn.00465387
mov esi, dword [ebp - 0x14]
add esp, 0xc
mov byte [ebx + 0x3f], 1
test esi, esi
je 0x49a8f9
push dword [esi + 4]
call fcn.00490450
and dword [esi + 4], 0
and dword [esi + 0xc], 0
pop ecx
mov eax, ebx
call fcn.00470454
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
push 7
pop edi
jmp 0x49a8b3