Function at 0x495f60
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x24
push esi
mov esi, dword [esp + 0x30]
xor ecx, ecx
cmp byte [esi + 0x3e], cl
mov dword [esp + 8], ecx
jne 0x495f90
mov eax, dword [esp + 0x2c]
push str.cannot_VACUUM_from_within_a_transaction
push esi
push eax
call fcn.0043f7c0
add esp, 0xc
mov eax, 1
pop esi
add esp, 0x24
ret
cmp dword [esi + 0x8c], 1
jle 0x495fb6
mov ecx, dword [esp + 0x2c]
push str.cannot_VACUUM___SQL_statements_in_progress
push esi
push ecx
call fcn.0043f7c0
add esp, 0xc
mov eax, 1
pop esi
add esp, 0x24
ret
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x50]
mov dword [esp + 0x14], eax
and eax, 0xfff5ffff
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x54]
or eax, 0x202800
push ebx
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
push ebp
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0xa4]
mov dword [esi + 0xa4], ecx
mov ebp, dword [eax + 4]
push edi
push ebp
mov dword [esp + 0x30], edx
call fcn.00453370
push eax
call fcn.0044c7e0
mov ecx, dword [esi + 0x14]
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], ecx
call fcn.00436960
add esp, 0xc
test eax, eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jne 0x49601f
mov eax, str.ATTACH__AS_vacuum_db_
mov ebx, dword [esp + 0x38]
call fcn.00495e20
mov edi, eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esp + 0x3c]
jle 0x496043
mov ecx, dword [esi + 0x10]
mov edx, eax
shl edx, 4
lea edx, [edx + ecx - 0x10]
mov dword [esp + 0x14], edx
test edi, edi
jne 0x496298
mov ecx, dword [esi + 0x10]
shl eax, 4
mov eax, dword [eax + ecx - 0xc]
push eax
mov dword [esp + 0x40], eax
call fcn.00455320
push ebp
call fcn.004506f0
add esp, 8
cmp dword [esi + 0x48], edi
mov dword [esp + 0x10], eax
je 0x49608e
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x34]
push eax
push edi
push esi
call fcn.00494080
add esp, 0x10
cmp dword [esp + 0x18], edi
je 0x49608e
mov dword [esi + 0x48], edi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.00495e20
mov edi, eax
test edi, edi
jne 0x496298
mov eax, str.BEGIN_
call fcn.00495e20
mov edi, eax
test edi, edi
jne 0x496298
push 2
push ebp
call fcn.00450d40
mov edi, eax
add esp, 8
test edi, edi
jne 0x496298
push ebp
call fcn.00453370
push eax
call fcn.0044ca70
add esp, 8
cmp eax, 5
jne 0x4960e2
mov dword [esi + 0x48], edi
mov ecx, dword [esp + 0x10]
push 0
push ecx
push ebp
call fcn.004506d0
mov edi, dword [esp + 0x48]
add esp, 4
push eax
push edi
call fcn.00450620
add esp, 0x10
test eax, eax
jne 0x496293
cmp dword [esp + 0x1c], eax
jne 0x496129
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esi + 0x48]
push edx
push eax
push edi
call fcn.00450620
add esp, 0x10
test eax, eax
jne 0x496293
cmp byte [esi + 0x40], 0
jne 0x496293
mov al, byte [esi + 0x42]
test al, al
jl 0x49613f
movsx eax, al
jmp 0x496148
push ebp
call fcn.00450820
add esp, 4
push eax
push edi
call fcn.004507b0
add esp, 8
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov ecx, 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
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov eax, ebx
mov edx, esi
call fcn.00495e90
mov edi, eax
test edi, edi
jne 0x496298
mov eax, 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_
call fcn.00495e20
mov edi, eax
test edi, edi
jne 0x496298
xor ebx, ebx
jmp 0x496200
movzx edx, byte [ebx + 0x52ef48]
lea ecx, [esp + 0x1c]
push ecx
push edx
push ebp
call fcn.004532d0
movzx eax, byte [ebx + 0x52ef49]
add eax, dword [esp + 0x28]
movzx ecx, byte [ebx + 0x52ef48]
mov edx, dword [esp + 0x48]
push eax
push ecx
push edx
call fcn.00453310
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x496298
add ebx, 2
cmp ebx, 0xa
jl 0x496200
mov ebx, dword [esp + 0x3c]
push ebx
push ebp
call fcn.00442430
mov edi, eax
add esp, 8
test edi, edi
jne 0x496298
push ebx
call fcn.00455320
mov edi, eax
add esp, 4
test edi, edi
jne 0x496298
push ebx
call fcn.00450820
push eax
push ebp
call fcn.004507b0
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 1
push eax
push ebx
call fcn.004506d0
add esp, 4
push eax
push ebp
call fcn.00450620
add esp, 0x10
mov edi, eax
jmp 0x496298
mov edi, 7
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
push 1
push 0xffffffffffffffff
mov dword [esi + 0x18], ecx
mov ecx, dword [esp + 0x34]
push 0xffffffffffffffff
push ebp
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], eax
mov dword [esi + 0xa4], ecx
call fcn.00450620
mov ebx, dword [esp + 0x24]
xor ebp, ebp
add esp, 0x10
cmp ebx, ebp
mov byte [esi + 0x3e], 1
je 0x4962e6
mov edx, dword [ebx + 4]
push edx
call fcn.004573c0
add esp, 4
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], ebp
push esi
call fcn.0045dc40
add esp, 4
mov eax, edi
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x24
ret