Function at 0x46e69c
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
and dword [ebp - 0x1c], 0
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
cmp byte [esi + 0x43], 0
jne 0x46e6c6
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0042c5cd
xor eax, eax
pop ecx
inc eax
jmp 0x46e9be
cmp dword [esi + 0x9c], 1
jle 0x46e6d6
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46e6b8
mov ecx, dword [esi + 0x58]
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi + 0x5c]
mov dword [ebp - 0x24], eax
and eax, 0xfff5ff7f
mov dword [ebp - 0x2c], ecx
or eax, 0x10202800
mov cl, byte [esi + 0x4c]
mov byte [ebp - 1], cl
mov ecx, dword [ebp + 8]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
shl ecx, 4
mov byte [esi + 0x4c], 0
mov dword [ebp + 8], ecx
mov edx, dword [eax + ecx]
mov eax, dword [eax + ecx + 4]
mov ecx, eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
call fcn.00440979
mov ecx, eax
call fcn.00436cb5
mov dword [ebp - 0x20], eax
mov edx, ebx
mov eax, dword [esi + 0x14]
mov ecx, esi
push str.ATTACHAS_vacuum_db
mov dword [ebp - 0x18], eax
call fcn.0046e57b
mov edi, eax
pop ecx
test edi, edi
jne 0x46e96b
mov eax, dword [ebp - 0x18]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [eax + 4]
mov ecx, eax
mov dword [ebp - 8], eax
call fcn.0043c11c
mov ecx, dword [ebp - 0xc]
call fcn.0043b36d
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov edx, dword [ecx + edx + 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [edx + 0x50]
call fcn.0043b23b
mov ecx, dword [ebp - 0xc]
xor edx, edx
call fcn.0043b260
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.0043b260
mov ecx, dword [ebp - 8]
push 0x21
pop edx
call fcn.0043b2b2
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.0046e57b
mov edi, eax
pop ecx
test edi, edi
jne 0x46e96b
mov ecx, dword [ebp - 0xc]
push 2
pop edx
call fcn.0043b78f
mov edi, eax
test edi, edi
jne 0x46e96b
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.00440979
mov ecx, eax
call fcn.004370b1
cmp eax, 5
jne 0x46e7e8
and dword [esi + 0x50], 0
push 0
push dword [ebp - 0x14]
mov ecx, edi
call fcn.0043b35c
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.0043b2d7
pop ecx
pop ecx
test eax, eax
jne 0x46e968
cmp dword [ebp - 0x20], eax
jne 0x46e826
mov edx, dword [esi + 0x50]
mov ecx, dword [ebp - 8]
push eax
push dword [ebp - 0x14]
call fcn.0043b2d7
pop ecx
pop ecx
test eax, eax
jne 0x46e968
cmp byte [esi + 0x45], 0
jne 0x46e968
mov al, byte [esi + 0x48]
test al, al
js 0x46e83c
movsx eax, al
jmp 0x46e843
mov ecx, edi
call fcn.0043b44a
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.0043b3f8
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0x98], al
call fcn.0046e604
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46e96b
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex_AND_length_sql__10
push ebx
push esi
call fcn.0046e604
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46e96b
push dword [ebp - 0x10]
mov byte [esi + 0x98], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.0046e604
and dword [esi + 0x18], 0xefffffff
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46e96b
push dword [ebp - 0x10]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.0046e604
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46e96b
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edi
movzx edx, byte [edi + 0x5012a0]
lea eax, [ebp - 0x20]
push eax
mov ecx, ebx
call fcn.004407f3
movzx eax, byte [edi + 0x5012a1]
add eax, dword [ebp - 0x20]
movzx edx, byte [edi + 0x5012a0]
pop ecx
mov ecx, dword [ebp - 8]
push eax
call fcn.00440837
mov edi, eax
pop ecx
test edi, edi
jne 0x46e96b
mov edi, dword [ebp - 0x18]
add edi, 2
mov dword [ebp - 0x18], edi
cmp edi, 0xa
jl 0x46e8d9
mov edx, dword [ebp - 8]
mov ecx, ebx
call fcn.00442080
mov edi, eax
test edi, edi
jne 0x46e96b
mov ebx, dword [ebp - 8]
mov ecx, ebx
call fcn.0043c11c
mov edi, eax
test edi, edi
jne 0x46e96b
mov ecx, ebx
call fcn.0043b44a
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.0043b3f8
push 1
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.0043b35c
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.0043b2d7
pop ecx
pop ecx
mov edi, eax
jmp 0x46e96b
push 7
pop edi
mov eax, dword [ebp - 0x24]
or edx, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x58], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x5c], eax
mov al, byte [ebp - 1]
push 1
push edx
mov byte [esi + 0x98], 0
mov byte [esi + 0x4c], al
call fcn.0043b2d7
mov ebx, dword [ebp - 0x1c]
mov byte [esi + 0x43], 1
pop ecx
pop ecx
test ebx, ebx
je 0x46e9b5
mov ecx, dword [ebx + 4]
call fcn.0043b19a
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
mov ecx, esi
call fcn.004580fd
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret