Function at 0x46501b
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 0x465045
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0042340e
xor eax, eax
pop ecx
inc eax
jmp 0x46533d
cmp dword [esi + 0x9c], 1
jle 0x465055
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x465037
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, 0xffffaf7f
mov dword [ebp - 0x2c], ecx
or eax, 0x6000201
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.0043736d
mov ecx, eax
call fcn.0042d6e2
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.00464ef4
mov edi, eax
pop ecx
test edi, edi
jne 0x4652ea
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.00432b88
mov ecx, dword [ebp - 0xc]
call fcn.00431dce
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.00431c9b
mov ecx, dword [ebp - 0xc]
xor edx, edx
call fcn.00431cc0
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.00431cc0
mov ecx, dword [ebp - 8]
push 0x21
pop edx
call fcn.00431d12
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.00464ef4
mov edi, eax
pop ecx
test edi, edi
jne 0x4652ea
mov ecx, dword [ebp - 0xc]
push 2
pop edx
call fcn.004321d8
mov edi, eax
test edi, edi
jne 0x4652ea
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.0043736d
mov ecx, eax
call fcn.0042dad4
cmp eax, 5
jne 0x465167
and dword [esi + 0x50], 0
push 0
push dword [ebp - 0x14]
mov ecx, edi
call fcn.00431dbd
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.00431d37
pop ecx
pop ecx
test eax, eax
jne 0x4652e7
cmp dword [ebp - 0x20], eax
jne 0x4651a5
mov edx, dword [esi + 0x50]
mov ecx, dword [ebp - 8]
push eax
push dword [ebp - 0x14]
call fcn.00431d37
pop ecx
pop ecx
test eax, eax
jne 0x4652e7
cmp byte [esi + 0x45], 0
jne 0x4652e7
mov al, byte [esi + 0x48]
test al, al
js 0x4651bb
movsx eax, al
jmp 0x4651c2
mov ecx, edi
call fcn.00431ead
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.00431e59
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.00464f81
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4652ea
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex_AND_length_sql__10
push ebx
push esi
call fcn.00464f81
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4652ea
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.00464f81
and dword [esi + 0x18], 0xfbffffff
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4652ea
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.00464f81
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4652ea
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edi
movzx edx, byte [edi + 0x4a9688]
lea eax, [ebp - 0x20]
push eax
mov ecx, ebx
call fcn.004371db
movzx eax, byte [edi + 0x4a9689]
add eax, dword [ebp - 0x20]
movzx edx, byte [edi + 0x4a9688]
pop ecx
mov ecx, dword [ebp - 8]
push eax
call fcn.0043721f
mov edi, eax
pop ecx
test edi, edi
jne 0x4652ea
mov edi, dword [ebp - 0x18]
add edi, 2
mov dword [ebp - 0x18], edi
cmp edi, 0xa
jl 0x465258
mov edx, dword [ebp - 8]
mov ecx, ebx
call fcn.00438a7b
mov edi, eax
test edi, edi
jne 0x4652ea
mov ebx, dword [ebp - 8]
mov ecx, ebx
call fcn.00432b88
mov edi, eax
test edi, edi
jne 0x4652ea
mov ecx, ebx
call fcn.00431ead
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.00431e59
push 1
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00431dbd
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.00431d37
pop ecx
pop ecx
mov edi, eax
jmp 0x4652ea
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.00431d37
mov ebx, dword [ebp - 0x1c]
mov byte [esi + 0x43], 1
pop ecx
pop ecx
test ebx, ebx
je 0x465334
mov ecx, dword [ebx + 4]
call fcn.00431bfa
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
mov ecx, esi
call fcn.0044eb05
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret