Function at 0x4a6ed4
Capabilities:
Reference sql statements

Disassembly:
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 edi
jne 0x4a6f01
push str.cannot_VACUUM_from_within_a_transaction
mov edi, dword [ebp + 8]
push ebx
call fcn.004806a0
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x4a7213
cmp dword [ebx + 0x94], 1
jle 0x4a6f11
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4a6eee
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x50]
mov dword [ebp - 0x1c], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebx + 0x54]
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebx + 0xb0]
and dword [ebx + 0xb0], 0
mov eax, dword [eax + 4]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], eax
call fcn.004663a8
call fcn.00465243
mov edi, dword [ebx + 0x14]
mov ecx, ebx
mov dword [ebp - 0xc], eax
call fcn.0046b436
test eax, eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jne 0x4a6f6e
mov eax, str.ATTACH__AS_vacuum_db_
push esi
push eax
mov eax, dword [ebp + 8]
mov esi, ebx
call fcn.004a6e0f
mov esi, eax
mov eax, dword [ebx + 0x14]
pop ecx
cmp eax, edi
jle 0x4a6f92
mov edx, dword [ebx + 0x10]
mov ecx, eax
add ecx, ecx
lea ecx, [edx + ecx*8 - 0x10]
mov dword [ebp - 0x14], ecx
test esi, esi
jne 0x4a71c1
mov ecx, dword [ebx + 0x10]
add eax, eax
mov edi, dword [ecx + eax*8 - 0xc]
mov eax, edi
mov dword [ebp - 8], edi
call fcn.00499fb7
push dword [ebp - 4]
call fcn.0046e064
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov esi, ebx
mov dword [esp], str.PRAGMA_vacuum_db.synchronousOFF
call fcn.004a6e0f
mov esi, eax
pop ecx
test esi, esi
jne 0x4a71c1
mov eax, dword [ebp + 8]
push str.BEGIN_
mov esi, ebx
call fcn.004a6e0f
mov esi, eax
pop ecx
test esi, esi
jne 0x4a71c1
push 2
push dword [ebp - 4]
call fcn.00491d6d
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
mov esi, dword [ebp - 4]
mov eax, esi
call fcn.004663a8
call fcn.0046528c
cmp eax, 5
jne 0x4a701c
and dword [ebx + 0x48], 0
push 0
push dword [ebp - 0x10]
mov eax, esi
call fcn.004661a2
push edi
call fcn.0046dfe2
add esp, 0xc
test eax, eax
jne 0x4a7217
cmp dword [ebp - 0xc], eax
jne 0x4a7056
push eax
push dword [ebp - 0x10]
mov eax, dword [ebx + 0x48]
push edi
call fcn.0046dfe2
add esp, 0xc
test eax, eax
jne 0x4a7217
cmp byte [ebx + 0x41], 0
jne 0x4a7217
mov al, byte [ebx + 0x43]
test al, al
js 0x4a706c
movsx eax, al
jmp 0x4a7071
call fcn.0046e145
push eax
call fcn.0046e0f9
mov edi, dword [ebp + 8]
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 edi
mov eax, ebx
call fcn.004a6e66
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push edi
mov eax, ebx
call fcn.004a6e66
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push edi
mov eax, ebx
call fcn.004a6e66
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
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 edi
mov eax, ebx
call fcn.004a6e66
and dword [ebx + 0x18], 0xf7ffffff
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push edi
mov eax, ebx
call fcn.004a6e66
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push edi
mov eax, ebx
call fcn.004a6e66
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a71c1
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 eax, edi
mov esi, ebx
call fcn.004a6e0f
mov esi, eax
pop ecx
test esi, esi
jne 0x4a71c1
and dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
lea esi, [esi + 0x51e5e0]
movzx eax, byte [esi]
push eax
lea ebx, [ebp - 0x18]
call fcn.0046e238
movzx eax, byte [esi + 1]
add eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 8]
push eax
movzx eax, byte [esi]
push eax
call fcn.0048f267
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4a71be
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 0xa
jl 0x4a713c
mov esi, ebx
mov ebx, edi
call fcn.0049ffc0
mov esi, eax
test esi, esi
jne 0x4a71be
mov eax, dword [ebp - 8]
call fcn.00499fb7
mov esi, eax
test esi, esi
jne 0x4a71be
mov esi, dword [ebp - 8]
call fcn.0046e145
push eax
call fcn.0046e0f9
pop ecx
push 1
push dword [ebp - 0x10]
mov eax, esi
call fcn.004661a2
push edi
call fcn.0046dfe2
add esp, 0xc
mov esi, eax
mov ebx, dword [ebp + 0xc]
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 dword [ebp - 4]
call fcn.0046dfe2
mov edi, dword [ebp - 0x14]
add esp, 0xc
mov byte [ebx + 0x3f], 1
test edi, edi
je 0x4a7209
push dword [edi + 4]
call fcn.0049c811
and dword [edi + 4], 0
and dword [edi + 0xc], 0
pop ecx
mov eax, ebx
call fcn.00476208
mov eax, esi
pop esi
pop edi
pop ebx
leave
ret
push 7
pop esi
jmp 0x4a71c1