Function at 0x46cec0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor ecx, ecx
mov edi, eax
mov dword [ebp - 0x10], ecx
cmp byte [edi + 0x3f], cl
jne 0x46cef3
push str.cannot_VACUUM_from_within_a_transaction
mov ebx, dword [ebp + 8]
mov esi, edi
call fcn.00430d40
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x94], 1
jle 0x46cf03
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46ceda
mov eax, dword [edi + 0x18]
mov edx, dword [edi + 0x50]
mov dword [ebp - 0x18], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [edi + 0x40], 2
mov dword [ebp - 0x1c], edx
mov edx, dword [edi + 0x54]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x20], edx
mov edx, dword [edi + 0xb0]
mov dword [edi + 0xb0], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x24], edx
mov edx, dword [ecx]
mov ecx, dword [edi + 0x14]
mov dword [ebp - 4], eax
movzx eax, byte [edx + 0xf]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x46cf5c
mov eax, str.ATTACH__AS_vacuum_db_
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.0046cd20
mov ebx, eax
mov eax, dword [edi + 0x14]
cmp eax, dword [ebp - 0xc]
jle 0x46cf7e
mov ecx, dword [edi + 0x10]
mov edx, eax
add edx, edx
lea edx, [ecx + edx*8 - 0x10]
mov dword [ebp - 0x10], edx
test ebx, ebx
jne 0x46d1af
mov ecx, dword [edi + 0x10]
add eax, eax
mov eax, dword [ecx + eax*8 - 0xc]
mov dword [ebp - 8], eax
call fcn.00458c10
mov eax, dword [ebp - 4]
call fcn.004126a0
mov dword [ebp - 0xc], eax
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, esi
call fcn.0046cd20
mov ebx, eax
test ebx, ebx
jne 0x46d1af
mov eax, str.BEGIN_
mov ecx, esi
call fcn.0046cd20
mov ebx, eax
test ebx, ebx
jne 0x46d1af
mov edx, dword [ebp - 4]
push 2
push edx
call fcn.0044c580
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x46d1af
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x46cff7
mov dword [edi + 0x48], ebx
mov ecx, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov ebx, dword [ebp - 8]
mov eax, dword [eax + 0x20]
push 0
push ecx
push ebx
call fcn.004125c0
add esp, 0xc
test eax, eax
jne 0x46d1aa
cmp dword [ebp - 0x14], eax
jne 0x46d035
mov edx, dword [ebp - 0xc]
push eax
mov eax, dword [edi + 0x48]
push edx
push ebx
call fcn.004125c0
add esp, 0xc
test eax, eax
jne 0x46d1aa
cmp byte [edi + 0x41], 0
jne 0x46d1aa
mov al, byte [edi + 0x43]
test al, al
js 0x46d04b
movsx eax, al
jmp 0x46d053
mov eax, dword [ebp - 4]
call fcn.00412810
push eax
mov eax, ebx
call fcn.00412790
push edi
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov ecx, esi
call fcn.0046cd90
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x46d1af
push edi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov ecx, esi
call fcn.0046cd90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d1af
push edi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov ecx, esi
call fcn.0046cd90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d1af
or dword [edi + 0x18], 0x8000000
push edi
mov eax, 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 ecx, esi
call fcn.0046cd90
and dword [edi + 0x18], 0xf7ffffff
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d1af
push edi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov ecx, esi
call fcn.0046cd90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d1af
push edi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov ecx, esi
call fcn.0046cd90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46d1af
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, esi
call fcn.0046cd20
mov ebx, eax
test ebx, ebx
jne 0x46d1af
xor esi, esi
lea ecx, [ecx]
movzx ecx, byte [esi + 0x4e7f90]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
push ecx
call fcn.004129a0
movzx edx, byte [esi + 0x4e7f91]
add edx, dword [ebp - 0x14]
movzx ebx, byte [esi + 0x4e7f90]
mov eax, dword [ebp - 8]
push edx
call fcn.00448ba0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x46d1af
add esi, 2
cmp esi, 0xa
jl 0x46d120
mov esi, dword [ebp - 8]
mov ebx, dword [ebp - 4]
mov eax, esi
call fcn.004617b0
mov ebx, eax
test ebx, ebx
jne 0x46d1af
mov eax, esi
call fcn.00458c10
mov ebx, eax
test ebx, ebx
jne 0x46d1af
mov eax, esi
call fcn.00412810
mov ebx, dword [ebp - 4]
push eax
mov eax, ebx
call fcn.00412790
mov ecx, dword [ebp - 0xc]
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x20]
push 1
push ecx
push ebx
call fcn.004125c0
add esp, 0x10
mov ebx, eax
jmp 0x46d1af
mov ebx, 7
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 4]
push 1
mov dword [edi + 0x18], edx
mov edx, dword [ebp - 0x24]
push 0xffffffffffffffff
push eax
or eax, 0xffffffff
mov dword [edi + 0x54], ecx
mov dword [edi + 0xb0], edx
call fcn.004125c0
mov esi, dword [ebp - 0x10]
add esp, 0xc
mov byte [edi + 0x3f], 1
test esi, esi
je 0x46d1f8
mov eax, dword [esi + 4]
call fcn.0045cda0
xor eax, eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
mov eax, edi
call fcn.00420560
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret