Function at 0x4648f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov ebx, ecx
xor ecx, ecx
mov edi, eax
mov dword [ebp - 0xc], ecx
cmp byte [edi + 0x1c], cl
jne 0x464922
push str.cannot_VACUUM_from_within_a_transaction
mov edi, ebx
call fcn.0040d1e0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x8c], 1
jle 0x464946
push str.cannot_VACUUM___SQL_statements_in_progress
mov edi, ebx
call fcn.0040d1e0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xc]
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x18], eax
and eax, 0xfaffffff
or eax, 0x10050000
cmp byte [edi + 0x1d], 2
mov dword [ebp - 0x1c], edx
mov edx, dword [edi + 0x40]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x20], edx
mov edx, dword [edi + 0x98]
mov dword [edi + 0x98], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x24], edx
mov edx, dword [ecx]
mov ecx, dword [edi + 4]
mov dword [ebp - 4], eax
movzx eax, byte [edx + 0xe]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x46499f
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, ebx
mov esi, edi
call fcn.004645a0
mov esi, eax
mov eax, dword [edi + 4]
cmp eax, dword [ebp - 0x10]
jle 0x4649c0
mov ecx, dword [edi + 8]
mov edx, eax
add edx, edx
lea edx, [ecx + edx*8 - 0x10]
mov dword [ebp - 0xc], edx
test esi, esi
jne 0x464bd4
mov ecx, dword [edi + 8]
add eax, eax
mov esi, dword [ecx + eax*8 - 0xc]
mov eax, esi
mov dword [ebp - 8], esi
call fcn.0041fcf0
mov eax, dword [ebp - 4]
call fcn.0041e5b0
mov ecx, eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov edx, dword [edx]
cmp byte [edx + 5], 5
mov dword [ebp - 0x10], ecx
jne 0x4649fd
mov dword [edi + 0x24], 0
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x24]
push 0
push ecx
push esi
call fcn.0041e4d0
add esp, 0xc
test eax, eax
jne 0x464bcf
cmp dword [ebp - 0x14], eax
jne 0x464a35
mov ecx, dword [ebp - 0x10]
push eax
mov eax, dword [edi + 0x24]
push ecx
push esi
call fcn.0041e4d0
add esp, 0xc
test eax, eax
jne 0x464bcf
cmp byte [edi + 0x1e], 0
jne 0x464bcf
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, ebx
mov esi, edi
call fcn.004645a0
mov esi, eax
test esi, esi
jne 0x464bd4
mov al, byte [edi + 0x20]
test al, al
js 0x464a63
movsx eax, al
jmp 0x464a6b
mov eax, dword [ebp - 4]
call fcn.0041e710
push eax
mov eax, dword [ebp - 8]
call fcn.0041e690
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
mov ecx, ebx
mov esi, edi
call fcn.004645a0
mov esi, eax
test esi, esi
jne 0x464bd4
push ebx
push edi
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
push ebx
push edi
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
push ebx
push edi
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
push ebx
push edi
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_rootpage_0
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
push ebx
push edi
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
push ebx
push edi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.00464630
mov esi, eax
add esp, 8
test esi, esi
jne 0x464bd4
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_
mov ecx, ebx
mov esi, edi
call fcn.004645a0
mov esi, eax
test esi, esi
jne 0x464bd4
xor ebx, ebx
nop
movzx eax, byte [ebx + 0x49dd58]
lea edx, [ebp - 0x14]
push edx
push eax
mov eax, dword [ebp - 4]
call fcn.00425170
movzx ecx, byte [ebx + 0x49dd59]
add ecx, dword [ebp - 0x14]
movzx edx, byte [ebx + 0x49dd58]
mov eax, dword [ebp - 8]
push ecx
push edx
call fcn.004251e0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x464bd4
add ebx, 2
cmp ebx, 8
jl 0x464b40
mov esi, dword [ebp - 8]
mov ebx, dword [ebp - 4]
call fcn.00427fd0
mov esi, eax
test esi, esi
jne 0x464bd4
mov ebx, dword [ebp - 8]
mov eax, ebx
call fcn.0041fcf0
mov esi, eax
test esi, esi
jne 0x464bd4
mov eax, ebx
call fcn.0041e710
mov esi, dword [ebp - 4]
push eax
mov eax, esi
call fcn.0041e690
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebx + 4]
mov eax, dword [eax + 0x24]
add esp, 4
push 1
push ecx
push esi
call fcn.0041e4d0
add esp, 0xc
mov esi, eax
jmp 0x464bd4
mov esi, 7
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 4]
push 1
mov dword [edi + 0xc], edx
mov edx, dword [ebp - 0x24]
push 0xffffffffffffffff
push eax
or eax, 0xffffffff
mov dword [edi + 0x40], ecx
mov dword [edi + 0x98], edx
call fcn.0041e4d0
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov byte [edi + 0x1c], 1
test eax, eax
je 0x464c20
mov ebx, dword [eax + 4]
call fcn.0041e2e0
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [eax + 0xc], ecx
or eax, 0xffffffff
mov ecx, edi
call fcn.00442c70
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret